← Skills Library
Build & Deploy

Build Fix

Auto-diagnoses your build error: isolates the primary failure from cascade noise, traces it to root cause, and gives you one targeted fix. Read-only. No speculative changes.

How It Works

Build Fix · Workflow
Isolate the root failure, fix one at a time, rebuild. Stop after 2.
TriggerBuild is failing · Compile / type errors after a merge or rebase
1
Detect build & capture output
npm · tsc · python · go · cargo — capture every line of stderr
2
Isolate the primary failure
Parse cascade noise to the first root-level error; rest is downstream
3
Trace root cause & fix minimally
Missing import · type · config · syntax — no @ts-ignore, no any, no deletes
4
Re-run build to verifyGATE
Error gone and zero new errors introduced
failSame error twice or net-new errors → stop & re-plan (max 2 attempts)
Build fix summary · RESOLVED / PARTIAL / BLOCKED + files changed and what was fixed
  1. Build is failing: Compile / type errors after a merge or rebase
  2. Detect build & capture output: npm · tsc · python · go · cargo — capture every line of stderr
  3. Isolate the primary failure: Parse cascade noise to the first root-level error; rest is downstream
  4. Trace root cause & fix minimally: Missing import · type · config · syntax — no @ts-ignore, no any, no deletes
  5. Re-run build to verify: Error gone and zero new errors introduced
  6. Build fix summary: RESOLVED / PARTIAL / BLOCKED + files changed and what was fixed
ↆ download card

Invocation Triggers

/build-fixfix buildbuild errorbuild is failingcompilation error

Use Cases

  • Diagnose a build failure without manually reading 40 lines of error output
  • Isolate the primary error from cascade failures in one pass
  • Get a single targeted fix instead of five guesses

The Problem

The build fails. You read the error. You try something. It fails again. Five minutes later you have touched three files and the error message has changed, but nothing works. The original problem was on line 3 of a 40-line error block — everything below it was cascade noise. Build errors have a structure. Reading them correctly is a skill. This skill reads them for you.

What It Does

  1. 1
    Run the build and capture full output

    Runs your build command (auto-detected: npm run build, python -m build, go build, cargo build) and captures every line of output.

  2. 2
    Isolate the primary failure

    Build errors cascade — one missing dep produces 30 lines of noise. Parses the output to find the first, root-level failure. Everything else is downstream.

  3. 3
    Trace root cause

    Identifies the failure category: missing dependency, wrong import path, type mismatch, config issue, syntax error. Reads the specific file:line referenced.

  4. 4
    Propose one targeted fix

    Gives you a single, minimal fix for the root cause. Not a list of things to try — the most likely correct fix, with reasoning.

  5. 5
    Confirm

    Re-runs the build with the fix applied. Reports whether the error is resolved or if there is a new primary error to address.

What You Get / What It Doesn't Do

What you get
  • Primary error isolated from cascade noise
  • Root cause identified with file:line reference
  • One targeted fix with reasoning
  • Build re-run confirmation (pass or next error)
What it doesn't do
  • Fix runtime errors — use /auto-fix (Pro) for runtime failures
  • Rewrite architecture or resolve design issues
  • Give you a list of things to try — one fix, not five guesses
  • Touch files speculatively — diagnoses first, fixes only after identifying root cause

Tips

Fix only the first error

Cascade errors are noise. The build will surface the next real error after the first is fixed. Do not try to fix them all at once.

Check git log before assuming a bug

"It worked yesterday" is a hypothesis — check what changed. The build error may be a symptom of a recent merge, not your current work.

Add recurring errors to lessons.md

If the same build error reappears across sessions, it is a pattern. Document it with the root cause so future agents and future you recognize it in seconds.

Get the Skill

Free DownloadFREE

Build Fix

The full SKILL.md — copy it into ~/.claude/skills/ and trigger it by name.

Commonly Used With

Skills Library

29 more production skills ready to install.

Browse All Skills