Agent skill
doc2qra
Convert any document (PDF, URL, text) into Question-Reasoning-Answer pairs with a document summary. Stores to memory for later recall.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/doc2qra
Metadata
Additional technical details for this skill
- short description
- Document → QRA pairs + summary (PDF, URL, text)
SKILL.md
doc2qra
Convert any document into Question-Reasoning-Answer pairs with a summary.
Input → Summary + QRA pairs → Memory
Quick Start
# PDF → QRA with summary
./run.sh --file paper.pdf --scope research
# With domain focus (recommended for better relevance)
./run.sh --file paper.pdf --scope research --context "ML researcher"
# Preview before storing
./run.sh --file paper.pdf --dry-run
# URL → QRA
./run.sh --url https://example.com/article --scope web
# Text file → QRA
./run.sh --file notes.txt --scope project
What It Does
- Extract content from PDF/URL/text
- Summarize the document (2-3 paragraph overview)
- Split into logical sections
- Generate Q&A pairs via LLM (parallel batch)
- Validate answers are grounded in source
- Store summary + QRAs to memory
Parameters
| Flag | Description |
|---|---|
--file |
PDF, markdown, or text file |
--url |
URL to fetch and convert |
--scope |
Memory scope (default: research) |
--context |
Domain focus, e.g. "security expert" |
--dry-run |
Preview without storing |
--json |
JSON output (includes summary) |
--sections-only |
Extract sections only (no Q&A) |
--summary-only |
Generate only the summary |
Output Format
When using --json, output includes:
{
"summary": "A 2-3 paragraph summary of the document...",
"extracted": 15,
"stored": 15,
"sections": 8,
"source": "paper.pdf",
"scope": "research",
"qra_pairs": [
{"problem": "What is...", "solution": "The document explains..."},
...
]
}
Examples
# Research paper with context
./run.sh --file arxiv_paper.pdf --scope research --context "ML researcher"
# Technical documentation
./run.sh --file api_docs.md --scope project --context "backend developer"
# Just get the summary
./run.sh --file paper.pdf --summary-only
# From extractor output (pipeline integration)
./run.sh --from-extractor /path/to/extractor/results --scope research
Environment Variables (Optional Tuning)
| Variable | Default | Description |
|---|---|---|
DOC2QRA_PDF_MODE |
fast | PDF mode: fast, accurate, auto |
DOC2QRA_CONCURRENCY |
6 | Parallel LLM requests |
DOC2QRA_GROUNDING_THRESH |
0.6 | Grounding similarity threshold |
DOC2QRA_NO_GROUNDING |
- | Set to 1 to skip validation |
Migration from distill/qra/doc-to-qra
This skill consolidates the functionality of:
distill→ Usedoc2qrainsteadqra→ Usedoc2qrainsteaddoc-to-qra→ Usedoc2qrainstead
All three legacy skills now redirect to doc2qra with deprecation warnings.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?