craft-handoff
Installation
SKILL.md
craft-handoff
Purpose
End the session with a paired handoff the next session can resume from:
- Rich doc —
~/.craftkit/handoff/docs/<worktree-slug>.md: the durable project narrative, archived and overwritten on the next same-project handoff. - Resume prompt —
~/.craftkit/handoff/pending/<timestamp>-<worktree-slug>.md: what the user pastes or the hook auto-loads; mirrored to the clipboard without frontmatter.
The two are a unit; never write one without the other. If the session holds no state worth carrying, write nothing and say so.
Workflow
<skill-dir> is the directory this SKILL.md was loaded from (an installed skill directory, or skills/craft-handoff in a source checkout).
- Gather. Run
node <skill-dir>/scripts/gather-state.mjsand use its--- Handoff target ---values (PENDING_PATH,DOC_PATH,ARCHIVE_DIR,WORKTREE_SLUG, frontmatter — addnext:to the doc's) verbatim. Without the script, gather branch, status, diff stat, and recent log with git and derive paths perreferences/operational-details.md. Outside a git repo, skip repo state and rely on the conversation. - Distill. Carry only what the next session cannot reconstruct from the diff: outcomes done, decisions with their
because, what didn't work, active blockers, and next steps with observable success criteria. Omit empty sections. If several unrelated threads are open, ask which to carry, or take the most recent and say so in the doc. - Write the doc, then the prompt. Rationale, alternatives, and time order go in the doc; orientation snapshots go in the prompt. If the doc changes after the prompt is composed, regenerate the prompt.
- Persist. Create
docs/,pending/, andarchive/under~/.craftkit/handoff/; archive the existingDOC_PATH; write the doc; write the prompt with frontmatter toPENDING_PATH; copy the prompt body to the clipboard: