Borrowing it
Nothing to install: this file belongs to paulieb89/uk-legal-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/paulieb89/uk-legal-mcp/main/.claude/commands/audit.mdgit clone --depth 1 https://github.com/paulieb89/uk-legal-mcpWrote 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/commands/paulieb89/uk-legal-mcp/audit)<a href="https://agentmods.dev/commands/paulieb89/uk-legal-mcp/audit"><img src="https://agentmods.dev/badge/commands/paulieb89/uk-legal-mcp/audit/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/commands/paulieb89/uk-legal-mcp/audit"><img src="https://agentmods.dev/badge/commands/paulieb89/uk-legal-mcp/audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00000 | $0.00519 |
| Opus 5 | $0.00000 | $0.00260 |
| Sonnet 5 | $0.00000 | $0.00104 |
| Haiku 4.5 | $0.00000 | $0.00052 |
Grade A, and why
audit 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 12d 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 — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/audit — Conformance check before starting work
Run a full conformance audit of the uk-legal-mcp server. Report PASS / WARN / FAIL per check. Do not start any implementation work until this audit is complete.
Step 1: Syntax check all source modules
python -m py_compile src/gateway.py
python -m py_compile src/deps.py
python -m py_compile src/envelope.py
python -m py_compile src/xml_safe.py
for each file in src/modules/**/tools.py:
python -m py_compile <file>
Report: PASS if all compile clean, FAIL with filenames if any fail.
Step 2: Run the non-live test suite
uv run pytest -m "not live" -q
Report: PASS with count, or FAIL with the first failure output.
Step 3: Check tool description conformance
uv run python tests/audit_descriptions.py
Report: PASS if all descriptions follow 4-part pattern, WARN with list of deviating tools.
Step 4: Parliament param audit (static, no network)
uv run python tests/audit_parliament_params.py
Report: PASS if no wire-name mismatches, WARN with specific param names that diverge from Swagger.
Step 5: Parliament response field audit (static, no network)
uv run python tests/audit_parliament_responses.py
Report: PASS if no schema mismatches, WARN with field names that are consumed but undeclared.
Step 6: Check for known antipatterns in source
Search src/ for:
RuntimeErrorin tools — should beToolError(WARN with locations)lxml.etree.fromstringdirectly — should useparse_xmlfrom xml_safe (FAIL if found)ctx.request_context.lifespan_state— removed v2 API (FAIL if found)
Final output
Print a summary table:
| Check | Status | Notes |
|---|---|---|
| Syntax | ... | ... |
| Non-live tests | ... | ... |
| Description conformance | ... | ... |
| Parliament params | ... | ... |
| Parliament responses | ... | ... |
| Antipattern scan | ... | ... |
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.
- 12d ago First seen · 59 lines · 0 tokens per session scan A e2a1cd72cbfb
audit is a command published in the GitHub repository paulieb89/uk-legal-mcp (16 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 519 tokens. 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 commands, from other repositories
tax-planning
Optimize tax liability or ensure tax compliance.
contract-review-checklist
Extract the terms that matter from an agreement and flag deviations for a lawyer, without giving legal advice.
preflight
Audit a build against App Review rejection triggers by app type before submitting.
privacy-check
Scan for required-reason API usage and verify PrivacyInfo.xcprivacy completeness before submission.
rejection-recovery
Diagnose an App Review rejection, draft a Resolution Center response, and plan the fix.
lease-accounting
Account for leases under IFRS 16 or ASC 842.