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/bug.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/bug)<a href="https://agentmods.dev/commands/paulieb89/uk-legal-mcp/bug"><img src="https://agentmods.dev/badge/commands/paulieb89/uk-legal-mcp/bug/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/bug"><img src="https://agentmods.dev/badge/commands/paulieb89/uk-legal-mcp/bug.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.00447 |
| Opus 5 | $0.00000 | $0.00224 |
| Sonnet 5 | $0.00000 | $0.00089 |
| Haiku 4.5 | $0.00000 | $0.00045 |
Grade A, and why
bug 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.
What it actually says
/bug — Fix a bug and lock it in as a test
The incident-to-eval flywheel. Never close a bug without completing all three steps. Argument: description of the bug.
Step 1: Reproduce and understand
- Find the exact failing case (input → wrong output)
- Identify the root cause in source code
- Check if this is a known antipattern (read
.claude/rules/for the relevant area)
Step 2: Write the failing test FIRST
Before touching the implementation:
- Add a test that captures the wrong behaviour (it should FAIL right now)
- Name it
test_<what_was_wrong>— e.g.test_legislation_citation_section_prefix_wrong - Run it to confirm it fails:
uv run pytest tests/test_<file>.py::test_<name> -v
Step 3: Fix the implementation
- Make the minimum change to fix the bug
python -m py_compileon the changed file- Run the new test — it should now PASS
- Run the full suite — nothing else should break:
uv run pytest -m "not live" -q
Step 4: Encode the invariant
If this bug class has occurred before or is likely to recur:
- Add a rule to the relevant
.claude/rules/<area>.mdfile - If it's a critical antipattern, add it to the root
CLAUDE.mdunder the relevant section
Commit format
fix(<module>): <what was wrong and what is now correct>
Fixes: <description of the failure>
Root cause: <one sentence>
Guard: <test name that locks this in>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
What NOT to do
- Do not fix the bug without a test — the next agent session won't know this class of bug exists
- Do not add a workaround at the prompt level — if the code is wrong, fix the code
- Do not close the bug before the full test suite passes
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 · 43 lines · 0 tokens per session scan A 973f4f1c7cfa
bug is a command published in the GitHub repository paulieb89/uk-legal-mcp (16 stars, last pushed 7d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 447 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
bugfix
Bug fix workflow: root cause analysis → user review → regression test + fix via TDD.
fix
Correction automatisee des bugs identifies par la QA Recette.
hatch3r-bug-pipeline
Run a known-cause bug fix through a 3-phase test-first pipeline -- reproduce + root-cause, regression-test + fix together, then root-cause-depth review -- with full sub-agent delegation.
qa
Validate an application against a Gherkin user story by spawning a QA team that drives the running app.
bugfix
Regression-test-first bug fixing workflow with smart SpecSwarm/SpecTest integration.
do-execute-qa-bugfix
Recebe o caminho de um arquivo de bug em qa-bugs/, analisa a causa raiz, implementa a correção com testes de regressão, valida a suite de testes e atualiza o status do arquivo. Invoque uma vez por bug.