Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/majiayu000/claude-skill-registry --skill recover명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | recover |
| description | Recover session context. |
Purpose: Help you get back up to speed after context compaction. Automatically detects in-progress work (RPI runs, evolve cycles), loads relevant knowledge, summarizes what you were doing and what's next, and prefers the Codex hookless lifecycle path when applicable.
YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.
CLI dependencies: gt, ao, bd — all optional. Shows what's available, skips what isn't.
$recover # Full recovery dashboard
$recover --json # Machine-readable JSON output
ao codex status # Codex hookless lifecycle health
ao codex ensure-start # Rebuild startup context explicitly in Codex
Run ALL of the following in parallel bash calls:
Call 1 — RPI Phased State:
if [ -f .agents/rpi/phased-state.json ]; then
echo "=== RPI_STATE ==="
cat .agents/rpi/phased-state.json
else
echo "RPI_STATE=NONE"
fi
Call 2 — Evolve Cycle History:
if [ -f .agents/evolve/cycle-history.jsonl ]; then
echo "=== EVOLVE_STATE ==="
tail -3 .agents/evolve/cycle-history.jsonl
else
echo "EVOLVE_STATE=NONE"
fi
Call 3 — Git Recent Changes:
echo "=== GIT_STATUS ==="
git status --short
echo "=== GIT_LOG ==="
git log --oneline -5
echo "=== GIT_BRANCH ==="
git branch --show-current
Call 4 — Work Queue State:
if bd ready --json >/dev/null 2>&1 && bd list --type epic --status open --json >/dev/null 2>&1; then
echo "=== IN_PROGRESS ==="
bd list --status in_progress 2>/dev/null | head -3
echo "=== READY ==="
bd ready 2>/dev/null | head -3
else
echo "BD_DEGRADED_OR_UNAVAILABLE"
fi
Call 5 — Knowledge and Messages:
# Knowledge artifacts
echo "=== KNOWLEDGE_COUNT ==="
echo "Learnings=$(ls .agents/learnings/ 2>/dev/null | wc -l | tr -d ' ')"
echo "Patterns=$(ls .agents/patterns/ 2>/dev/null | wc -l | tr -d ' ')"
# Inbox if gt available
if command -v gt &>/dev/null; then
echo "=== MESSAGES ==="
gt mail inbox 2>/dev/null | head -3
else
echo "GT_UNAVAILABLE"
fi
Call 6 — Codex Lifecycle (if available):
if command -v ao &>/dev/null; then
echo "=== CODEX_STATUS ==="
ao codex status --json 2>/dev/null || echo "CODEX_STATUS=UNAVAILABLE"
else
echo "AO_UNAVAILABLE"
fi
If RPI state detected, run:
if command -v ao &>/dev/null; then
ao lookup --query "rpi recovery context" --limit 5 2>/dev/null || true
fi
Apply retrieved knowledge: If learnings are returned, check each for applicability to the recovery context. Cite applicable learnings by filename and record: ao metrics cite "<path>" --type applied 2>/dev/null || true
If Codex hookless mode is detected, also ensure startup context once for the current thread:
ao codex ensure-start 2>/dev/null || true
Extract from collected data:
RPI Detection: If .agents/rpi/phased-state.json exists:
goal, epic_id, phase, cycle, started_atEvolve Detection: If .agents/evolve/cycle-history.jsonl exists:
goals_fixed, result, timestampRecent Work: From git log:
Pending Work: From beads:
Knowledge State:
Assemble gathered data into this format:
══════════════════════════════════════════════════════════════
Context Recovery Dashboard
══════════════════════════════════════════════════════════════
IN-PROGRESS RPI RUN
Epic: <epic_id>
Goal: <first 80 chars of goal>
Phase: <phase name: research | plan | implement | validate>
Cycle: <cycle #>
Started: <time ago (e.g., "2 hours ago")>
Status: <PHASE_START | IN_PROGRESS | READY_FOR_GATE | ...>
─ Next Step: <state-aware suggestion from Step 5>
OR
RECENT EVOLVE CYCLE (IF NO RPI)
Cycle: <cycle #>
Latest Goal: <goal_id or summary>
Result: <result>
Items Completed: <count or "—">
Timestamp: <time ago>
─ Next Step: <state-aware suggestion from Step 5>
OR
[NO ACTIVE SESSION]
No RPI run or evolve cycle in progress.
Last activity: <time of last commit or "unknown">
IN-PROGRESS WORK
<list up to 3 in-progress issues with IDs>
<or "No in-progress work">
READY TO WORK
<count of ready issues>
<or "No ready issues">
RECENT COMMITS
<last 3 commits>
PENDING CHANGES
<uncommitted file count or "clean">
KNOWLEDGE AVAILABLE
Learnings: <count> Patterns: <count>
INBOX
<message count or "No messages" or "gt not installed">
──────────────────────────────────────────────────────────────
SUGGESTED NEXT ACTION
<state-aware command from Step 5>
──────────────────────────────────────────────────────────────
QUICK COMMANDS
$status Current workflow dashboard
$research Deep codebase exploration
$plan Decompose work into issues
$implement Execute a single issue
$crank Autonomous epic execution
$validation Full close-out and learnings
══════════════════════════════════════════════════════════════
Evaluate context top-to-bottom. Use the FIRST matching condition:
| Priority | Condition | Suggestion |
|---|---|---|
| 1 | RPI run in-progress + phase=research | "Continue research: $research or $plan if ready" |
| 2 | RPI run in-progress + phase=plan | "Review plan: $pre-mortem to validate before coding" |
| 3 | RPI run in-progress + phase=implement | "Resume implementation: $implement <next-issue-id>" |
| 4 | RPI run in-progress + phase=validate | "Complete cycle: $validation to extract learnings and close out" |
| 5 | Evolve cycle in-progress | "Continue autonomous improvements: $evolve --resume" |
| 6 | In-progress issues exist | "Continue work: $implement <issue-id>" |
| 8 | Ready issues available | "Pick next issue: $implement <first-ready-id>" |
| 9 | Uncommitted changes | "Review recent work: $validation" |
| 10 | Clean state, nothing pending | "Session recovered. Start with $status to plan next work" |
If the user passed --json, output all recovery data as structured JSON:
{
"session_type": "rpi|evolve|none",
"rpi": {
"epic_id": "ag-l2pu",
"goal": "Implement...",
"phase": 2,
"phase_name": "plan",
"cycle": 1,
"started_at": "2026-02-15T14:33:36-05:00",
"elapsed_minutes": 120
},
"evolve": {
"cycle": 3,
"result": "improved",
"goals_fixed": ["goal1", "goal2"],
"timestamp":
Render this with a single code block. No visual dashboard when --json is active.
User says: $recover
What happens:
ao lookup --query "rpi recovery context" to load relevant knowledge$pre-mortem to validate before coding"Result: Dashboard confirms in-progress RPI session, loads context, suggests next step.
User says: $recover
What happens:
ao lookup --query "evolve cycle recovery"$evolve --resume"Result: Dashboard confirms evolve cycle, shows progress, offers resume command.
User says: $recover
What happens:
$status to plan next work"Result: Dashboard confirms clean state, points user to entry points.
| Problem | Cause | Solution |
|---|---|---|
| Shows "BD_UNAVAILABLE" or "GT_UNAVAILABLE" | CLI tools not installed or not in PATH | Install missing tools: brew install bd or brew install gt. Skill gracefully degrades by showing available state only. |
| RPI state shows wrong phase | Stale phased-state.json not updated | Check timestamp of .agents/rpi/phased-state.json. If stale, it may be from a previous run. Run $status to verify current phase. |
| Evolve history shows wrong cycle | Old cycle-history.jsonl entries not pruned | Tail -3 shows most recent entries. Check all entries with tail -20 .agents/evolve/cycle-history.jsonl. |
| Knowledge injection fails silently | ao CLI not installed or no knowledge artifacts | Ensure ao installed: brew install ao. If no learnings exist, run $validation to seed the knowledge base. |
| Suggested action doesn't match context | State-aware rules didn't capture edge case | Use --json to inspect raw state and verify which condition matched. Review priority table in Step 5. |
| JSON output malformed | Parallel bash calls returned unexpected format | Check each bash call individually. Ensure jq parsing works on actual data. Validate JSON structure before returning to user. |
scripts/validate.sh