Agent skill
session-recovery
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/session-recovery
SKILL.md
🔄 Session Recovery Skill
name: session-recovery description: Recover context and continue work after session interruptions or restarts
🎯 Purpose
Seamlessly recover from session interruptions, crashes, or context switches without losing progress.
📋 When to Use
- Starting a new conversation
- After IDE restart
- Switching between projects
- Resuming interrupted work
🚨 Recovery Triggers
| Trigger | Action |
|---|---|
| New session | Load last context |
| User says "continue" | Resume last task |
| IDE restart | Restore state |
| Crash recovery | Check incomplete tasks |
📝 Recovery Process
Step 1: Detect Context
Check for:
1. [ ] Active task files (task.md, active.md)
2. [ ] Recent git changes
3. [ ] Unsaved work
4. [ ] Error logs
Step 2: Load Context
Read in order:
1. memory/active.md → Current task
2. memory/summary.md → Project context
3. memory/decisions.md → Recent decisions
4. task.md → Pending items
Step 3: Summarize State
"Last session you were working on [task].
Progress was [X]% complete.
You were in the middle of [specific action].
Would you like to continue?"
Step 4: Resume or Restart
Options:
- Continue from last point
- Start fresh with context
- Switch to different task
🗂️ Context Files
| File | Purpose | Priority |
|---|---|---|
active.md |
Current task | 🔴 High |
task.md |
Task checklist | 🔴 High |
summary.md |
Project overview | 🟡 Medium |
decisions.md |
Architecture choices | 🟡 Medium |
changelog.md |
Recent changes | 🟢 Low |
📋 Recovery Template
## 🔄 Session Recovery
### Last Session
- **Date**: [date]
- **Duration**: [time]
- **Project**: [name]
### Work in Progress
- Task: [description]
- Progress: [X]%
- Last action: [what was happening]
### Pending Items
- [ ] Item 1
- [ ] Item 2
### Files Modified
- `file1.js` - [changes]
- `file2.css` - [changes]
### Would you like to:
1. Continue from last point
2. Review changes first
3. Start fresh
🔧 Auto-Recovery Features
1. State Persistence
// Save state before session ends
saveState({
currentTask: taskName,
progress: percentage,
openFiles: fileList,
recentActions: actionLog
});
2. Crash Detection
// Check for incomplete state
if (activeTask && !taskCompleted) {
recoveryMode = true;
loadLastCheckpoint();
}
3. Git Integration
# Check uncommitted changes
git status --porcelain
# Get recent commits
git log --oneline -5
💡 Best Practices
- Save frequently: Update active.md during work
- Checkpoint: Mark milestones in progress
- Commit often: Small, frequent commits
- Document blockers: Note where you got stuck
🔗 Related Skills
memory-system- Memory managementprogress-tracking- Track where you left offgit-workflow- Version control recovery
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?