.claude/skills/dan-resume/SKILL.md
Restore session from STATE.md and continue where work left off
npx skillsauth add RavBogard/DAN dan:resumeInstall 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.
Restore a previous session from STATE.md and continue execution from where work left off. Reads the last position, verifies commits exist, and resumes the appropriate skill.
Runs in-session initially for state restoration, then delegates to the appropriate skill for continued execution.
State operations use the DAN CLI:
DAN="node $HOME/.claude/dan/bin/dan-tools.cjs --cwd $PROJECT_DIR"
# Restore session (returns position, next_action, decisions, blockers)
$DAN session restore
# Determine next action independently
$DAN session next-action
# Read full state
$DAN state read
# Update status
$DAN state set "Status" "Milestone in progress"
<execution_flow>
Call the session restore CLI to retrieve the saved position:
DAN="node $HOME/.claude/dan/bin/dan-tools.cjs --cwd $PROJECT_DIR"
RESTORE_JSON=$($DAN session restore)
The restore command returns:
{
"position": {"phase": 3, "plan": "03-02", "task": 2, "stage": "apply", "wave": 1},
"next_action": {"action": "resume", "skill": "dan:apply", "args": "03-02"},
"decisions": ["...settled decisions..."],
"blockers": ["...recorded blockers..."]
}
Guard: Check for valid paused session.
status field from STATE.md frontmatter.paused, inform the user: "No paused session found. Current status: [STATUS]. Use /dan:status to see project state."paused but position fields are empty/missing, inform the user: "Session marked as paused but no position data found. Use /dan:status to inspect STATE.md."paused AND position data exists.Extract from the restore result:
position.phase -- which phase was activeposition.plan -- which plan was being executedposition.task -- which task number (0 = not started, N = mid-task)position.stage -- pipeline stage nameposition.wave -- wave number for parallel executionnext_action -- pre-computed next skill recommendationdecisions -- settled decisions (do NOT re-litigate)blockers -- issues recorded at pause timeConfirm the pause point is anchored in git history:
# Check for the WIP commit from pause
git log --oneline -20 | grep -i "wip.*pause"
Check for uncommitted changes that might conflict:
git status --short
.planning/ only: Likely from a manual edit. Note it but proceed.Build a context briefing from STATE.md and completed work. This ensures Claude has the right mental model before continuing execution.
$DAN state read
From the Decisions section, extract all logged decisions. Display them as a brief list:
Settled decisions (do not re-litigate):
- [decision 1]
- [decision 2]
...
These are final. They were made during prior sessions and should be treated as constraints, not suggestions.
From the Blockers/Concerns section, list any that were recorded:
Active blockers/concerns:
- [blocker 1]
- [concern 2]
If blockers were recorded at pause time, they need attention before resuming. If any blocker is marked as resolved, note that.
Check for completed plan summaries in the current phase:
ls .planning/phases/PHASE_DIR/*-SUMMARY.md 2>/dev/null
For each summary found, read the one-liner and key decisions to build context about what has already been accomplished in this phase. Do NOT read full summaries -- just the frontmatter decisions field and the title one-liner.
Present a compact summary:
Resuming session:
Position: Phase PHASE, plan PLAN_ID, task TASK of TOTAL
Stage: STAGE
Wave: WAVE
Completed in this phase:
- [summary one-liners from 3c]
Settled decisions: N decisions loaded (see STATE.md)
Active blockers: N (or "none")
Use the next_action from the restore result to identify the correct skill:
# Or compute independently:
NEXT=$($DAN session next-action)
Map the pipeline_stage to the correct skill invocation:
| pipeline_stage | Skill to invoke | Arguments |
|----------------|----------------|-----------|
| research | dan:research | Phase number (e.g., 3) |
| plan | dan:plan | Phase number (e.g., 3) |
| apply | dan:apply | Plan ID (e.g., 03-02) |
| unify | dan:unify | Plan ID (e.g., 03-02) |
| verify | dan:verify | Phase number (e.g., 3) |
| bugsweep | dan:bugsweep | Phase number (e.g., 3) |
Mid-task resume logic:
position.task > 0 and stage is apply, the plan was mid-execution.<completed_tasks> context or verify task commits exist:
git log --oneline -20 | grep "feat(PLAN_ID)\|fix(PLAN_ID)\|test(PLAN_ID)"
Transition status from paused to active:
$DAN state set "Status" "Milestone in progress"
Note: The pipeline_* frontmatter fields are intentionally left in place. They serve as a breadcrumb trail and will be updated by the next session save or cleared when the plan completes.
Update the last activity:
$DAN state set "Last activity" "$(date -u +%Y-%m-%d) -- Resumed STAGE on PLAN_ID from task TASK"
$DAN state set "Last session" "$(date -u +%Y-%m-%d)"
Invoke the next skill:
Follow the skill mapping from Step 4. Execute the skill's execution_flow with the determined arguments. For example, if resuming mid-apply on plan 03-02 at task 2:
03-02-PLAN.mdThe resume is complete once the delegated skill takes over. From that point, normal execution rules apply -- including the ability to pause again via dan:pause.
</execution_flow>
data-ai
Core DAN workflow protocol and conventions injected into all agent contexts
testing
Spawn verifier agent to validate phase outputs against requirements and success criteria
tools
Close the loop on a completed plan by writing SUMMARY.md and updating state
tools
Show current project progress, blockers, and suggest the next action