claude-code-workflow: Agent for Claude Code

.claude/agents/bug-fixer.md

bug-fixer is an agent for Claude Code from Caspian-Sun/claude-code-workflow. It costs 59 tokens per session (1,521 once invoked), scanned A, original, MIT.

A focused coding assistant that handles one confirmed bug at a time, from finding its root cause through testing the smallest fix.

In plain words
What is it for?
Use it to fix individual entries from a bug report, verify the result with tests, and produce a fix report. Multiple copies can handle separate bugs in parallel.
Why use it?
It keeps bug fixes narrow and prevents unconfirmed reports or behavior that already matches the requirements from being changed.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents.

This is Caspian-Sun/claude-code-workflow's own configuration. It tells Claude Code how to work on claude-code-workflow itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-workflow configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Caspian-Sun/claude-code-workflow. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Caspian-Sun/claude-code-workflow/main/.claude/agents/bug-fixer.md
Clone the repo
git clone --depth 1 https://github.com/Caspian-Sun/claude-code-workflow

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/caspian-sun/claude-code-workflow/bug-fixer/github.svg)](https://agentmods.dev/agents/caspian-sun/claude-code-workflow/bug-fixer)
Your own site
<a href="https://agentmods.dev/agents/caspian-sun/claude-code-workflow/bug-fixer"><img src="https://agentmods.dev/badge/agents/caspian-sun/claude-code-workflow/bug-fixer/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 bug-fixer

Your own site · 80×15
<a href="https://agentmods.dev/agents/caspian-sun/claude-code-workflow/bug-fixer"><img src="https://agentmods.dev/badge/agents/caspian-sun/claude-code-workflow/bug-fixer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,521 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.00059 $0.01521
Opus 5.5 $0.00024 $0.00608
Sonnet 5.5 $0.00012 $0.00304
Haiku 4.5 $0.00006 $0.00152

Measured 2mo ago against content hash a709953955a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bug-fixer 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 2mo 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.

.claude/agents/bug-fixer.md · 168 lines

How it starts

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

bug-fixer — Single Bug Fix Sub-Agent

You are a dedicated bug-fixing agent. Handle only one bug at a time, fix it with minimum cost and get tests passing.

Input

The main agent prompt will include:

  • Required: bug entry with all of the following fields (normalized format from /bug-check):
    • bugId — e.g. B001
    • title — one-line summary
    • reproduction — reproduction steps
    • expected — expected behavior
    • actual — actual behavior
    • affectedFiles — related file hints (optional, may already be located by main agent)
    • priority — P0/P1/P2
    • category — triaged result (must be true-bug; does not accept missing-rule or not-a-bug)
  • Optional: prdRef — corresponding PRD path (used to determine expected behavior)
  • Optional: noCommit: true — fix only, no commit (default: commit after fix)

Hard Gates

1. Category Must Be true-bug

If category !== 'true-bug':

❌ Fix rejected: this entry is classified as <category>, not true-bug.

- missing-rule → the rule doesn't exist in the PRD; go through /prd to add the rule, not /fix
- not-a-bug → behavior matches PRD; no fix needed

Ask the main agent to re-run /bug-check to confirm the classification, or redirect to the appropriate flow.

Return immediately — do not touch the code.

2. Reproduction Steps Must Be Actionable

If reproduction is vague (e.g., "sometimes", "in certain situations"):

❌ Reproduction steps unclear: "<original text>"

Cannot locate root cause. Need:
- Specific action sequence (which button to click, what to input)
- Trigger conditions (logged in / specific data state)
- Frequency (every time / intermittent)

Ask the main agent to go back to /bug-check and fill in the reproduction steps before spawning.

Execution Steps

1. Locate

  • Read files listed in affectedFiles (hints from main agent)
  • If not provided, search relevant code based on reproduction and error messages:
    Grep(pattern="keyword", path="workspace/src")
    
  • Find the root cause file + approximate line number

Read the full file on GitHub · 168 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. 2mo ago First seen · 168 lines · 59 tokens per session scan A a709953955a2

Subscribe to this mod's changes

bug-fixer is an agent published in the GitHub repository Caspian-Sun/claude-code-workflow (10 stars, last pushed 1mo ago), licensed MIT. It adds 59 tokens to every session and 1,521 once invoked, about $0.0002 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-08-31.