bug-fix

bug-fix is a command for coding agents from mjmorales/claude-prove. It costs 10 tokens per session (990 once invoked), scanned A, original, MIT.

A step-by-step debugging command that tests one possible cause at a time. It gathers the bug details first, then records each hypothesis, test, and result.

In plain words
What is it for?
Use it to investigate incorrect behavior, confirm how to reproduce a bug, trace when it began, test possible causes, and backtrack when evidence rules one out.
Why use it?
It prevents unfocused changes and helps identify the actual cause before applying a fix.

Command

Part of the prove plugin — 25 skills, 30 commands, 21 agents, 5 hooks, 1 MCP server shipped together

Install

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.

agentmods
npx agentmods add commands/mjmorales/claude-prove/bug-fix
Clone the repo
git clone --depth 1 https://github.com/mjmorales/claude-prove

Or install prove, the plugin that ships this one along with the rest of its 25 skills, 30 commands, 21 agents, 5 hooks, 1 MCP server.

Wrote 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.

agentmods badge for bug-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/mjmorales/claude-prove/bug-fix.svg)](https://agentmods.dev/commands/mjmorales/claude-prove/bug-fix)
Your own site
<a href="https://agentmods.dev/commands/mjmorales/claude-prove/bug-fix"><img src="https://agentmods.dev/badge/commands/mjmorales/claude-prove/bug-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 990 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00010 $0.00990
Opus 5 $0.00005 $0.00495
Sonnet 5 $0.00002 $0.00198
Haiku 4.5 $0.00001 $0.00099

Measured 4d ago against content hash 82b8fc2239da, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bug-fix 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 4d 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.

commands/bug-fix.md · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Debugging Protocol

You are a systematic debugger. Find root cause through disciplined, sequential investigation. One hypothesis at a time. No fixes until root cause is confirmed.

Rules

  1. One branch at a time. Follow a single chain to conclusion before trying another.
  2. No jumping ahead. Do not apply fixes until root cause is confirmed.
  3. Exhaust before backtracking. Abandon a hypothesis only when evidence disproves it.
  4. Backtrack one step. Return to the last decision point, not the beginning.
  5. Log everything. Every hypothesis, test, and outcome goes in the debug log.

Phase 0: Gather Requirements

Do not read code yet. Get answers to these questions first:

  1. What is the bug? — Precise description of incorrect behavior.
  2. Expected behavior? — What should happen instead.
  3. Reproduction steps? — Exact steps, commands, or inputs.
  4. When did it start? — What changed? (commit, dependency, config)
  5. What have you tried? — Avoid re-treading ground.

If $ARGUMENTS contains a bug description, use it as starting point but confirm missing details.

Summarize the bug in one sentence. Get user confirmation before proceeding.

Phase 1: Initialize Debug Log

Create .prove/debug-log.md:

# Debug Log

## Bug
[One-sentence summary from Phase 0]

## Reproduction
[Steps from Phase 0]

## Environment
[Relevant versions, OS, branch, recent commits]

## Investigation

### Branch 1: [hypothesis name]
**Hypothesis:** [what you think is wrong and why]
**Evidence for:** [what supports this hypothesis]
**Tests:**
- [ ] [test description] -> [outcome]
**Verdict:** [CONFIRMED / DISPROVED / INCONCLUSIVE]
**Next:** [what follows from this verdict]

Fill in Bug, Reproduction, and Environment now.

Phase 2: Form First Hypothesis

  1. Identify symptom location — where does incorrect behavior manifest? Read that code.
  2. Trace one level back — what feeds into that location? Read that code.
  3. Form hypothesis — a falsifiable claim about what is wrong and why.

Read the full file on GitHub · 124 lines

Changes

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.

  1. 4d ago First seen · 124 lines · 10 tokens per session scan A 82b8fc2239da

Subscribe to this mod's changes

bug-fix is a command published in the GitHub repository mjmorales/claude-prove (2 stars, last pushed 25d ago), licensed MIT. It adds 10 tokens to every session and 990 once invoked, about $0.0001 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-31.