bugfix

A small bug-fixing workflow that reproduces a problem, confirms its underlying cause, applies a test-first fix, and verifies the result. Test-first means writing or updating a test that captures the failure before changing the implementation.

In plain words
What is it for?
Use it for a reported error or failing behaviour when you need a deterministic reproduction, a confirmed diagnosis, a minimal fix, and proof after the change.
Why use it?
It prevents guessed fixes that hide the symptom without removing the actual cause, and leaves a repeatable check that the problem is gone.

Skill for Claude CodeCodex

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 skills/duthaho/skillhub/bugfix
Any agent
npx skills add duthaho/skillhub --skill bugfix
Clone the repo
git clone --depth 1 https://github.com/duthaho/skillhub

Made for: Claude Code, Codex.

Per session 192 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,909 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00192 $0.01909
Opus 5 $0.00096 $0.00955
Sonnet 5 $0.00038 $0.00382
Haiku 4.5 $0.00019 $0.00191

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

Security

Grade A, and why

bugfix scanned grade A with 1 finding 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 2d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

test invocation, a curl, a click path, a `git bisect run` harness —
.claude/skills/bugfix/SKILL.md · 147 lines

How it starts

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

bugfix — reproduce, root-cause, fix, prove

/bugfix <symptom / error / failing thing>

Answer one question: why does this actually happen, and what's the minimal fix that provably removes it? The order is non-negotiable — reproduce before diagnosing, diagnose before fixing, prove after fixing. A fix without a confirmed root cause is a guess wearing a commit message.

Step 0 — Check the log

Read out/dev/bugfix-log.md if it exists. A similar symptom fixed before is the best diagnostic head start there is — past root causes cluster ("we've had three timezone bugs in this module"). Mention any match. Also skim recent git log — a bug that appeared recently usually shipped recently.

Step 1 — Reproduce (before touching any code)

Turn the report into a deterministic reproduction: a command, a failing test invocation, a curl, a click path, a git bisect run harness — something that fails on demand and will pass when the bug is dead.

  • The gate is checkable: a command you have already run at least once, with the invocation and its output pasted. That output is the baseline the fix is judged against — a repro described but never run doesn't count.
  • Redact before you paste. Shown output travels — into chat, out/dev/bugfix-log.md, commit messages — so replace every secret with <REDACTED> before showing it, build repro loops against env vars so the credential stays in the environment rather than in the command line, and quote only the signal-carrying lines of a captured artifact (auth headers rarely carry signal). If the redacted output isn't enough to diagnose, say so and ask.
  • Tighten the loop — Step 2 re-runs it on every hypothesis, so its speed is your debugging speed: faster, sharper signal, more deterministic (pin time, seed RNG, isolate the filesystem).
  • Minimise (skip when the repro is already one obvious line): cut inputs, steps, config, and data one at a time, re-running after each cut, until every remaining element is load-bearing. A minimal repro shrinks the hypothesis space and becomes Step 3's failing test nearly for free.
  • Can't reproduce it? Stop. Report what was tried, what extra information would help (versions, data, environment, timing), and ask. Do not fix code you can't watch fail — "fixed" without a repro is unfalsifiable.
  • Flaky bug? Don't settle for noting the failure rate — raise it: loop the trigger, pin nondeterminism until it fails most runs. A 50% flake is debuggable; a 1% flake is not. The fix is judged against the same rate.

Read the full file on GitHub · 147 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. 2d ago First seen · 147 lines · 192 tokens per session scan A 208898bb19cd

Subscribe to this mod's changes

bugfix is a skill published in the GitHub repository duthaho/skillhub (9 stars, last pushed 9d ago), licensed MIT. It adds 192 tokens to every session and 1,909 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.