build-fix

build-fix is a command for Claude Code from hgahlot/claude-flow. It costs 0 tokens per session (557 once invoked), scanned A, original, MIT.

A debugging command that investigates build failures, test failures, and runtime errors by reproducing the problem, finding its root cause, and applying a small fix.

In plain words
What is it for?
Use it to reproduce an error, isolate the first failing file or line, test possible causes, apply the confirmed fix, and run the full test suite for regressions.
Why use it?
It prevents developers from guessing at fixes or treating only the final error message while earlier failures cause the rest.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it to reproduce an error, isolate the first failing file or line, test possible causes, apply the confirmed fix, and run the full test suite for regressions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hgahlot/claude-flow/build-fix
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/hgahlot/claude-flow

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/hgahlot/claude-flow/build-fix"><img src="https://agentmods.dev/badge/commands/hgahlot/claude-flow/build-fix.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 557 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.00557
Opus 5 $0.00000 $0.00279
Sonnet 5 $0.00000 $0.00111
Haiku 4.5 $0.00000 $0.00056

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

Security

Grade A, and why

build-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 9d 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/build-fix.md · 70 lines

How it starts

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

/build-fix — Systematic Root Cause Debugging

Apply systematic root cause analysis to fix build failures, test failures, and runtime errors.

Instructions

Step 1: Reproduce

  1. Run the failing command exactly as-is
  2. Capture the full error output (not just the last line)
  3. Confirm the failure is reproducible

Step 2: Isolate

  1. Identify the error type: compile error | test failure | runtime error | config error
  2. Find the first error in the stack (not the cascading consequences)
  3. Identify the exact file and line number where the failure originates

Step 3: Hypothesize

Generate 2–3 specific hypotheses for the root cause:

  • What changed recently? (git diff HEAD~1 or git log --oneline -5)
  • What does the error message literally say?
  • What are the dependencies of the failing component?

Step 4: Test Hypothesis (Smallest Change)

  1. Pick the most likely hypothesis
  2. Make the SMALLEST possible change to test it
  3. Re-run — did it change the error? (Better, worse, or same)
  4. If no improvement, revert and try next hypothesis

Step 5: Fix

  1. Apply the confirmed fix
  2. Run the full test suite (not just the failing test)
  3. Confirm no regressions introduced

Output Format

## Reproduce
Command: <exact command>
Output: <full error — first occurrence>
Status: ✓ Reproducible

## Isolate
Error type: <compile|test|runtime|config>
Root file: <file>:<line>
First error: <exact error message>

## Hypotheses
1. <hypothesis> — likelihood: high/medium/low
2. <hypothesis> — likelihood: high/medium/low
3. <hypothesis> — likelihood: high/medium/low

## Testing Hypothesis 1
Change: <minimal change made>
Result: <new error or resolution>

## Fix Applied
<description of fix>
Full test run: <pass/fail count>
Regressions: none / <list>

## Root Cause
<one sentence explaining what caused the failure and why the fix resolves it>

Rules

  • NEVER guess-and-check with multiple changes at once — isolate one variable at a time
  • NEVER skip the full test suite after fixing — look for regressions
  • If 3 hypotheses fail, escalate: read the dependency source, check changelogs, search error message
  • "I don't know" is a valid intermediate state — document what you've ruled out

Read the full file on GitHub · 70 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. 9d ago First seen · 70 lines · 0 tokens per session scan A e4856f1da34d

Subscribe to this mod's changes

build-fix is a command published in the GitHub repository hgahlot/claude-flow (53 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 557 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-08-30.