fix-bug

fix-bug is a command for Claude Code from strikersam/autonomous-ai-agency. It costs 0 tokens per session (586 once invoked), scanned A, original, MIT.

A bug-fixing command that reproduces a reported problem, writes a failing test, applies a focused fix, and verifies the result.

In plain words
What is it for?
Investigating errors, isolating their cause, implementing a minimal fix, and adding regression coverage.
Why use it?
It turns a bug report into a repeatable test so the fix can be checked and preserved against regression.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Investigating errors, isolating their cause, implementing a minimal fix, and adding regression coverage.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/strikersam/autonomous-ai-agency/fix-bug
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.

Clone the repo
git clone --depth 1 https://github.com/strikersam/autonomous-ai-agency

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/strikersam/autonomous-ai-agency/fix-bug/github.svg)](https://agentmods.dev/commands/strikersam/autonomous-ai-agency/fix-bug)
Your own site
<a href="https://agentmods.dev/commands/strikersam/autonomous-ai-agency/fix-bug"><img src="https://agentmods.dev/badge/commands/strikersam/autonomous-ai-agency/fix-bug/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 fix-bug

Your own site · 80×15
<a href="https://agentmods.dev/commands/strikersam/autonomous-ai-agency/fix-bug"><img src="https://agentmods.dev/badge/commands/strikersam/autonomous-ai-agency/fix-bug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 586 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.00000 $0.00586
Opus 5 $0.00000 $0.00293
Sonnet 5 $0.00000 $0.00117
Haiku 4.5 $0.00000 $0.00059

Measured 6d ago against content hash 72b793a3970f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 6d 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/commands/fix-bug.md · 78 lines

How it starts

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

/fix-bug — Bug Fix Agent

Systematically reproduce, isolate, fix, test, and document a bug.

Usage

/fix-bug <description or issue number>

Process

  1. Understand the bug

    • Read the issue description or error carefully
    • Identify the affected module using graphify:
    graphify query "<error message or symptom>"
    
    • Read the affected file(s)
  2. Reproduce

    • Write a minimal reproduction case
    • Confirm the bug exists by running the reproduction:
    pytest -x tests/test_<module>.py::test_<case> -v
    
    • If no existing test covers it, write a NEW failing test first
  3. Write a failing test BEFORE fixing

    def test_<bug_description_snake_case>() -> None:
        """Regression test for <issue description>."""
        # Arrange: set up the scenario that causes the bug
        # Act: trigger the buggy behavior
        # Assert: verify the expected (correct) behavior
        assert result == expected  # This should FAIL before the fix
    

    Confirm it fails: pytest -x tests/test_<module>.py::test_<bug> → RED

  4. Implement the fix

    • Make the minimal change needed to fix the bug
    • Do NOT refactor, clean up, or change adjacent code
    • Do NOT fix other bugs while fixing this one
  5. Verify the fix

    # The new test should now pass
    pytest -x tests/test_<module>.py::test_<bug>
    # Full suite should still pass
    pytest -x
    
  6. Update changelog Add to docs/changelog.md under ## [Unreleased] → ### Fixed:

    - **`<file.py>` — <short description of bug>.** <Brief explanation of root cause and fix>.
    
  7. Commit

    git add <affected files> docs/changelog.md
    git commit -m "fix(<module>): <short description>"
    

Rules

  • NEVER fix by deleting the failing test
  • NEVER widen error catching to suppress the symptom
  • NEVER increase timeouts as a fix
  • ALWAYS reproduce first (failing test), then fix
  • If the fix affects a RISKY MODULE, invoke risky-module-review before merging

Read the full file on GitHub · 78 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. 6d ago First seen · 78 lines · 0 tokens per session scan A 72b793a3970f

Subscribe to this mod's changes

fix-bug is a command published in the GitHub repository strikersam/autonomous-ai-agency (8 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 586 tokens. 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.