一键导入
summarize-documents
Generate per-document markdown summaries from PDFs. Detects document type and adapts the summary structure accordingly. Updates citations.json.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate per-document markdown summaries from PDFs. Detects document type and adapts the summary structure accordingly. Updates citations.json.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate a cross-cutting synthesis document from all summaries in summaries/. Reads synthesis-guidance.md if present. Can trigger the full pipeline if summaries are missing.
Package the synthesis into a shareable ZIP for distribution. Use when the user wants to share, export, or distribute their synthesis to others. Creates a self-contained directory (synthesis-export/) with the HTML, CSS, JS, all source PDFs, and all summary files, then zips it. The "Ask Claude" functionality is automatically removed (button hidden via CSS) since it requires a local server to work. Invoke when the user says things like "export", "share", "package", "zip up", "distribute", or "send the synthesis to someone".
Use when the user wants to view or interact with synthesis.html after running /create-synthesis — builds the HTML, verifies Claude Code auth, starts the local server, and opens the page in the browser
Reset the cc-synthesizer pipeline by deleting all generated files so a fresh batch of PDFs can be processed from scratch. Invoke whenever the user wants to start over with new documents, clear the workspace, or clean up pipeline outputs. Trigger on phrases like "reset", "clean up", "start fresh", "new batch", "clear the pipeline", "delete generated files", "wipe the outputs", or "prepare for new PDFs". Always checks for an existing export first before deleting anything — don't skip this check.
Clean up PDF filenames by removing spaces, em dashes, and special characters
| name | summarize-documents |
| description | Generate per-document markdown summaries from PDFs. Detects document type and adapts the summary structure accordingly. Updates citations.json. |
| argument-hint | <path/to/pdf-or-directory> ["optional context"] |
| allowed-tools | Bash, Read, Write, Edit, Glob, Agent |
Generate structured markdown summaries from PDF files.
$ARGUMENTS
@.claude/reference/summary-format.md @.claude/reference/citations-format.md
Split $ARGUMENTS into:
If path is empty, ask the user for a path.
Single file: Verify it exists and ends in .pdf.
Directory: Find all .pdf files recursively using {path}/**/*.pdf glob pattern.
Build a list of {full_path, subdir} pairs where subdir is the path segment between the root documents/ directory and the file's parent directory (empty string if PDF is directly in documents/).
Report count. If zero, inform user and stop.
synthesis/citations.json if it exists; extract existing citation keys for duplicate checkingAuthor_-_YYYY_-_Title.pdf or Author - YYYY - Title.pdf):
et al., and, -, or _-_- or _-_summaries/{subdir}/{BibKey}.md already exists → mark as skip or processReport: existing bib entries, existing summaries, to process, to skip.
When processing multiple PDFs, dispatch all of them in parallel using the Agent tool — one agent per PDF, all dispatched in the same message. Each agent has access to: Bash, Read, Write, Glob. Each agent handles steps 4a–4d independently and writes its own .md summary file. Agents must NOT write to synthesis/citations.json — that is a shared file written in Step 5. Each agent should return a structured result block:
---BEGIN_AGENT_RESULT---
STATUS: success | error
PDF: {pdf_path}
BIBKEY: {final_cit_key}
CITATION_METHOD: doi|title|manual
SUMMARY_PATH: {absolute_path}
CITATION_ENTRY:
```json
{ "Smith2023Finding": { "title": "...", "authors": "...", "year": "...", "venue": "...", "doi": "...", "url": "...", "type": "...", "pdf": "/abs/path/documents/subdir/Smith_-_2023_-_Title.pdf", "summary": "/abs/path/summaries/subdir/Smith2023Finding.md" } }
WARNINGS: {any warnings, or "none"} ---END_AGENT_RESULT---
On error: `STATUS: error`, `PDF: {path}`, `ERROR: {description}`.
**When processing a single PDF**, agents are optional; you may handle it directly in the main context.
For each PDF marked **process**:
#### 4a. Fetch Citation Entry
1. Search for DOI in the PDF:
```bash
.claude/skills/pdf-extraction/scripts/pdf_extract.sh search "{pdf_path}" "doi"
fbib "{doi}" — if successful, use this BibTeX entry (regenerate key per @.claude/reference/citations-format.md); extract fields (title, authors, year, venue, doi, url, type) for the citations.json entry.claude/skills/pdf-extraction/scripts/pdf_extract.sh first "{pdf_path}" 1
Then run fbib "Full Paper Title"If first page not yet extracted, extract it:
.claude/skills/pdf-extraction/scripts/pdf_extract.sh first "{pdf_path}" 1
Classify as one of: Academic paper, Industry/government report, White paper/opinion, Book chapter, Technical documentation, Other. Use title, abstract, and any venue/publisher info visible on the first page.
If context provided in $ARGUMENTS, it may override or inform this classification (e.g., "these are industry reports").
For papers ≤8 pages: extract all content:
.claude/skills/pdf-extraction/scripts/pdf_extract.sh all "{pdf_path}"
For papers >8 pages: extract strategically:
.claude/skills/pdf-extraction/scripts/pdf_extract.sh search-pages "{pdf_path}" "Method"
.claude/skills/pdf-extraction/scripts/pdf_extract.sh search-pages "{pdf_path}" "Result"
.claude/skills/pdf-extraction/scripts/pdf_extract.sh search-pages "{pdf_path}" "Limitation"
.claude/skills/pdf-extraction/scripts/pdf_extract.sh search-pages "{pdf_path}" "Conclusion"
summaries/{subdir}/{BibKey}.mdsummaries/{BibKey}.mdWhen not using parallel agents, upsert the entry into synthesis/citations.json at the repo root (create file if absent; add or overwrite the entry for this citation key — do not remove existing entries for other keys). Include all fields: title, authors, year, venue, doi, url, type, pdf, summary (absolute filesystem paths).
Write atomically: write the full JSON to a temp file in the same directory, then rename to synthesis/citations.json.
After all agents have returned, collect their structured result blocks.
---BEGIN_AGENT_RESULT--- block; separate successes from errors (or unparseable output)synthesis/citations.json from disk first (or {} if absent)CitKey for different PDFs → rename the second with a letter suffix (b, c, …) and note it in warningssynthesis/citations.json: merge all new CITATION_ENTRY objects (parsed as JSON) into the existing dict; write atomically (temp file + rename)Summarize Documents — Results
==============================
PDFs found: {total}
Skipped (exists): {skipped}
Agents dispatched: {dispatched}
Succeeded: {success_count}
Failed: {failed_count}
Citation methods (successful):
Via fbib (DOI): {doi_count}
Via fbib (title): {title_count}
Via manual extract: {manual_count}
New summaries written:
- {path1}
- {path2}
Warnings (if any):
- {filename}: {warning}
Report "Could not read PDF: {filename}", skip the file, continue with remaining PDFs.
If filename doesn't match Author - YYYY - Title or Author_-_YYYY_-_Title format, extract first page to get metadata directly rather than parsing the filename.
Per @.claude/reference/citations-format.md — omit the field; use @misc entry type if venue is unknown.