.claude/skills/recovery/SKILL.md
Workflow recovery protocol for resuming workflows after context loss, session interruption, or errors. Handles state reconstruction, artifact recovery, and seamless workflow continuation.
npx skillsauth add oimiragieo/agent-studio 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.
Check gate files for last successful validation:
.claude/context/history/gates/{workflow_id}/Review reasoning files for progress:
.claude/context/history/reasoning/{workflow_id}/Identify artifacts created:
.claude/context/artifacts/registry-{workflow_id}.jsonRead plan document (stateless):
plan-{workflow_id}.json from artifact registryLoad relevant phase plan (if multi-phase):
plan-{workflow_id}-phase-{n}.jsonUnderstand current state:
Load artifacts from last completed step:
Read reasoning files for context:
Reconstruct workflow state:
Continue from next step:
Planner updates plan status (stateless):
Orchestrator coordinates next agents:
</execution_process>
When a task fails, classify the failure type:
| Failure Type | Indicators | Recovery Action | | ------------------- | -------------------------------------------------- | ------------------------------- | | BROKEN_BUILD | Build errors, syntax errors, module not found | ROLLBACK + fix | | VERIFICATION_FAILED | Test failures, validation errors, assertion errors | RETRY with fix (max 3 attempts) | | CIRCULAR_FIX | Same error 3+ times, similar approaches repeated | SKIP or ESCALATE | | CONTEXT_EXHAUSTED | Token limit reached, maximum length exceeded | Compress context, continue | | UNKNOWN | No pattern match | RETRY once, then ESCALATE |
Iron Law: If the same approach has been tried 3+ times without success, STOP.
When circular fix is detected:
Detection Algorithm:
Example:
Attempt 1: "Using async await for fetch"
Attempt 2: "Using async/await with try-catch"
Attempt 3: "Trying async await pattern again"
=> CIRCULAR FIX DETECTED - Stop and try callback pattern instead
| Failure Type | Max Attempts | Then Action | | ------------------- | ------------ | -------------------------------- | | VERIFICATION_FAILED | 3 | SKIP + ESCALATE | | UNKNOWN | 2 | ESCALATE | | BROKEN_BUILD | 1 | ROLLBACK (if good commit exists) | | CIRCULAR_FIX | 0 | Immediately SKIP |
See references/ for detailed patterns:
failure-types.md - Failure classification details and indicatorsrecovery-actions.md - Recovery action decision tree and executionmerge-strategies.md - File merge strategies for multi-agent scenarios<best_practices>
</best_practices>
<error_handling>
</error_handling> </instructions>
<examples> <usage_example> **Recovery after context loss**:# 1. Check gate files for last completed step
ls .claude/context/history/gates/{workflow_id}/
# 2. Load plan document
cat .claude/context/artifacts/plan-{workflow_id}.json
# 3. Review reasoning files
cat .claude/context/history/reasoning/{workflow_id}/*.json
# 4. Resume from next step
</usage_example>
<usage_example> Natural language invocation:
"Resume the workflow from where we left off"
"Recover the workflow state and continue"
"What was the last completed step?"
</usage_example> </examples>
.claude/agents/core/planner.md.claude/context/memory/Before starting:
cat .claude/context/memory/learnings.md
After completing:
.claude/context/memory/learnings.md.claude/context/memory/issues.md.claude/context/memory/decisions.mdASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
tools
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
tools
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.
data-ai
Molecular featurization for ML (100+ featurizers). ECFP, MACCS, descriptors, pretrained models (ChemBERTa), convert SMILES to features, for QSAR and molecular ML.
development
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.