bug-fix

bug-fix is a command for coding agents from dykyi-roman/awesome-claude-code. It costs 12 tokens per session (1,330 once invoked), scanned A, original, MIT.

A command for diagnosing and fixing a software bug from a description, stack trace, log file, or file-and-line reference.

In plain words
What is it for?
Use it to trace failures, inspect logs, identify the faulty code, and apply a fix, with optional instructions such as scanning project logs or skipping tests.
Why use it?
It brings the relevant error context and source files together so the cause can be investigated systematically.

Command

Part of the acc plugin — 101 skills, 26 commands, 68 agents, 1 hook 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 commands/dykyi-roman/awesome-claude-code/bug-fix
Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

Or install acc, the plugin that ships this one along with the rest of its 101 skills, 26 commands, 68 agents, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/dykyi-roman/awesome-claude-code/bug-fix.svg)](https://agentmods.dev/commands/dykyi-roman/awesome-claude-code/bug-fix)
Your own site
<a href="https://agentmods.dev/commands/dykyi-roman/awesome-claude-code/bug-fix"><img src="https://agentmods.dev/badge/commands/dykyi-roman/awesome-claude-code/bug-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 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,330 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.00012 $0.01330
Opus 5 $0.00006 $0.00665
Sonnet 5 $0.00002 $0.00266
Haiku 4.5 $0.00001 $0.00133

Measured today against content hash 08c1c8e396b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

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.

commands/bug-fix.md · 194 lines

How it starts

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

Bug Fix Command

You are executing the /acc:bug-fix command. Your task is to diagnose and fix a bug using the bug fix system.

Input Received

User Input: $ARGUMENTS

Meta-Instructions: Parse any text after -- as meta-instructions (e.g., -- focus on validation, -- skip tests, -- dry-run).

Execution Flow

Step 1: Parse Input

Determine the input type:

  1. File:Line Reference (e.g., src/Domain/Order.php:45)

    • Read the file with context (±30 lines around the line)
    • Extract any description after the reference
  2. Stack Trace (contains Stack trace: or #0, #1, etc.)

    • Parse the trace to find origin file and line
    • Read the relevant files
  3. Log File Reference (starts with @)

    • Read the log file
    • Extract error messages and stack traces
  4. Auto-discover Logs (when -- scan-logs is specified or no @logfile provided with -- scan-logs)

    • Use acc:discover-project-logs skill via bug-hunter to find log files automatically
    • Prioritize by recency and severity
    • If no logs found, use AskUserQuestion:
      Question: "Log files not found automatically. Where are your project logs?"
      Options:
        - "storage/logs/" (Laravel)
        - "var/log/" (Symfony)
        - "writable/logs/" (CodeIgniter 4)
        - "runtime/logs/" (Yii2/Yii3)
      
  5. Text Description

    • Search codebase for relevant code
    • Use Grep to find mentioned classes/methods

Step 2: Invoke Bug Fix Coordinator

Use the acc:bug-fix-coordinator agent to orchestrate the full bug fix workflow:

Task tool with subagent_type="acc:bug-fix-coordinator"

prompt: |
  Fix the following bug:

  Input: [parsed input from Step 1]
  Code context: [relevant code]
  Meta-instructions: [any -- options]

  Execute full workflow:
  1. Diagnose with acc:bug-hunter
  2. Generate fix with acc:bug-fixer
  3. Create regression test with acc:test-generator (unless skip-tests)
  4. Apply changes (unless dry-run)
  5. Run tests and verify

Read the full file on GitHub · 194 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. today First seen · 194 lines · 12 tokens per session scan A 08c1c8e396b2

Subscribe to this mod's changes

bug-fix is a command published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 19d ago), licensed MIT. It adds 12 tokens to every session and 1,330 once invoked, about $0.0001 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-09-03.