fix-bug

A guided debugging assistant that investigates unexpected behavior, errors, crashes, and failing tests. It traces the relevant code, identifies the underlying cause, and prepares a fix with tests.

In plain words
What is it for?
Use it to investigate a reported bug, trace how data moves through code, write a test that exposes the problem, and check the proposed fix.
Why use it?
It reduces guesswork when a problem is difficult to reproduce or understand. A regression test helps ensure the same bug does not return.

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/soulcodex/agentic/fix-bug
Any agent
npx skills add soulcodex/agentic --skill fix-bug
Clone the repo
git clone --depth 1 https://github.com/soulcodex/agentic

Made for: Claude Code, Codex.

Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 525 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.00054 $0.00525
Opus 5 $0.00027 $0.00262
Sonnet 5 $0.00011 $0.00105
Haiku 4.5 $0.00005 $0.00052

Measured 2d ago against content hash 6cc1c42f6ddf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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.

skills/development/fix-bug/SKILL.md · 75 lines

What it actually says

Fix Bug Skill

Investigate and fix the reported bug systematically.

Step 1 — Understand the Bug

Gather:

  • What is the expected behavior?
  • What is the actual behavior?
  • How is it reproduced? (steps, input, environment)
  • Is there an error message, stack trace, or failing test?

If this information is missing, ask the user before proceeding.

Step 2 — Locate the Root Cause

Read the relevant code:

  1. Start at the reported error location or the code path described in reproduction steps.
  2. Trace upward through callers to understand context.
  3. Trace downward through callees to understand what data flows in.
  4. Look for: off-by-one, null dereference, wrong conditional, missing error handling, incorrect assumption about external behavior, race condition.

State the root cause explicitly before writing any fix:

"Root cause: The findUser function assumes the result is never null, but the database returns null when no row matches. The null propagates to user.email access, causing the crash."

Step 3 — Write a Failing Test First (if no test exists)

Before fixing, write a test that reproduces the bug and currently fails. This proves you understand the bug and prevents regression.

Step 4 — Fix

Apply the minimal fix that addresses the root cause. Do not refactor surrounding code unless it is directly related to the bug.

Step 5 — Verify

Run the test written in Step 3 — it must now pass. Run the full test suite — no regressions introduced.

Step 6 — Summarize

Output:

## Bug Fix Summary

**Root cause**: [One sentence]
**Fix**: [What was changed and why]
**Test added**: [File and test name]
**Regression risk**: [None / Low / Medium — explain if not None]
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 · 75 lines · 54 tokens per session scan A 6cc1c42f6ddf

Subscribe to this mod's changes

fix-bug is a skill published in the GitHub repository soulcodex/agentic (10 stars, last pushed 2d ago), licensed MIT. It adds 54 tokens to every session and 525 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

research-repository

Build a repository that makes findings findable, reusable, and cumulative across teams. Use when the same research keeps getting redone. For synthesising one study, use affinity-diagram.

Owl-Listener/designer-skills · 43 tokens

survey-design

Design unbiased survey instruments — question wording, scales, and sampling — to measure attitudes at scale. Use when you need quantitative breadth. For behavioural experiments, use a-b-test-design (prototyping-testing).

Owl-Listener/designer-skills · 47 tokens

localization-design

Design for multiple languages, writing directions, and cultural contexts — text expansion, RTL mirroring, and locale formats. Use when shipping beyond one locale. For the words themselves, use ux-writing (designer-toolkit).

Owl-Listener/designer-skills · 49 tokens

design-negotiation

Advocate for design quality, scope, and timeline with partners and leadership using evidence and shared goals. Use in the conversation itself. For the commercial vocabulary behind it, use business-design (ux-strategy).

Owl-Listener/designer-skills · 48 tokens

design-debt-audit

Inventory and prioritise accumulated design inconsistencies across a product. Use when drift has built up over time. For token coverage specifically use design-token-audit (designer-toolkit); for WCAG gaps use accessibility-audit (design-systems).

Owl-Listener/designer-skills · 59 tokens

design-impact-reporting

Communicate design's contribution to business and user outcomes in stakeholder language. Use when reporting results upward. For choosing the metrics in the first place, use metrics-definition (ux-strategy).

Owl-Listener/designer-skills · 44 tokens