failure-recovery
Recovery protocols for stuck agents, context exhaustion, build failures, and confusion. Use when agent is looping, responses degrading, builds failing repeatedly, or user says 'you're stuck' or 'start over'.
npx skills add majiayu000/claude-skill-registry --skill failure-recovery --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Failure Recovery Recovery protocols when things go wrong. Don't panic - follow these systematic approaches. ## When To Use - Agent is looping or repeating the same action - Responses are getting shorter or missing context - Build/tests failing repeatedly (3+ times) - User says "you're stuck", "start over", "lost", "confused" - Project state feels inconsistent --- ## Build Failure Recovery **Trigger**: Tests fail, build errors, runtime crashes ```yaml recovery_build_failure: step_1_isolate: - "pytest tests/ -x --tb=short" # Stop at first failure - "git diff HEAD~1" # What changed? step_2_rollback_test: - "git stash" - "git checkout HEAD~1" - "pytest tests/" # Verify it works step_3_bisect_if_needed: - "git bisect start" - "git bisect bad HEAD" - "git bisect good [last-good-commit]" step_4_fix: rule: "Fix the bug, don't refactor" avoid: "No cleanup, no improvements, just fix" step_5_verify: - "pytest tests/" - "git stash pop" # If we stashed changes ``` **Key principle**: Smallest change that fixes the issue. Do NOT refactor while debugging. --- ## Agent Confusion Recovery **Trigger**: Looping, contradicting self, asking already-answered questions ```yaml recovery_agent_confusion:
- When To Use
- Build Failure Recovery
- Agent Confusion Recovery
- Context Window Exhaustion
- Predictive Context Management (PROACTIVE)
- Token Usage Estimation
- Pre-emptive Action Thresholds
- Pre-emptive Delegation Pattern
- Pre-emptive Checkpoint Pattern
- Background Handoff Pattern
- Context Prediction Indicators
- Proactive vs Reactive
- "I'm Lost" Recovery
- Dependency Hell Recovery
What does the failure-recovery skill do?
Recovery protocols for stuck agents, context exhaustion, build failures, and confusion. Use when agent is looping, responses degrading, builds failing repeatedly, or user says 'you're stuck' or 'start over'.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill failure-recovery --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
