Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add NEU-ZHA/legal-ai-skills --skill legal-citation-automatorgit clone --depth 1 https://github.com/NEU-ZHA/legal-ai-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/neu-zha/legal-ai-skills/legal-citation-automator)<a href="https://agentmods.dev/skills/neu-zha/legal-ai-skills/legal-citation-automator"><img src="https://agentmods.dev/badge/skills/neu-zha/legal-ai-skills/legal-citation-automator/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/neu-zha/legal-ai-skills/legal-citation-automator"><img src="https://agentmods.dev/badge/skills/neu-zha/legal-ai-skills/legal-citation-automator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00121 | $0.01186 |
| Opus 5 | $0.00060 | $0.00593 |
| Sonnet 5 | $0.00024 | $0.00237 |
| Haiku 4.5 | $0.00012 | $0.00119 |
Grade A, and why
legal-citation-automator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
- 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.
- 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 multiple sources support the same anchor, combine them into one
footnote_textseparated by semicolons. Do not create two insertion items for the same sentence-final anchor. - If source facts are missing, stop and return a report instead of editing the DOCX.
- Insert footnotes using OOXML, preserving the existing document structure.
- Verify:
- every
w:footnoteReferencehas a matchingw:footnote; - separator IDs remain
-1and0; - 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.
- every
Input Contract
The safe input to an insertion script is a JSON array:
[
{
"anchor_text": "依《民法典》第153条第1款",
"placement": "after_anchor",
"footnote_text": "《中华人民共和国民法典》第153条:“……”",
"source_status": "verified"
}
]
Required fields:
anchor_text: exact text in the body, or an equivalent precise location object.placement:after_anchor,after_sentence, or a precise custom instruction.footnote_text: final text fromlegal-citation-comprehensive.source_status: must beverified; ifneeds_user_input, do not edit.
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/example_asset.txt 865 B
- references/api_reference.md 975 B
- references/citation_types.md 7.2 KB
- scripts/add_footnotes.py 14 KB runs code
- scripts/automate_citations.py 4.3 KB runs code
- scripts/diagnose_with_comprehensive.py 733 B runs code
- scripts/docx_compat_check.py 675 B runs code
- scripts/example.py 607 B runs code
- scripts/identify_citations.py 7.1 KB runs code
- scripts/parse_citation_handbook.py 8.7 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 13d ago First seen · 102 lines · 121 tokens per session scan A f468427fe96d
legal-citation-automator is a skill published in the GitHub repository NEU-ZHA/legal-ai-skills (64 stars, last pushed 23d ago), licensed MIT. It adds 121 tokens to every session and 1,186 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
html-ppt-zhangzara-stencil-tablet
A workplace-safety compliance review for a manufacturing regulator — findings, the evidence chain, and the corrective mandate. Built as a decision-grade policy briefing deck for regulator, plant leadership.
treatment-plans
Format and structurally validate local treatment-plan documentation after clinical decisions have already been supplied and verified by authorized licensed professionals. Use for source traceability, clinician-authored intervention records, goals and checkpoints, shared-decision records, reconciliation handoffs, and…
handbook-updates
Diff a proposed handbook change against the current version, flag ripple effects and state supplement impacts. Use when user says "update the handbook", "add this to the handbook", "handbook change", or has a policy ready for insertion.
software-copyright-materials
A workflow for creating Chinese application materials for software copyright registration from a real software project.
iflytek-contract-intelligence-review
A contract-review workflow for scanned or digital agreements. It can recognize document text, examine clauses, detect risks, check compliance, and create translation summaries; its output is for review and is not formal legal advice.
legal-writer
Legal document drafting -- contracts, memos, briefs, complaints, demand letters, opinions, discovery, settlements, ToS, privacy policies. Full pipeline: document structure, per-section writing, Bluebook citation, case law lookup (CourtListener API), regulation lookup (eCFR API), DOCX output, and TDD-style verification…