ai-task-master: Command for Claude Code

.claude/commands/fix-bug.md

fix-bug is a command for Claude Code from developerz-ai/ai-task-master. It costs 56 tokens per session (1,671 once invoked), scanned A, original, MIT.

A command workflow for investigating and fixing a reported software bug from its symptoms or logs through testing and delivery.

In plain words
What is it for?
Use it to diagnose failures, add regression tests, check related code for the same bug, verify with Bun and Node, and optionally prepare a pull request or release.
Why use it?
It helps find the underlying cause instead of only hiding the visible error, while checking that the bug does not return.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

This is developerz-ai/ai-task-master's own configuration. It tells Claude Code how to work on ai-task-master 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 ai-task-master configures →

Reuse

Borrowing it

Nothing to install: this file belongs to developerz-ai/ai-task-master. 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/developerz-ai/ai-task-master/main/.claude/commands/fix-bug.md
Clone the repo
git clone --depth 1 https://github.com/developerz-ai/ai-task-master

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/developerz-ai/ai-task-master/fix-bug/github.svg)](https://agentmods.dev/commands/developerz-ai/ai-task-master/fix-bug)
Your own site
<a href="https://agentmods.dev/commands/developerz-ai/ai-task-master/fix-bug"><img src="https://agentmods.dev/badge/commands/developerz-ai/ai-task-master/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/developerz-ai/ai-task-master/fix-bug"><img src="https://agentmods.dev/badge/commands/developerz-ai/ai-task-master/fix-bug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 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,671 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00056 $0.01671
Opus 5.5 $0.00022 $0.00668
Sonnet 5.5 $0.00011 $0.00334
Haiku 4.5 $0.00006 $0.00167

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

Security

Grade A, and why

fix-bug scanned grade A with 1 finding 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

**OpenRouter only** — no Anthropic SDK, ever; inference flows through `Credentials` (`OPENROUTER_API_KEY`). **SOLID / SRP** — one responsibility per module. **Every module ships a paired `*.test.ts` — no test, no merge.*
.claude/commands/fix-bug.md · 49 lines

How it starts

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

/fix-bug

You are a senior engineer on the aitm team debugging a reported defect. Take it from symptom to merged-and-shipped. Read CLAUDE.md first. The sibling /feature command is the map for the PR/merge/release mechanics — this command differs in the front half: diagnose before touching anything.

Bug report

$ARGUMENTS

The prompt is the context — read the intent. A pasted log or stack trace is the primary evidence; quote the exact failing line back in your diagnosis. "Fix and release" / "all pushed all merged" → run start-to-finish autonomously, merge on green, no check-ins. A tentative "I think X is broken" → confirm the diagnosis with the user before fixing. Always stop for a true blocker (irreversible action outside the ask — an npm publish above all — credential risk, a policy violation from Hard rules).

The flow

  1. Reproduce the failure in your head first. Locate the code that raised — grep the message verbatim; a TypeScript message pins the operation (Cannot read properties of undefined, a Zod safeParse failure naming the field, an execa non-zero exit). Read the whole function and its callers until you can narrate the failing path end to end: which input, which line, why. Name the root cause, not the symptom — the throw site is where it surfaced, not where it went wrong. codegraph_explore gets you the symbol plus its call paths in one hop.

  2. Understand the blast radius. A bug rarely lives alone:

    • What does the failure do downstream? A swallowed rejection inside WorkLoop becomes a stalled or hot-looping run; a mis-parsed gh payload silently merges the wrong thing. The secondary defect is often worse than the primary.
    • Is there a bug family? Fan out Task Explore agents to sweep for the same pattern elsewhere — an optional field read without a guard under exactOptionalPropertyTypes, a gh --json field assumed present that GitHub sends null, a poll loop with no bound, an await missing in a finally. Fix genuine siblings in the same PR; note-and-skip cosmetic ones, or fix them if trivial.

Read the full file on GitHub · 49 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 · 49 lines · 56 tokens per session scan A e43611446b27

Subscribe to this mod's changes

fix-bug is a command published in the GitHub repository developerz-ai/ai-task-master (5 stars, last pushed 3d ago), licensed MIT. It adds 56 tokens to every session and 1,671 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

fix-bug compared with commands from other repositories

fix-bug next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fix-bugdeveloperz-ai/ai-task-masterCommand53d agoMITA56Claude Code
fix-issuescan1357/oh-my-piCommand38kyesterdayMITA0Claude Code
investigatecoleam00/ArchonCommand24k2d agoMITA0Claude Code
maintainer-review-error-handlingcoleam00/ArchonCommand24k2d agoMITA25Claude Code
cleanupcan1357/oh-my-piCommand38kyesterdayMITA0Claude Code
review-errorscoleam00/ArchonCommand24k2d agoMITA0Claude Code
doctorashlrai/ashlr-stackCommand2todayMITA11Claude Code