handoff · prathamdby — Claude Code skill: save context, resume later
This skill writes your agent's working context to a file and picks the work back up from it. Useful when a session ends mid-task or you move to another machine.
npx skills add prathamdby/skills --skill handoff -a claude-codeWhat handoff does
Two modes, chosen by how you phrase the request. Create mode gathers what still matters: the plan, branch, PR and commits, dirty paths, blockers, settled decisions. The result lands in a file named like <anchor>/handoffs/handoff-<YYYY-MM-DD-HHmmss>.md. Resume mode reads such a document, checks paths, branch state and commits, flags anything superseded, then starts the highest-priority task that isn't blocked.
Sensitive values get stripped before writing. Tokens, cookies, keys, passwords, private URLs, emails and environment values are replaced with markers such as [REDACTED: token] or NAME=[REDACTED]. Variable names, command shapes and exit codes stay. The file is capped at 12 KB, eight open tasks and twelve artifacts, and full diffs, plans or logs never make it in.
Say “Save to <path>” to create at that location, “resume <path>” to continue from one. Give both, or neither, and the skill stops instead of guessing. A live focus in the current session wins over the saved one, so the resumed work may not follow the old plan exactly.
What it helps with
- carry context across agent sessions
- record blockers and open tasks before a pause
- resume from a saved document instead of restarting
- strip tokens and passwords from shared context
- check stale paths and commits before continuing
Example prompts for the agent
- Save a handoff: Save to
handoffs/session.md - Pick up where we left off: resume
handoffs/handoff-2025-03-14-101500.md - Create a handoff for this branch and its open tasks
How to install handoff
1Skills CLI (Vercel)
npx skills add prathamdby/skills --skill handoff -a claude-code2Manually: put the files in place
~/.claude/skills/handoff/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/handoff/
1Skills CLI (Vercel)
npx skills add prathamdby/skills --skill handoff -a codex2Manually: put the files in place
.agents/skills/handoff/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add prathamdby/skills --skill handoff -a cursor2Manually: put the files in place
.cursor/skills/handoff/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install prathamdby/skills handoff2Manually: put the files in place
.github/skills/handoff/SKILL.md1Skills CLI (Vercel)
npx skills add prathamdby/skills --skill handoff -a gemini-cli2Platform CLI
gemini skills install https://github.com/prathamdby/skills --path skills/engineering/handoffManually: put the files in place
.devin/skills/handoff/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add prathamdby/skills --skill handoff -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about handoff
How do I install handoff in Claude Code?
Run npx skills add prathamdby/skills --skill handoff -a claude-code. The skill lands at ~/.claude/skills/handoff/SKILL.md.
What does handoff do?
It saves the current working context to a markdown file and later continues from it. On resume it verifies paths, branch and commits so stale facts don't drive the next steps.
What ends up in the handoff file?
Plan, branch, PR and commits, dirty paths, blockers and decisions. Tokens, passwords, keys, private URLs and emails become [REDACTED: …] markers.
Source text
SKILL.md · MIT
--- name: handoff description: > handoff to save resumable context or continue from a validated handoff document. --- # Handoff ## Route and privacy Default create: `<anchor>/handoffs/handoff-<YYYY-MM-DD-HHmmss>.md`, with anchor this skill's absolute directory. "Save to <path>" selects create there; "resume <path>" selects resume. Both together, missing values, or malformed required Context/Open tasks block. Resolve all paths absolutely. A named live focus overrides the saved one. Redact tokens/cookies, keys, passwords/connection credentials, private or authenticated URLs, emails/PII, certificates, and environment values. Use `[REDACTED: token]`, `[REDACTED: password]`, `[REDACTED: private-key]`, `[REDACTED: pii]`, or `[REDACTED: url]` for those values. Environment values become `NAME=[REDACTED]`. Preserve variable names, command shapes, exit codes, and artifact pointers, not sensitive values. Never weaken redaction to make a command copyable. No full diffs/plans/logs/transcripts. The bound is 12 KB, eight open tasks, twelve artifacts; one to five bullets per section, omitting empty optional sections. ## Create 1. Resolve a writable path/parent. Record `create | path | facts | redaction | written | terminal`. Done when output can be written. 2. Select actionable current facts: plan, branch/PR/commits, dirty paths, blockers, durable decisions; mark superseded material. Apply `references/create.md` to draft required sections and workflow state. Done when each fact helps the next agent act. 3. Scan draft twice for sensitive values, validate bounds/sections, atomically replace through a sibling temporary file, then scan the final file. Done when structure, bounds, three scans, and existing file pass. 4. Report path, captured scope, and `resume the handoff at <absolute-path>`. Done when file and resume instruction exist. ## Resume 1. Resolve/read; absent → BLOCKED with path. Record `resume | focus | artifact status | task | terminal`. Done when required Context/Open tasks are valid. 2. Apply `references/resume.md` to verify paths, branch/dirty state, commits, PRs, and installed skills; classify current/moved/missing/superseded. Redact while reading referenced artifacts. Done when stale facts cannot act. 3. Choose highest-priority unblocked task under live focus and begin it, recovering only its artifact context. No task → evidenced BLOCKED, not another summary. Done at success, a real blocker, or confirmation gate. 4. Report drift and work outcome. Create no new handoff unless requested. Terminals: SUCCESS, BLOCKED, AWAITING_USER, INTERRUPTED, with evidence. On interruption revalidate artifacts touched since the last validation.
© prathamdby · MIT · prathamdby/skills
Similar skills
All skills for Agent setup: memory, context, orchestration →handoff by other authors comes first.