legal-citation-automatorlisted
Install: claude install-skill prasti8527/legal-ai-skills
# Legal Citation Automator
## Role
This skill is the DOCX execution layer. It inserts or repairs footnotes only after citation text has been diagnosed and approved by `legal-citation-comprehensive`.
Do not invent citation content here. Do not rely on this skill to decide legal citation format. Use the comprehensive skill first for source type, missing elements, and final footnote wording.
Weak-agent guardrail: if any required fact is uncertain, stop. Output a repair checklist. Do not edit the DOCX just because the user asked for automation.
## Safe Workflow
1. Run `legal-citation-comprehensive`.
- Diagnose each messy footnote or citation candidate.
- Search the full handbook index for non-trivial or unusual sources.
- Produce either final citation text or a `[待补]` checklist.
2. Prepare a citation insertion plan.
- Each item must include the exact body text anchor or paragraph/run location.
- Each item must include final footnote text.
- If source facts are missing, stop and return a report instead of editing the DOCX.
3. Insert footnotes using OOXML, preserving the existing document structure.
4. Verify:
- every `w:footnoteReference` has a matching `w:footnote`;
- separator IDs remain `-1` and `0`;
- generated replacement notes may start at `4+` as a conservative repair convention;
- footnote text style matches the target document/template;
- DOCX zip, content types, and relationships are valid.
## Input Contract
The safe input to an i