What problem does it solve?
Deep research reports written by AI agents often contain raw footnote-style citation keys like [^source_id], duplicate sources across evidence files, and leaked internal claim IDs. This Skill post-processes the final stitched Markdown report into a clean, deliverable document with numbered [N] citations and a proper bibliography.
Core Features & Use Cases
- Citation Deduplication and Numbering: Collects sources from all evidence.json files, merges same-URL sources, and converts [^source_id] references into sequential [N] numbers.
- Claim-ID Leakage Repair: Detects writer bugs where internal claim IDs like [^d8.c19] are used as citation keys and automatically substitutes the correct source IDs, reporting unresolved cases.
- L0 Summary and TOC Rendering: Optionally inserts a key-findings summary box after the H1 title and auto-generates a table of contents from H2/H3 headings when an outline.json is provided.
- Use Case: After a deep research pipeline produces stitched.md plus per-section evidence.json files, run this Skill to produce the final report.md with numbered citations, a 参考文献 bibliography section, and a citations.json metadata file.
Quick Start
Run the prepare_citations script on my stitched.md report with all the evidence.json files and outline.json to produce the final report.md with numbered citations and a bibliography.