/self-healing
Automatically detect and recover from errors without interrupting your flow.
$ npx -y skills add spencermarx/open-code-review --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/self-healing
Context preview
What this command does when you run it.
Automatically detect and recover from errors without interrupting your flow.
Command definition
self-healing.mdSelf-Healing Workflows
Purpose
Automatically detect and recover from errors without interrupting your flow.
Self-Healing Features
1. Error Detection
Monitors for:
- Failed commands
- Syntax errors
- Missing dependencies
- Broken tests
2. Automatic Recovery
**Missing Dependencies:**
Error: Cannot find module 'express'
→ Automatically runs: npm install express
→ Retries original command
**Syntax Errors:**
Error: Unexpected token
→ Analyzes error location
→ Suggests fix through analyzer agent
→ Applies fix with confirmation
**Test Failures:**
Test failed: "user authentication"
→ Spawns debugger agent
→ Analyzes failure cause
→ Implements fix
→ Re-runs tests
3. Learning from Failures
Each recovery improves future prevention:
- Patterns saved to knowledge base
- Similar errors prevented proactively
- Recovery strategies optimized
**Pattern Storage:**
// Store error patterns
mcp__claude-flow__memory_usage({
"action": "store",
"key": "error-pattern-" + Date.now(),
"value": JSON.stringify(errorData),
"namespace": "error-patterns",
"ttl": 2592000 // 30 days
})
// Analyze patterns
mcp__claude-flow__neural_patterns({
"action": "analyze",
"operation": "error-recovery",
"outcome": "success"
})Self-Healing Integration
MCP Tool Coordination
// Initialize self-healing swarm
mcp__claude-flow__swarm_init({
"topology": "star",
"maxAgents": 4,
"strategy": "adaptive"
})
// Spawn recovery agents
mcp__claude-flow__agent_spawn({
"type": "monitor",
"name": "Error Monitor",
"capabilities": ["error-detection", "recovery"]
})
// Orchestrate recovery
mcp__claude-flow__task_orchestrate({
"task": "recover from error",
"strategy": "sequential",
"priority": "critical"
})Fallback Hook Configuration
{
"PostToolUse": [{
"matcher": "^Bash$",
"command": "npx claude-flow hook post-bash --exit-code '${tool.result.exitCode}' --auto-recover"
}]
}Benefits
- 🛡️ Resilient workflows
- 🔄 Automatic recovery
- 📚 Learns from errors
- ⏱️ Saves debugging time
Read more
Self-Healing Workflows
Purpose
Automatically detect and recover from errors without interrupting your flow.
Self-Healing Features
1. Error Detection
Monitors for:
- Failed commands
- Syntax errors
- Missing dependencies
- Broken tests
2. Automatic Recovery
**Missing Dependencies:**
Error: Cannot find module 'express' → Automatically runs: npm install express → Retries original command
**Syntax Errors:**
Error: Unexpected token → Analyzes error location → Suggests fix through analyzer agent → Applies fix with confirmation
**Test Failures:**
Test failed: "user authentication" → Spawns debugger agent → Analyzes failure cause → Implements fix → Re-runs tests
3. Learning from Failures
Each recovery improves future prevention:
- Patterns saved to knowledge base
- Similar errors prevented proactively
- Recovery strategies optimized
**Pattern Storage:**
// Store error patterns
mcp__claude-flow__memory_usage({
"action": "store",
"key": "error-pattern-" + Date.now(),
"value": JSON.stringify(errorData),
"namespace": "error-patterns",
"ttl": 2592000 // 30 days
})
// Analyze patterns
mcp__claude-flow__neural_patterns({
"action": "analyze",
"operation": "error-recovery",
"outcome": "success"
})Self-Healing Integration
MCP Tool Coordination
// Initialize self-healing swarm
mcp__claude-flow__swarm_init({
"topology": "star",
"maxAgents": 4,
"strategy": "adaptive"
})
// Spawn recovery agents
mcp__claude-flow__agent_spawn({
"type": "monitor",
"name": "Error Monitor",
"capabilities": ["error-detection", "recovery"]
})
// Orchestrate recovery
mcp__claude-flow__task_orchestrate({
"task": "recover from error",
"strategy": "sequential",
"priority": "critical"
})Fallback Hook Configuration
{
"PostToolUse": [{
"matcher": "^Bash$",
"command": "npx claude-flow hook post-bash --exit-code '${tool.result.exitCode}' --auto-recover"
}]
}Benefits
- 🛡️ Resilient workflows
- 🔄 Automatic recovery
- 📚 Learns from errors
- ⏱️ Saves debugging time
AI-powered multi-agent code review. Simulates a customizable team of Engineers performing code review with built-in discourse.
Repo: spencermarx/open-code-review
Other commands on open-code-review.
- /COMMAND_COMPLIANCE_REPORT
Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of: - `mcp__claude-flow__*` tools (preferred) - `npx claude-flow` commands (as fallback) - No direct implementation calls
Open command - /bottleneck-detect
Analyze performance bottlenecks in swarm operations and suggest optimizations.
Open command - /performance-bottlenecks
Identify and resolve performance bottlenecks in your development workflow.
Open command - /performance-report
Generate comprehensive performance reports for swarm operations.
Open command - /token-efficiency
Reduce token consumption while maintaining quality through intelligent coordination.
Open command - /token-usage
Analyze token usage patterns and optimize for efficiency.
Open command

