doc-audit
Skill0 starsChanged 31 days agoMITView on GitHub
Deterministic integrity check for contracts and legal documents (.docx, .md, .txt). A standard-library script finds defined terms that are undefined, unused or defined twice; cross-references to clauses or schedules that do not exist (reconstructing Word's automatic numbering); placeholders and drafting notes left in; ABN, ACN and NZBN numbers that fail their check digits; amounts in words that do not match the figures; party labels that drift; wrong-currency amounts; statutes, regulators and entity types from the wrong country; wrong-market spelling; missing execution blocks; and lists every authority for citation checking. Use before sending, signing or publishing any document, after every drafting or editing pass, and as the first step of any contract review.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- blueclover22/mw_agent_kittheir own version, first seen Nov 4, 2026
- florian101010/awesome-agentic-AI-coding-templatetheir own version, first seen Nov 1, 2026
- sunitghub/canon-skillstheir own version, first seen Oct 22, 2026
- jrittelmeyer/ai-dev-kittheir own version, first seen Oct 15, 2026
- bekalpaslan/promptlinetheir own version, first seen Oct 13, 2026
- tachyon-zcash/ragutheir own version, first seen Oct 8, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- PackmindHub/packmind★ 323same name
- tachyon-zcash/ragu★ 61same name
- bekalpaslan/promptline★ 13same name
- sunitghub/canon-skills★ 9same name
- florian101010/awesome-agentic-AI-coding-template★ 4same name
- Wubabalala/claude-skills★ 4same name
- ApurvBazari/claude-plugins★ 3same name
- blueclover22/mw_agent_kit★ 1same name
- jarosser06/drift★ 1same name
- jrittelmeyer/ai-dev-kit★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- adversarial-reviewSkill
- business-saleSkill
- business-setupSkill
- cite-checkSkill
- contract-reviewSkill
- disputesSkill
- draft-contractSkill
- employment-checkSkill
- fundraisingSkill
- ip-brandSkill
- jurisdiction-adaptSkill
- law-auSkill
- law-change-impactSkill
- law-nzSkill
- law-ukSkill
- law-usSkill
- lease-reviewSkill
- legal-adviceSkill
- legal-health-checkSkill
- legal-researchSkill
- marketing-complianceSkill
- nda-triageSkill
- privacy-complianceSkill
- redlineSkill
- scenario-testSkill
- sprintlaw-modeSkill
- website-complianceSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Always pass --jurisdiction for the governing law.
- Distinctive: line 18
Never call a document clean while errors remain.
- Very specific: line 27
Always pass --jurisdiction for the governing law: it turns on the wrong-jurisdiction, currency and spelling checks.
- Distinctive: line 47
Warnings: check each. Jurisdiction warnings for entity types (such as "Pty Ltd" in a New Zealand contract) are fine when that party really …
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Doc audit
Models and people both miss mechanical errors in long documents, because they read for meaning. A script does not. These are the errors that make a contract look careless to the other side and occasionally change its meaning: a cross-reference to a clause that was deleted, a capitalised term nobody defined, "ten thousand dollars ($1,000)", an Australian statute in a New Zealand contract.
Non-negotiables
- Always pass
--jurisdictionfor the governing law. - Never call a document clean while errors remain; justify each one you leave.
- A clean audit is mechanical only. Never present it as a legal review.
Run it
python3 scripts/docaudit.py <file.docx|.md|.txt> --jurisdiction au|uk|nz|us [--json]Always pass --jurisdiction for the governing law: it turns on the wrong-jurisdiction, currency and spelling checks.
What it checks
| Check | Severity | What it catches |
| Definitions | error / warn / info | Defined twice; defined but never used; capitalised as if defined but no definition; lowercase use of a defined term |
| Cross-references | error | "clause 7.4", "Schedule 3" with no matching provision (Word auto-numbering is reconstructed) |
| Placeholders | warn | [ ], [insert ...], TBC, XX, blank lines, merge fields, drafting notes |
| Identifiers | error | ABN, ACN, ARBN and NZBN check digits; UK and NZ company number format; EIN format |
| Amounts | error / warn | Words and figures disagree; currency symbols from another market |
| Parties | warn | Two labels for the same role (for example "Client" defined, "Customer" also used) |
| Jurisdiction | error / warn | Statutes, regulators, entity types and concepts from another of the four markets; "GDPR" without "UK GDPR" in a UK document |
| Spelling | info | American spelling in AU, UK or NZ documents and the reverse |
| Execution | info / warn | No signature block; a "deed" without deed execution wording |
| Authorities | list | Every Act, section, case and US citation found, for cite-check |
Read the results
- Errors: fix all of them unless you can say why it is not an error (for example a cross-reference to another document's clause).
- Warnings: check each. Jurisdiction warnings for entity types (such as "Pty Ltd" in a New Zealand contract) are fine when that party really is from that country; statute warnings almost never are, unless the deal is deliberately cross-border.
- Info: judgment. Lowercase "services" where "Services" is defined is often deliberate, but check the ones that matter.
- Authorities: hand the list to
cite-check.
Fix, then run it again until the errors are gone.
Reply
One or two lines: what was found, what was fixed, and any error or warning deliberately left with the reason; then the authorities list for cite-check. Do not paste the whole report to a client.
Limits
- Mechanical checks only. A clean audit says nothing about whether the terms are fair, enforceable or right for the client.
- Numbering reconstruction is best effort. Unusual list setups (legal numbering linked to custom styles, numbering restarts set by field codes) can produce false cross-reference errors; confirm against a rendered PDF before "fixing" a reference that looks right on the page.
- The definition heuristics favour common drafting patterns ("X" means; (the "X")). Unusual definition styles may show as undefined terms.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

