resume-handoff
Skill1 starsChanged 4 months agoMITView on GitHub
Use when work won't finish before the quota or context runs out and must be paused and handed off — triggers include 额度快用完, 额度用完前干不完, 续命, 交接, 生成交接文档, handoff, context running low, 上下文快满, pausing mid-task, or another agent must pick up and continue unfinished work and recover context.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- EfiPerez/claude-code-skillstheir own version, first seen Nov 1, 2026
- desbma/agent-skillstheir own version, first seen Oct 27, 2026
- andymartinezot/claude-skillstheir own version, first seen Oct 20, 2026
- parcadei/Continuous-Claudetheir own version, first seen Oct 17, 2026
- koruworks/skillstheir own version, first seen Oct 15, 2026
- parcadei/Continuous-Claude-v2their own version, first seen Oct 8, 2026
Used with
Projects with it also use handoff.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- parcadei/Continuous-Claude★ 3.9ksame name
- parcadei/Continuous-Claude-v2★ 3.9ksame name
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- EfiPerez/claude-code-skills★ 4same name
- EnkrateiaLucca/skills★ 3same name
- corticalstack/flow★ 1same name
- desbma/agent-skills★ 1same name
- andymartinezot/claude-skills★ 0same name
- koruworks/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
When work spans more of a session than can safely finish, keep a handoff document that lets a fresh agent (with zero memory of this …
- Very specific: line 36
Run this the first time you checkpoint, then re-run the relevant steps on each refresh (it overwrites HANDOFF.md in place).
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Resume Handoff
Overview
When work spans more of a session than can safely finish, keep a handoff document that lets a fresh agent (with zero memory of this conversation) get oriented in minutes and continue from exactly where you stopped.
Two core principles:
- Write for a stranger. The next agent knows nothing. If it isn't in the file (or linked from it), it doesn't exist.
- Checkpoint as you go — never gamble on the last moment. See below.
Why checkpoint, not wait (the honest limitation)
You cannot reliably know when the session is about to end:
- Quota / rate limit: you receive no signal at all. Only the user sees remaining usage in the UI. You cannot self-detect "about to run out."
- Context window: semi-observable — the harness auto-compacts when it fills, but you have no exact token count.
- Hard cutoff mid-turn: you get no chance to act — no last-second save is possible.
So a design that waits until "I judge I'm about to run out" is unreliable by construction. The fix is to make HANDOFF.md a living document, refreshed at milestones, so that whenever the session ends, a recent checkpoint (at most one step stale) already exists on disk. Handoff becomes a heartbeat, not a deathbed event.
Refresh the handoff when:
- A sub-task completes, or you're about to start a long/risky step (write the checkpoint before it, not after).
- The user says 交接 / 续命 / handoff / 生成交接文档 / 快没额度了.
- You get a PreCompact / just-compacted reminder (context is filling — save now).
- You've done substantial work since the last refresh and none is captured yet.
Re-running is cheap and idempotent — it just overwrites HANDOFF.md. When in doubt, refresh. Do not use for finished work (just report results) or trivial one-step tasks.
Procedure
Run this the first time you checkpoint, then re-run the relevant steps on each refresh (it overwrites HANDOFF.md in place).
- Gather state — objective, what's done, what's left, key files, decisions, gotchas, next steps. Reconstruct from the actual conversation, not a guess.
- Fill the template — use template.md. Keep every section; write "N/A" if truly empty rather than deleting it.
- Reference, don't duplicate — link plans/PRDs/ADRs/diffs/issues/memory files by path or URL instead of pasting them.
- Redact secrets — no API keys, passwords, tokens, or PII in the file.
- Save to two places — run the helper so the doc lands both where the next agent will look and in a timestamped archive:
It writes# run save-handoff.sh from this skill's own directory # (the skill loader prints its base dir; default install: ~/.claude/skills/resume-handoff/) ./save-handoff.sh /path/to/drafted-handoff.mdHANDOFF.mdat the project root and archives a timestamped copy to your agent's handoffs dir (~/.claude/handoffs/on Claude Code,~/.codex/handoffs/on Codex; auto-detected). It refuses to clutter$HOME: if the working dir is your home directory, it archives only and tells you. - Tell the user where it saved and the one-line command the next agent should start with (see the template's first section).
What makes a handoff the next agent can actually use
| Include | Why |
| One-line objective + how to resume | Orientation in 10 seconds |
| Status split into done / in-progress / not-started | Next agent doesn't redo or skip |
Exact file paths (with :line) + run/test/build commands | No re-discovery of the environment |
| Decisions with reasons | Next agent won't reverse them blindly |
| Dead ends already tried | Stops repeating your mistakes |
| Ordered, concrete next steps | Continue, don't re-plan |
| Suggested skills + your runtime's memory entry points | Recover the "muscle memory" fast |
Common mistakes
- Writing to OS temp — gets wiped; the next agent can't find it. Save to the project + archive.
- Vague next steps ("continue the refactor") — give the actual next file and change.
- Summarizing the vibe instead of the state — paths, commands, and decisions beat prose.
- Deleting empty sections — the next agent won't know if "no blockers" means none or forgotten. Write "N/A".
- Waiting until it's too late — offer the handoff while budget remains, not at 0.
Platform notes
Runs on any skill-aware agent — the SKILL.md format is shared. Only a few bits are runtime-specific:
- Install path — Claude Code:
~/.claude/skills/resume-handoff/; Codex / cross-runtime:~/.codex/skills/or~/.agents/skills/. - Handoffs archive —
save-handoff.shauto-picks~/.claude/handoffs/or~/.codex/handoffs/(override withRESUME_HANDOFF_ARCHIVE_DIR). - Auto-nudge before compaction — the optional
PreCompacthook (precompact-hook.sh) is Claude Code-specific. On Codex or elsewhere, rely on the manual + milestone triggers (the primary path anyway). - Memory entry points — point the next agent at your runtime's memory: Claude Code auto-memory /
mem-search; CodexAGENTS.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

