fix-bug

fix-bug is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 68 tokens per session (1,428 once invoked), scanned A, original, Apache-2.0.

A method for fixing defective software by reproducing the problem, writing a test that exposes it, changing the cause, and keeping the test as a safeguard.

In plain words
What is it for?
Use it for crashes, wrong results, regressions, incident follow-ups, and behavior that fails only for particular inputs or conditions.
Why use it?
It prevents fixes based on guesses and helps show that the old behavior was wrong and the new behavior is correct. It also reduces the chance that the same bug returns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for crashes, wrong results, regressions, incident follow-ups, and behavior that fails only for particular inputs or conditions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmj-90/gaffer/fix-bug
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.

Any agent
npx skills add tmj-90/gaffer --skill fix-bug
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

Made for: Claude Code, Codex.

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 fix-bug

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/fix-bug/github.svg)](https://agentmods.dev/skills/tmj-90/gaffer/fix-bug)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/fix-bug"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/fix-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.

agentmods 80×15 button for fix-bug

Your own site · 80×15
<a href="https://agentmods.dev/skills/tmj-90/gaffer/fix-bug"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/fix-bug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,428 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00068 $0.01428
Opus 5.5 $0.00027 $0.00571
Sonnet 5.5 $0.00014 $0.00286
Haiku 4.5 $0.00007 $0.00143

Measured 16d ago against content hash 6ad034cbd927, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fix-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 16d 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.

runner/skills/fix-bug/SKILL.md · 94 lines

How it starts

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

Fix a bug — reproduce, isolate, fix the cause, guard

A bug fix is a claim: "this behaviour was wrong, and now it is right." The only proof a reviewer can check is a test that fails on the old code for the reported reason and passes on the new. Debugging is a search, so run it like an experiment: one hypothesis, one change, one observation at a time.

Steps

  1. Extract the facts; distrust the diagnosis. From get_ticket, write down the input, the expected result, the actual result, the environment, and how often it happens. The reporter's theory of the cause is a hint, not a conclusion. Call search_lore for known gotchas in this area — many bugs are a documented gotcha resurfacing.
  2. Reproduce it before changing anything. Drive the failing path with a scratch test or a command until you SEE the wrong behaviour. Then shrink the reproduction: remove inputs, steps and setup until removing one more makes the bug disappear. A minimal reproduction usually points straight at the cause.
    • Intermittent / "sometimes loses data" / "500 under load": assume shared state. Reproduce deterministically — fire two concurrent calls at the same resource (a barrier or Promise.all), fix the clock with a fake timer, or pause one party past a timeout (a lock holder that stalls past its lease). Guessing at a race is not a fix.
    • "This used to work": find the introducing commit with git bisect start <bad> <good> then git bisect run <test command> (keep the reproduction script untracked inside the worktree, never outside it — the hook blocks writes there; untracked files survive each bisect checkout — and delete it before your git add -A commit, or it ships in the diff). Always finish with git bisect reset and check git branch --show-current is the delivery branch again — the runner fails a delivery left on any other HEAD. The introducing diff names the cause.
  3. Write the regression test first. Encode the minimal reproduction as a permanent test at the lowest level that exposes it (unit for a function, integration if it needs the wiring). Name it after the behaviour, not the ticket number. Run it and confirm it FAILS for the reported reason — the assertion about the wrong result, not an import error, a missing fixture, or a timeout. Keep that output; it is half your evidence.
  4. Find the cause, not the symptom. Trace from the failing assertion back to the decision the code got wrong: a missing guard, an off-by-one boundary, an unhandled state, a non-atomic read-modify-write, a stale assumption about an API. Form one hypothesis, change one thing, re-run. If a change does not move the result, revert it before trying the next — stacked speculative edits hide the real fix.
  5. Fix minimally. Change only what the cause requires (the minimalism skill). A try/catch that hides the error, a special case for the reporter's exact input, or a retry around a race is a symptom patch, not a fix.
  6. Look for siblings. grep for the same call, the same boundary arithmetic, the same unguarded shared write. Fix identical instances only if they are the same bug; list the others as findings in your evidence rather than widening this diff.
  7. Prove it. Run the regression test (now passes), then the surrounding suite and lint once. For a concurrency or timing bug, run the new test in a loop (for i in {1..20}; do <cmd> || break; done) — a single green run proves nothing about a race.
  8. Guard the class. If a type, assertion, or validation would have made this bug impossible, add it when it is small and in the same code.

Read the full file on GitHub · 94 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. 16d ago Changed · +32 lines 6ad034cbd927
  2. 19d ago First seen · 62 lines · 68 tokens per session scan A 2bcaea05d3b4

Subscribe to this mod's changes

fix-bug is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 17d ago), licensed Apache-2.0. It adds 68 tokens to every session and 1,428 once invoked, about $0.0003 per session on Opus 5.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-09-28.

Related

Other skills, from other repositories

fix-bug

Run the Fix Validation pipeline to investigate, fix, and validate a bug. Ensures deterministic pipeline execution with IssueAnalyzer, FixWriter, TestWriter (conditional), TestAudit (conditional), and FixValidator stages.

QBall-Inc/the-bulwark · 46 tokens

debugging-test-failures

Systematically investigates failing tests, distinguishes between test bugs and implementation bugs, and drives a fix with verification. Use when the user wants to debug failing tests.

dork-labs/dorkos · 38 tokens

run-verification

Run the full verification pipeline (lint, unit tests, E2E if UI changed) — invoke after code changes.

anotherben/claude-harness · 27 tokens

test-audit

Audit test suites for T1-T4 violations using AST analysis, mock detection, and multi-stage synthesis. Invoke when user asks to audit tests, check test quality, find mock violations, review test effectiveness, or inspect test suites for over-mocking. Triggers automatic rewrites when quality gates fail.

QBall-Inc/the-bulwark · 0 tokens

mock-detection

Deep mock appropriateness analysis for Test Audit pipeline.

QBall-Inc/the-bulwark · 13 tokens

ralphctl-debugging-and-error-recovery

Systematic root-cause debugging. Use when tests fail, builds break, something that worked before broke, or behaviour does not match expectations — when you need to figure out what broke and why. Follow stop-the-line → reproduce → localize → reduce → root-cause → guard-with-regression-test → verify, not guessing; the…

lukas-grigis/ralphctl · 95 tokens