skills/builder-error-recovery/SKILL.md
Error recovery patterns for Builder sessions. Covers transient error handling, sub-agent failure recovery, unexpected error prompts, and loop detection with bulk fix strategies.
npx skillsauth add mdmagnuson-creator/yo-go builder-error-recoveryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Load this skill when a tool call fails, a sub-agent fails, or a repetitive fix pattern is detected.
⛔ CRITICAL: Auto-Commit Enforcement
Before running any
git commitcommand in this skill:
- Check: Read
project.json→git.autoCommit- If
false: Do NOT rungit commit. Instead:
- Stage files with
git add- Report staged files and suggested commit message
- Say: "Auto-commit is disabled. Run
git commit -m \"<message>\"when ready."- Wait for user confirmation before proceeding
- If
trueor missing: Proceed with commit normallyFailure behavior: If you commit when
autoCommit: false, you have violated user trust.
⚠️ When a tool call fails (499, timeout, network error), do NOT stop silently.
Transient failures happen. Your job is to recover automatically when possible.
| Error | Meaning | Action |
|-------|---------|--------|
| status code 499 | Client disconnected / timeout | Retry immediately (1 time) |
| ETIMEDOUT / ECONNRESET | Network interruption | Retry immediately (1 time) |
| context deadline exceeded | Operation took too long | Retry with simpler request |
| Tool returns empty/null unexpectedly | Possible transient failure | Retry once, then report |
1. Tool call fails with transient error
│
▼
2. Log: "Tool call failed: {error}. Retrying..."
│
▼
3. Retry the SAME operation (1 retry max)
│
├─── Success ──► Continue normally
│
└─── Fails again ──► Report and ask user
"Tool failed twice: {error}. Options:
[R] Retry again
[S] Skip this step
[X] Stop and investigate"
When a sub-agent call (e.g., @developer, @tester) fails mid-execution:
Check if partial work was done:
git status to see if files were modifiedResume strategy:
<context>
version: 1
resuming: true
previousAttempt:
status: failed
error: "499 timeout"
partialChanges:
- file: src/components/Button.tsx
status: modified
</context>
Continue from where you left off. The previous attempt failed with a 499 timeout.
Check git status to see what was already changed, then complete the remaining work.
After 2 sub-agent failures: Stop and report to user with options
If you encounter an error and don't know how to proceed:
⚠️ UNEXPECTED ERROR
I encountered an error I don't know how to handle:
Error: {error details}
Context: {what I was trying to do}
Options:
[R] Retry the operation
[I] Investigate (show me what to check)
[X] Stop workflow
Do NOT: Just stop responding and wait for the user to notice.
Load
self-correctionskill when detecting repetitive fix patterns.
After fixing the same issue type 3+ times, load the skill for:
data-ai
Generate verification contracts before delegating tasks to sub-agents, defining how success will be measured. Triggers on: verification contract, delegation contract, task verification, contract-first delegation.
testing
Verify that Vercel environment variables point to the correct Supabase project for each environment to prevent staging/production cross-wiring. Triggers on: vercel supabase check, environment alignment, env var check, supabase environment.
development
Manage codebase and database vectorization for semantic search. Use when initializing, refreshing, or querying the vector index. Triggers on: vectorize init, vectorize refresh, vectorize search, semantic search, vector index, enable vectorization.
testing
Patterns for XCUITest UI tests for native Apple apps (macOS/iOS). Use when writing or reviewing XCUITest tests for Swift apps. Triggers on: XCUITest, xcuitest, native app testing, Apple UI tests, SwiftUI tests, AppKit tests, UIKit tests.