Detect handoff state. Check for
.planning/HANDOFF.jsonvia Read tool. If missing, the session has no handoff — announce "No handoff found" and proceed to normal/gsd:progressrouting.Load STATE.md. Read
.planning/STATE.mdto restore the big-picture project position. If missing, reconstruct from.planning/ROADMAP.mdand the latest phase directory's SUMMARY.md files; if reconstruction fails, surface the error and stop.Read the handoff. Parse
.planning/HANDOFF.json. Extract phase, plan, task, status, source, uncommitted_files, decisions, context_notes, next_action. Per HANDOFF schema, all fields are always present (empty arrays / null for unset).Present project status. Emit a compact status block covering:
- Milestone + percent complete (from STATE.md frontmatter
progress.percent). - Current phase name and number.
- Plan / task position from the handoff.
- Handoff source (manual-pause vs auto-compact) and timestamp.
- Top 3 decisions and any blockers from the handoff.
- Uncommitted files summary.
- The
next_actionstring verbatim — it's the resumption hint.
- Milestone + percent complete (from STATE.md frontmatter
Route to the next action. Offer 1-3 concrete options based on handoff state. Common patterns:
- If task was mid-execute: offer
/gsd:execute-phasewith the current phase. - If phase is at plan boundary: offer
/gsd:plan-phaseor/gsd:execute-phasefor the next phase. - If there are uncommitted files that look in-progress: call attention to them before offering continuation.
- If task was mid-execute: offer
Clean up the handoff (LIFE-01). After routing — once steps 1-5 have completed without error — remove the handoff file:
node "${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/cache/gsd-plugin/current}/bin/gsd-tools.cjs" checkpoint --clearIf the command is unavailable for any reason, fall back to direct removal:
rm -f .planning/HANDOFF.jsonDo not abort the resume if cleanup fails — it's hygiene, not correctness. The next session's SessionStart will overwrite a stale handoff anyway (per D-05 from Phase 4: latest snapshot wins).
Gsd:resume Work
Resume work from previous session with full context restoration
Gsd:resume Work by majiayu000 · 2659e98
npx skillmds@latest add majiayu000/gsd-resume-work-2 File contents
---name: gsd-resume-work-2description: Resume work from previous session with full context restoration---
<objective>
Restore complete project context from a previous session — handling both manual pause (from `/gsd:pause-work`) and auto-compact (from the PreCompact hook) handoffs identically.
</objective>
<process>
1. **Detect handoff state.**
Check for `.planning/HANDOFF.json` via Read tool. If missing, the session has no handoff — announce "No handoff found" and proceed to normal `/gsd:progress` routing.
2. **Load STATE.md.**
Read `.planning/STATE.md` to restore the big-picture project position. If missing, reconstruct from `.planning/ROADMAP.md` and the latest phase directory's SUMMARY.md files; if reconstruction fails, surface the error and stop.
3. **Read the handoff.**
Parse `.planning/HANDOFF.json`. Extract phase, plan, task, status, source, uncommitted_files, decisions, context_notes, next_action. Per HANDOFF schema, all fields are always present (empty arrays / null for unset).
4. **Present project status.**
Emit a compact status block covering:
- Milestone + percent complete (from STATE.md frontmatter `progress.percent`).
- Current phase name and number.
- Plan / task position from the handoff.
- Handoff source (manual-pause vs auto-compact) and timestamp.
- Top 3 decisions and any blockers from the handoff.
- Uncommitted files summary.
- The `next_action` string verbatim — it's the resumption hint.
5. **Route to the next action.**
Offer 1-3 concrete options based on handoff state. Common patterns:
- If task was mid-execute: offer `/gsd:execute-phase` with the current phase.
- If phase is at plan boundary: offer `/gsd:plan-phase` or `/gsd:execute-phase` for the next phase.
- If there are uncommitted files that look in-progress: call attention to them before offering continuation.
6. **Clean up the handoff (LIFE-01).**
After routing — once steps 1-5 have completed without error — remove the handoff file:
```bash
node "${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/cache/gsd-plugin/current}/bin/gsd-tools.cjs" checkpoint --clear
```
If the command is unavailable for any reason, fall back to direct removal:
```bash
rm -f .planning/HANDOFF.json
```
Do not abort the resume if cleanup fails — it's hygiene, not correctness. The next session's SessionStart will overwrite a stale handoff anyway (per D-05 from Phase 4: latest snapshot wins).
</process>
<rules>
- Step 6 runs **last**, after all context is loaded and the user has been shown status. A failed/aborted resume (steps 1-5 error out) leaves HANDOFF.json on disk for recovery (per D-08).
- If `HANDOFF.json` is absent in step 1, skip everything — don't attempt to clean up what isn't there. `checkpoint --clear` is idempotent but unnecessary work.
- The skill is the single owner of HANDOFF.json deletion. The SessionStart hook must NOT delete — it only detects (per D-10).
</rules>
majiayu000/claude-skill-registry-data/tree/main/workflow/resume-work-davepoon-buildwithclaude commit 2659e9881b
Frequently asked questions
Run npx skillmds@latest add majiayu000/gsd-resume-work-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Resume work from previous session with full context restoration It is listed under Productivity on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: CAUTION, Skill Scanner: PASS. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
majiayu000 (@majiayu000) published this skill. Their other Agent Skills are listed on their SkillMD profile.