← Skills Library
Build & Deploy

Auto Fix

Classifies runtime failures, locates root cause in the codebase, implements a targeted fix, runs tests, and redeploys. Full autonomous loop. No manual steps.

How It Works

Auto Fix · Workflow
Failure signal → classify → fix → verify. Full loop, no manual steps.
TriggerBug report / failing service · Logs, errors, or a red health check
1
Read logs & health endpoints
Surface the failure signal before any hypothesis
2
Classify the failure
Crash · leak · dependency · config · network
3
Locate root cause
Trace through wrappers to the originating line
4
Implement targeted fix
Minimal change — no refactor, no architecture
5
Test → redeploy → verifyGATE
Run tests, redeploy, re-check health & logs
failFix uncertain → stop & flag for human review
Incident report + PR · Timeline + 1 prevention rec → .incidents/{slug}.md
  1. Bug report / failing service: Logs, errors, or a red health check
  2. Read logs & health endpoints: Surface the failure signal before any hypothesis
  3. Classify the failure: Crash · leak · dependency · config · network
  4. Locate root cause: Trace through wrappers to the originating line
  5. Implement targeted fix: Minimal change — no refactor, no architecture
  6. Test → redeploy → verify: Run tests, redeploy, re-check health & logs
  7. Incident report + PR: Timeline + 1 prevention rec → .incidents/{slug}.md
ↆ download card

Invocation Triggers

/auto-fixauto fixruntime errorservice is brokenfix this automatically

Use Cases

  • Resolve a runtime crash or service failure without manual diagnosis
  • Classify a failure type and trace root cause to the exact file and line
  • Get an incident report with timeline and one prevention recommendation

The Problem

Your service fails at 2am. By morning it has been down for 6 hours. You spend an hour finding the cause, writing a fix, deploying, and verifying. The failure was 6 lines of code — but the diagnosis took 50 minutes. Runtime failures compound every minute they run. The cost is not the bug. It is the time between detection and fix.

What It Does

  1. 1
    Connect to logs and health endpoints

    Reads recent error output, service status, and health check results. Surfaces the failure signal before any hypothesis is formed.

  2. 2
    Classify the failure

    Crash / memory leak / dependency failure / config issue / network error. Each category has a different resolution path — classification determines where to look next, not just what the stack trace says.

  3. 3
    Locate root cause in codebase

    Searches for the specific error pattern, reads the responsible code, traces to the actual failure point. Not just the stack trace surface — through indirection, through wrappers, to the originating line.

  4. 4
    Implement targeted fix

    Minimal change. No refactoring. No architectural changes. Exactly what is needed to resolve the classified failure and nothing else.

  5. 5
    Test, redeploy, verify

    Runs tests first, then redeploys, then checks health endpoints and logs to confirm recovery. Produces an incident report with timeline and one prevention recommendation — written to .incidents/{slug}.md.

What You Get / What It Doesn't Do

What you get
  • Failure classified with confidence (crash / memory / dep / config / network)
  • Root cause located with file:line reference
  • Fix implemented and tested before deploy
  • Service restored with health check evidence
  • Incident report with timeline and one prevention recommendation
What it doesn't do
  • Monitor continuously — trigger it on a specific failure
  • Fix infrastructure or cloud-level issues (those require provider access)
  • Make architectural changes or refactor unrelated code
  • Handle failures that require a product decision

Tips

Point at a specific failure

Vague symptoms produce vague diagnoses. Give it an error message, a log line, or a health check URL — not "something feels slow."

Check lessons.md first

If this failure pattern appeared before, the fix may already be documented. /auto-fix checks lessons.md automatically before starting diagnosis.

The incident report compounds

Each run writes to .incidents/{slug}.md and lessons.md. Over time, your pattern recognition gets sharper. The fifth auto-fix is faster than the first.

Get the Skill

Pro SkillPRO

Unlock the full Auto Fix SKILL.md — drop it into ~/.claude/skills/ and trigger it by name.

What you unlock
  • Failure classified with confidence (crash / memory / dep / config / network)
  • Root cause located with file:line reference
  • Fix implemented and tested before deploy
  • Service restored with health check evidence
...

Commonly Used With

Skills Library

29 more production skills ready to install.

Browse All Skills