fix

fix is a command for Claude Code from MadAppGang/magus. It costs 42 tokens per session (20,682 once invoked), scanned A, original, MIT.

A command that fixes bugs by reproducing them, identifying their cause, applying a patch, and checking the result with tests.

In plain words
What is it for?
Test-first bug fixing, root-cause analysis, regression checks, and optional monitoring after a fix.
Why use it?
It reduces the risk of treating symptoms as causes and helps verify that a fix does not break existing behavior.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the dev plugin — 19 skills, 15 commands, 12 agents shipped together

Good fit Test-first bug fixing, root-cause analysis, regression checks, and optional monitoring after a fix.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add MadAppGang/magus
Claude Code
/plugin install dev

Made for: Claude Code.

Or install dev, the plugin that ships this one along with the rest of its 19 skills, 15 commands, 12 agents.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/madappgang/magus/fix"><img src="https://agentmods.dev/badge/commands/madappgang/magus/fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 20,682 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.00042 $0.20682
Opus 5.5 $0.00017 $0.08273
Sonnet 5.5 $0.00008 $0.04136
Haiku 4.5 $0.00004 $0.02068

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

Security

Grade A, and why

fix 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

BASELINE=$(curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
plugins/dev/commands/fix.md · 1,580 lines

How it starts

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

<user_request> $ARGUMENTS </user_request>

<value_banner> Display this ONCE at the start of the command:

/dev:fix — Production-Grade Bug Fix Beyond /dev:debug, this command adds:

  • TDD state machine: RED → VERIFY RED → GREEN → REGRESSION CHECK (always, not opt-in)
  • Dual multimodel consensus review (Phase A: root cause; Phase B: patch quality)
  • 3-strategy fault localization with context budget enforcement
  • Optional deployment monitoring (Sentry, CloudWatch, log files)
  • Downgrade offer at VALIDATE: skip Phase B + monitoring if fix is clean

For quick debugging or one-off patches, use /dev:debug instead. </value_banner>

<critical_override> THIS COMMAND OVERRIDES THE CLAUDE.md TASK ROUTING TABLE FOR AGENT SELECTION.

WHY: The CLAUDE.md routing table maps "Debugging" to code-search:analyze, but this command needs dev:debugger for root cause analysis and dev:developer for applying fixes. code-search:analyze is READ-ONLY and cannot write code or tests.

AGENT RULES FOR THIS COMMAND:

  • Stack detection → dev:stack-detector agent (subagent_type: "dev:stack-detector")
  • Error analysis and root cause investigation → dev:debugger agent (subagent_type: "dev:debugger")
  • Writing tests and applying patches → dev:developer agent (subagent_type: "dev:developer")
  • Phase A vote, internal Claude (root-cause hypothesis) → dev:debugger with EVALUATE ONLY instruction, run_in_background: true
  • Phase B vote, internal Claude (patch quality) → dev:reviewer in a session of its own: the internal slot of its own claudish team call (agent="dev:reviewer"), or a route of ${CLAUDE_PLUGIN_ROOT}/skills/core/team-gate/cli-sessions.md without claudish — never a subagent of this session. It is handed the TARGET / FOCUS / MODELS contract lines. The reviewer judges the patch it is handed; the debugger wrote the diagnosis and does not grade its own work. It writes its own report in its own format; this command maps its **Verdict**: line to a vote (PASS → APPROVE, FAIL → REJECT, CONDITIONAL → ABSTAIN) and never hands it the vote schema
  • Phase B tally when MODELS is not "none" → dev:aggregator (subagent_type: "dev:aggregator"), foreground, given the vote files and never the code. At MODELS "none" there is one mapped vote and it is the tally — no aggregator
  • Multimodel vote (external models) → claudish MCP team, or CLI sessions in terminal slots when claudish is absent (team-gate/cli-sessions.md)
  • Post-deploy monitoring → inline Bash
  • Validation → inline Bash (run tests directly)

DO NOT use code-search:analyze (READ-ONLY — cannot apply fixes or write tests). DO NOT use dev:researcher (researches topics, does NOT debug code). DO NOT use dev:architect (plans architecture, does NOT debug or fix code). </critical_override>

<critical_constraints> <phase_reporting> There are no task-list tools. Announce each of the nine phases (0 Initialize through 8 DOCUMENT) in one line of text — **Phase N — starting.** and **Phase N — complete.** naming its artifacts — and let the session files be the record. </phase_reporting>

Read the full file on GitHub · 1,580 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. 4d ago Changed · +2 lines c2e95f38c806
  2. 11d ago Changed · +3 lines 777189ff89d1
  3. 19d ago Changed 37fdf12fd923
  4. 1mo ago Changed · +3 lines d8ec8bfa8702
  5. 1mo ago Changed · +55 lines 3057db11f7c6
  6. 1mo ago Changed · +23 lines 4c2307bfb215
  7. 2mo ago Changed · -28 lines 623c0f4ac23c
  8. 2mo ago Changed · +49 lines 458b829acc13
  9. 2mo ago Changed · +14 lines 2430c240217f
  10. 2mo ago First seen · 1,459 lines · 42 tokens per session scan A 3b5043b2795c

Subscribe to this mod's changes

fix is a command published in the GitHub repository MadAppGang/magus (16 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 20,682 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

fix compared with commands from other repositories

fix next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fixMadAppGang/magusCommand16todayMITA42Claude Code
bugfixnWave-ai/nWaveCommand63612d agoMITA18Claude Code
fix-issuekoaning/wigglystuffCommand5115d agoMITA0Claude Code
bugfixMartyBonacci/specswarmCommand67yesterdayMITA15Claude Code
fixTheBeardedBearSAS/claude-craftCommand10814d agoMITA11Claude Code
pair:examplesmonoes/monomindCommand234d agoApache-2.0A30Claude Code
bugfixrube-de/cc-skillsCommand11todayMITA60Claude Code