fix

A guided bug-fixing command that moves from reproducing and diagnosing a problem to making a fix, reviewing it, and adding a regression test.

In plain words
What is it for?
Use it for a reported defect when you need a structured investigation, a minimal fix, review of the change, and a test that prevents the bug from returning.
Why use it?
It helps prevent quick symptom-based patches by requiring the underlying cause and affected code paths to be understood first.

Command

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/zevtos/agentpipe/fix
Clone the repo
git clone --depth 1 https://github.com/zevtos/agentpipe
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 661 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.00027 $0.00661
Opus 5 $0.00014 $0.00331
Sonnet 5 $0.00005 $0.00132
Haiku 4.5 $0.00003 $0.00066

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

Security

Grade A, and why

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 2d 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.

commands/fix.md · 79 lines

How it starts

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

You are orchestrating a bug fix. Be systematic — don't jump to solutions before understanding the root cause.

Context

@CLAUDE.md

Bug Report

$ARGUMENTS

Pipeline

Step 1: Investigate

Before touching any code:

  1. Reproduce the bug — understand exactly what triggers it
  2. Read the relevant code paths (use Grep/Glob to find related files)
  3. Check git blame/log for recent changes in the affected area
  4. Read error logs if available
  5. Identify the root cause — not just the symptom
  6. Check if this is a known pattern (race condition? null reference? off-by-one? missing validation?)

Present your findings:

  • Symptom: What the user sees
  • Root Cause: Why it happens (be specific — point to exact code)
  • Impact: How many users/flows are affected
  • Fix Strategy: What needs to change and why

Ask: "Is this the right diagnosis? Should I proceed with this fix approach?" Wait for confirmation.

Step 2: Fix

Implement the fix:

  • Make the minimal change that addresses the root cause
  • Don't refactor surrounding code — fix the bug only
  • Add input validation or guard clauses if the bug was caused by unexpected input
  • Add logging if the bug was hard to diagnose (help future debugging)
  • Handle the error gracefully if it's an edge case that can't be prevented

Step 3: Review (Reviewer Agent)

Run the reviewer agent: "Review this bug fix for: $ARGUMENTS Root cause: [paste root cause from Step 1] Changes made: [describe the fix] Verify:

  • Does the fix actually address the root cause?
  • Does it introduce any regressions?
  • Are edge cases handled?
  • Is error handling appropriate?
  • Could this bug manifest elsewhere? (similar patterns in the codebase)"

If the reviewer finds issues, fix them and re-verify.

Step 4: Regression Test (Tester Agent)

Run the tester agent: "Write a regression test for this bug: $ARGUMENTS Root cause: [paste root cause] The fix: [describe what changed]

Write tests that:

  1. Reproduce the original bug (this test would have FAILED before the fix)
  2. Verify the fix works correctly
  3. Cover related edge cases that could cause similar issues
  4. Follow existing test patterns in the project"

Read the full file on GitHub · 79 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. 2d ago First seen · 79 lines · 27 tokens per session scan A ceb1c693fd09

Subscribe to this mod's changes

fix is a command published in the GitHub repository zevtos/agentpipe (11 stars, last pushed 2mo ago), licensed MIT. It adds 27 tokens to every session and 661 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-08-30.