fix-bug

fix-bug is a skill for Claude Code, Codex from mgiovani/cc-arsenal. It costs 94 tokens per session (2,592 once invoked), scanned A, original, MIT.

A bug-fixing workflow that uses test-driven debugging, meaning it first creates or finds a test that demonstrates the failure. It then finds the underlying cause, makes the smallest fix, and checks the tests again.

In plain words
What is it for?
Use it to investigate errors, failing tests, reported bugs, and other software defects.
Why use it?
It prevents guessed fixes by requiring evidence that the bug occurs and that the change resolves it without unrelated refactoring.

Skill for Claude CodeCodex

Part of the cc-arsenal plugin — 53 skills 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 skills/mgiovani/cc-arsenal/fix-bug
Any agent
npx skills add mgiovani/cc-arsenal --skill fix-bug
Clone the repo
git clone --depth 1 https://github.com/mgiovani/cc-arsenal

Made for: Claude Code, Codex.

Or install cc-arsenal, the plugin that ships this one along with the rest of its 53 skills.

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/mgiovani/cc-arsenal/fix-bug.svg)](https://agentmods.dev/skills/mgiovani/cc-arsenal/fix-bug)
Your own site
<a href="https://agentmods.dev/skills/mgiovani/cc-arsenal/fix-bug"><img src="https://agentmods.dev/badge/skills/mgiovani/cc-arsenal/fix-bug.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,592 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.00094 $0.02592
Opus 5 $0.00047 $0.01296
Sonnet 5 $0.00019 $0.00518
Haiku 4.5 $0.00009 $0.00259

Measured 5d ago against content hash f090ec77d17b, 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 5d 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/fix-bug/SKILL.md · 195 lines

How it starts

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

Bug Fix

Fix the bug described by the user (a plain description, an issue ID, or a failing test name) using test-driven debugging: reproduce it, find the root cause with evidence, apply the smallest fix, verify, commit.

Anti-Hallucination Guidelines

A fix that "should work" but was never run against a failing test is a guess, not a fix:

  1. Reproduce first: don't fix what you haven't seen fail.
  2. Test-driven: write or locate a failing test before implementing the fix; confirm it actually fails.
  3. Verify root cause: locate the bug with grep/read evidence (file path, line number), not intuition.
  4. Verify the fix: run the full test suite; all tests must pass before calling the bug fixed.
  5. No invented fixes: only implement solutions that address the demonstrated root cause.
  6. Reference real code: never make claims about code you haven't read.

Workflow Mode: Inline by Default

Most bugs are a single file, single root cause, fixable and verifiable in one sitting. For those, run Phases 0–5 below yourself, in order, inline: no task chain, no subagent fan-out. That's the default; don't create tasks unless the case below applies.

Use a task chain instead when the bug spans multiple files/components, the root cause is unclear enough to need a dedicated analysis phase, or the fix will span multiple sessions and needs progress tracking across them. In that case, before Phase 0, create six tasks (Discovery, Reproduce & Analyze, Plan, Implement, Verify, Commit) with a strict sequential chain, each addBlockedBy the one before it:

TaskCreate: { subject: "Phase 0: Discover project workflow", activeForm: "Discovering project workflow" }
TaskCreate: { subject: "Phase 1: Reproduce and analyze bug", activeForm: "Analyzing bug" }
TaskCreate: { subject: "Phase 2: Plan fix", activeForm: "Planning fix" }
TaskCreate: { subject: "Phase 3: Implement fix", activeForm: "Implementing fix" }
TaskCreate: { subject: "Phase 4: Verify quality", activeForm: "Verifying fix quality" }
TaskCreate: { subject: "Phase 5: Final commit", activeForm: "Creating final commit" }
TaskUpdate: { taskId: "2", addBlockedBy: ["1"] }
TaskUpdate: { taskId: "3", addBlockedBy: ["2"] }
TaskUpdate: { taskId: "4", addBlockedBy: ["3"] }
TaskUpdate: { taskId: "5", addBlockedBy: ["4"] }
TaskUpdate: { taskId: "6", addBlockedBy: ["5"] }
TaskUpdate: { taskId: "1", status: "in_progress" }

Read the full file on GitHub · 195 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 195 lines · 94 tokens per session scan A f090ec77d17b

Subscribe to this mod's changes

fix-bug is a skill published in the GitHub repository mgiovani/cc-arsenal (7 stars, last pushed 5d ago), licensed MIT. It adds 94 tokens to every session and 2,592 once invoked, about $0.0005 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

Vibe Coding Mastery

The complete operating system for building software with AI. From first prompt to production deployment — prompting frameworks, architecture patterns, testing strategies, debugging playbooks, and production graduation checklists. Works with Claude Code, Cursor, Windsurf, Copilot, and any AI coding tool.

LeoYeAI/openclaw-master-skills · 61 tokens

afrexai-claude-code-production

Complete Claude Code productivity system — project setup, prompting patterns, sub-agent orchestration, context management, debugging, refactoring, TDD, and shipping 10X faster. Zero scripts needed.

LeoYeAI/openclaw-master-skills · 48 tokens

agentic-eval

Patterns and techniques for evaluating and improving AI agent outputs. Use this skill when: Implementing self-critique and reflection loops Building evaluator-optimizer pipelines for quality-critical generation Creating test-driven code refinement workflows Designing rubric-based or LLM-as-judge evaluation systems…

LeoYeAI/openclaw-master-skills · 86 tokens

contract

Outcome-driven Cortex function development — declares a behavioral contract before generation begins, enforces evidence-tiered proof before $ship, and defends against the self-oracle evaluation failure mode.

Snowflake-Labs/cocoplus · 38 tokens

spec-driven-development

Design and run a Spec-Driven Development (SDD) pipeline for AI software factories — where structured specifications are the input, AI agents generate the code, and quality gates enforce correctness at each phase: SPECIFY → DECOMPOSE → IMPLEMENT → VERIFY → DELIVER. Use when building or refining a spec-driven pipeline…

magnus919/agent-skills · 165 tokens

red-green-refactor

Guides the red-green-refactor TDD workflow: write a failing test first, implement the minimum code to make it pass, then refactor while keeping tests green. Use when a user asks to practice TDD, write tests first, follow red-green-refactor, do test-driven development, write failing tests before code, or phrases like…

rohitg00/skillkit · 90 tokens