recovery-strategies
Escalation path when stuck on pattern development. Use when encountering TypeScript errors, framework confusion, unexpected behavior, or blocked progress. Five-step recovery: check docs, study examples, strategic investigation (plan mode + subagents), reset and retry, ask user.
Best use case
recovery-strategies is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Escalation path when stuck on pattern development. Use when encountering TypeScript errors, framework confusion, unexpected behavior, or blocked progress. Five-step recovery: check docs, study examples, strategic investigation (plan mode + subagents), reset and retry, ask user.
Teams using recovery-strategies should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/recovery-strategies/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How recovery-strategies Compares
| Feature / Agent | recovery-strategies | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Escalation path when stuck on pattern development. Use when encountering TypeScript errors, framework confusion, unexpected behavior, or blocked progress. Five-step recovery: check docs, study examples, strategic investigation (plan mode + subagents), reset and retry, ask user.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Recovery Strategies for Pattern Development
**CRITICAL: Don't spin your wheels when stuck. Follow this escalation path
AGGRESSIVELY.**
When encountering any difficulty with pattern development - whether it's
TypeScript errors, unexpected behavior, or uncertainty about framework
features - **immediately begin this recovery sequence**. Do NOT:
- Continue trying the same approach repeatedly
- Guess at solutions without checking documentation
- Waste time in unproductive loops
**If you find yourself stuck for more than 1-2 attempts, MOVE TO THE NEXT
STEP.**
Use this escalation path:
## Step 1: Re-read Documentation (First Response to Being Stuck)
**ALWAYS start here when encountering pattern development issues:**
```
"Use the pattern-dev skill to refresh your understanding of framework patterns"
```
The pattern-dev skill reads all latest pattern documentation from labs. Pay
**particular attention** to:
- **`~/Code/labs/docs/common/DEBUGGING.md`** - Common pitfalls and anti-patterns
- Quick error reference table
- Type errors (Cell<>, OpaqueRef<>, etc.)
- Style errors (object vs string syntax)
- Reactivity issues (bidirectional binding, computed(), ifElse())
- Runtime errors (DOM access, LLM in handlers, etc.)
- **`~/Code/labs/docs/common/PATTERNS.md`** - Pattern examples and best
practices
- **`~/Code/labs/docs/common/CELLS_AND_REACTIVITY.md`** - Reactivity system
details
- **`~/Code/labs/docs/common/TYPES_AND_SCHEMAS.md`** - Type system rules
**When to use:**
- Encountering any TypeScript errors
- Pattern compiles but doesn't work as expected
- UI not updating reactively
- Confused about Cell<>, OpaqueRef<>, bidirectional binding
- Before asking user for clarification on framework behavior
**When to move to Step 2:**
- After reading relevant docs but still unclear on solution
- Error persists after applying documented fixes
- Need to see concrete examples of working code
- After 1-2 attempts based on documentation
## Step 2: Study Similar Working Patterns
After refreshing documentation, look at existing working patterns **in this
priority order:**
**1. Labs patterns** (highest priority - canonical examples):
```bash
$PARENT_DIR/labs/packages/patterns/
# These are the most up-to-date, authoritative examples
# If a pattern exists here, it's the gold standard
```
**2. Patterns repository** (if available - well-tested real-world examples):
```bash
$PARENT_DIR/patterns/
# These are well-tested real-world patterns
# Skip this if patterns repo not cloned
```
**3. Community patterns - examples** (curated examples):
```bash
patterns/examples/
# These are specifically chosen as good examples
```
**4. Community patterns - jkomoros** (user patterns):
```bash
patterns/jkomoros/
# Prefer root-level (stable) over WIP/
# These may be more complex/experimental
```
**Within each directory:**
- ✅ Prefer non-WIP patterns (stable, tested)
- ⚠️ Use WIP/ patterns only if non-WIP doesn't exist
- 📁 Check root level first, then WIP/ as fallback
**How to find similar patterns:**
```bash
# Get parent directory for relative paths
PARENT_DIR="$(git rev-parse --show-toplevel)/.."
# Search for patterns using specific features
grep -r "generateObject" $PARENT_DIR/labs/packages/patterns/
grep -r "computed(" patterns/examples/
grep -r "handler<" $PARENT_DIR/labs/packages/patterns/
# List available patterns
ls $PARENT_DIR/labs/packages/patterns/
ls $PARENT_DIR/patterns/ 2>/dev/null || echo "patterns repo not cloned"
ls patterns/examples/
ls patterns/jkomoros/
```
**When to move to Step 2.5:**
- Can't find similar patterns for your use case
- Examples don't solve your specific problem
- After studying 2-3 similar patterns without clarity
- You don't understand WHY your approach isn't working
## Step 2.5: Strategic Investigation (Plan Mode + Subagents)
**After 1-2 failed attempts, STOP trying variations. Enter plan mode and
investigate properly.**
Use the `strategic-investigation` skill to:
1. Step back from implementation mode
2. Launch parallel Explore agents to gather information
3. Synthesize findings - understand WHY the solution is correct
4. Execute with confidence
**This step is critical.** Don't skip it thinking "I'll just try one more
thing." Systematic investigation often reveals the idiomatic solution faster
than trial-and-error.
**When to move to Step 3:**
- After strategic investigation reveals a clear path forward
- If investigation shows this is a simple problem after all
- You now understand the idiomatic approach
## Step 3: Reset and Try Again (After Investigation)
If still stuck after Steps 1-2:
1. Reset to your last commit: `git reset --hard HEAD`
2. Reflect on what you learned from documentation and examples
3. Try a different approach incorporating that knowledge
4. Start with the simplest possible version that works
5. Add complexity incrementally, testing after each addition
**When to move to Step 4:**
- After 1-2 reset attempts without progress
- Problem persists despite fresh approaches
- Suspect this might be a framework limitation or bug
- Need architectural guidance beyond documentation
## Step 4: Ask User (Significant Confusion)
If Steps 1-3 don't resolve the issue:
1. Explain what you've tried (docs, examples, approaches)
2. Show specific error messages or unexpected behavior
3. Ask user for clarification or guidance
4. Consider if this is a framework limitation vs implementation issue
## Additional Resources
**After exhausting Steps 1-4, consider:**
- **Community superstitions** - Check `community-docs/superstitions/` for
empirical knowledge (treat with skepticism)
- **Issue filing** - Document complex framework questions for authors (requires
user permission)
**Remember:** This recovery strategy is your safety net. Follow it
systematically to avoid spinning your wheels!Related Skills
testing
Test patterns with Playwright browser automation. Navigate to deployed patterns, interact with UI elements, verify functionality. Use when testing patterns after deployment or when debugging pattern behavior in browser.
Superstition Verification Skill
Use this skill to systematically verify superstitions in
strategic-investigation
Proactive recovery using plan mode and subagents. After 1-2 failed attempts, STOP trying variations. Enter plan mode and launch parallel Explore/Plan agents to find idiomatic solutions instead of spinning wheels.
session-startup
Session initialization sequence for community-patterns development. Use at the start of every Claude Code session. Checks for upstream updates, loads workspace configuration, and ensures dev servers are running.
pattern-dev
Day-to-day pattern development best practices. Use when actively developing patterns. Covers incremental development, commits, communication guidelines, and general development workflow.
land-branch
Land a feature branch: pull from main, rebase the branch, create a PR, and merge it via rebase with automatic branch deletion. Use when ready to land a completed feature branch.
issue-filing
File framework issues after exhausting other approaches. Document complex problems with multiple failed attempts for framework authors. REQUIRES user permission. Use only after checking docs, community-docs, and trying multiple approaches.
git-workflow
Git operations and pull request workflows. Create PRs, rebase branches, resolve conflicts, merge to upstream. Use when ready to create PR or when working with git branches and upstream.
deployment
Deploy and update patterns. Use when deploying new patterns, updating existing deployments, or testing syntax. Includes deployment commands and the first custom pattern celebration.
community-docs
Community superstitions - unverified observations from pattern development. Use when encountering undocumented edge cases or framework quirks not in official docs. Verified knowledge should be upstreamed to labs docs.
claude-permissions-update
Sync auto-approved permissions from all community-patterns directories (including community-patterns-2, -3, etc.) to the shared project settings. Shows new permissions for review before adding.
validating-backup-integrity-for-recovery
Validate backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to ensure backups are reliable for disaster recovery and ransomware response scenarios.