fix

A bug-fixing playbook for tracing an issue to its underlying cause, changing the relevant code, testing the fix, and documenting the result.

In plain words
What is it for?
Use it to investigate reported errors, reproduce problems, write regression tests, and review a completed fix.
Why use it?
It reduces the risk of patching only the visible symptom and leaving the real bug in place.

Command for Claude Code

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/codeverbojan/claude-code-kickstart/fix
Clone the repo
git clone --depth 1 https://github.com/codeverbojan/claude-code-kickstart

Made for: Claude Code.

Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 517 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.00014 $0.00517
Opus 5 $0.00007 $0.00259
Sonnet 5 $0.00003 $0.00103
Haiku 4.5 $0.00001 $0.00052

Measured yesterday against content hash 1abd5b0b1846, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

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.

.claude/commands/fix.md · 57 lines

What it actually says

Bug Fix Playbook

Fix the root cause, not the symptom. Trace first, always — otherwise you'll fix the wrong thing and the real bug will come back.

This playbook runs under CLAUDE.md §4 Execution Loop: one fix, tests in the same turn, parallel review before closing.

1. Trace

  • Read the raw error output / bug report. Work from data, not theories.
  • Reproduce the issue. If you can't, ask for steps or logs before guessing.
  • Identify the root-cause file(s). Grep for relevant symbols; for non-trivial traces, prefer SocratiCode (codebase_search, codebase_graph_query).
  • State the root cause in one sentence. Write it down — review agents will check against it.

2. Scope

  • Name the exact file(s) you will edit. No others.
  • State the fix in one sentence before touching code.
  • If the fix touches >3 files, pause and confirm scope with the user.

3. Fix + test

  • Fix the root cause.
  • Write a regression test in the same turn — one that would have caught this bug. If the project has no test infra, state so explicitly.
  • Update related tests if behavior legitimately changed.

4. Checkpoint review (parallel)

Spawn in a single message:

  • code-reviewer — did the fix address the stated root cause?
  • test-runner — full suite passes, regression test actually covers the bug.
  • security-reviewer — if the bug touched auth, inputs, DB, or APIs.
  • accessibility-reviewer — if the bug is in a UI component.

Give every reviewer the root-cause sentence from step 1 + the files touched. Fix all valid findings before reporting done.

5. Report (use the §4 format)

Task: <one-line bug description>
Implementation: <root cause + fix in 1-2 lines>
Tests: <regression test added, suite pass/fail>
Review findings: <bullets, or "clean">
Fixes: <response to findings, or "none">
Status: <complete | blocked: reason>

6. Document

If the bug came from a non-obvious pattern, append a rule to gotchas.md.

$ARGUMENTS

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. yesterday First seen · 57 lines · 14 tokens per session scan A 1abd5b0b1846

Subscribe to this mod's changes

fix is a command published in the GitHub repository codeverbojan/claude-code-kickstart (2 stars, last pushed 4mo ago), licensed MIT. It adds 14 tokens to every session and 517 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.