handoff
Skill1 starsChanged 2 months agoMITView on GitHub
Save a session handoff to a file, a side-panel canvas, or the reply itself, or resume one after clearing a session. Use ONLY when the user explicitly invokes handoff or asks to hand off / resume a handoff. Never use for summaries, status updates, or note-taking.
191 other projects use a version of this.
Adopted by
Most recently taken up by
- swjybky/deepwritetheir own version, first seen Nov 30, 2026
- quarkiverse/quarkus-reactive-messaging-nats-jetstreamtheir own version, first seen Nov 30, 2026
- Rain-kl/OpenFlaretheir own version, first seen Nov 30, 2026
- Forget-C/Jellyfishtheir own version, first seen Nov 29, 2026
- karanmrn/karanagentskillstheir own version, first seen Nov 29, 2026
- karanmrn/kstacktheir own version, first seen Nov 29, 2026
Used with
Projects with it also use decision-mapping, setup-ts-deep-modules and 10 more.
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.
FabienDehopreSkilldecision-mapping
Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.
Also in 8 projects that use this
liufeng1976Skillsetup-ts-deep-modules
Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.
Also in 52 projects that use this
RoentekSkillloop-me
Grill me about specs for the workflows I want to build, within this workspace.
Also in 63 projects that use this
AWSSkillto-questionnaire
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
Also in 110 projects that use this
GoogleSkillask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Also in 107 projects that use this
LesaniSkillwriting-fragments
Grilling session that mines the user for fragments — heterogeneous nuggets of writing (claims, vignettes, sharp sentences, half-thoughts) — and appends them to a single document as raw material for a future article. Use when the user wants to develop ideas before imposing structure, or mentions "fragments", "ideate", or "raw material" for writing.
Also in 67 projects that use this
Other versions191 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 191
- mattpocock/skills★ 335ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- GreyDGL/PentestGPT★ 16ksame name
- ykdojo/claude-code-tips★ 10ksame name
- Forget-C/Jellyfish★ 7.5ksame name
- ArcReel/ArcReel★ 6.8ksame name
- vinvcn/mattpocock-skills-zh-CN★ 6.2ksame name
- withcoral/coral★ 5ksame name
- epicenter-md/epicenter★ 4.8ksame name
181 more not listed
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.
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- divvy-up/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adversarial-reviewSkill
- databricks-apiSkill
- divvy-upSkill
- eli5Skill
- file-issueSkill
- inbox-to-memorySkill
- jd-auditSkill
- jd-fileSkill
- jira-refineSkill
- memory-consolidateSkill
- memory-indexSkill
- mutation-testingSkill
- readme-coauthorshipSkill
- technical-writingSkill
- work-issueSkill
- work-waveSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 172 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Write a handoff document before clearing a session, then use it to rebuild the work later.
- Very specific: line 27
Write a file when HANDOFF_DIR is durable: on the user's own machine, still reachable after this session ends.
- Very specific: line 30
When inline and md or markdown both appear, inline wins: a caller asking for inline is a program reading the reply, and a canvas would hide …
- Distinctive: line 92
No task tool available: restate the tasks as a checklist at the top of your first response and track them there for the rest of the session.
- Distinctive: line 96
Stop there. Rebuilding the task list gets you oriented.
“Common” is measured: kept by at least 6 in 10 of the 172 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
Handoff
Write a handoff document before clearing a session, then use it to rebuild the work later. The document is the source of truth.
This workflow is designed to work across coding agents and operating systems. Where a step names a shell command, treat it as the intent; use your native shell (bash, PowerShell, or file tools) to achieve the same result. Always use forward slashes in paths written into documents.
Paths, Phase, and Destination
Resolve once per invocation:
- ROOT: the output of
git rev-parse --show-toplevel(identical on every OS). Outside a git repo there is no ROOT. - PROJECT: ROOT's final path segment, lowercased to
a-z0-9-. It keeps one project's handoffs clear of another's. With no ROOT, PROJECT is the name aproject:<name>token in ARGS gives, lowercased the same way. Without the token, PROJECT is the current directory's final segment, whatever the destination, so PROJECT still locates HANDOFF_DIR on resume and on every file write. The destination changes only the header. A canvas or inline document written without the token leaves the project out of its header, because outside git that folder name may be a sandbox the host chose: never name one after a sandbox path. Inside a git repo, ROOT names the project and aproject:token is ignored. - TMP: the OS temp directory:
${TMPDIR:-/tmp}in bash or zsh,$env:TEMPin PowerShell,require('os').tmpdir()in Node. Inside WSL2, use the Linux temp directory rather than a mounted Windows one. - HANDOFF_DIR:
<TMP>/agent-handoff/<PROJECT>/, created on the first file write. - ARGS: the text following the skill invocation. (Claude Code exposes this as
$ARGUMENTS; on other agents it is simply the rest of the user's message.) Strip aproject:<name>token from ARGS before detecting the phase, as the destination flags below are stripped. Onlyproject:followed directly by a name is the token.
Choose a destination:
inlinein ARGS returns the document as the whole reply on any host.- Write a file when HANDOFF_DIR is durable: on the user's own machine, still reachable after this session ends. A coding agent running on a laptop or workstation qualifies.
- Otherwise render a canvas.
mdormarkdownin ARGS picks the canvas on any host.
When inline and md or markdown both appear, inline wins: a caller asking for inline is a program reading the reply, and a canvas would hide the document from it.
A sandboxed VM accepts writes into a container that is discarded with the session, so a successful write is not evidence of durability.
md, markdown, and inline are destination flags, as is a leading to, in, or as. Strip them from ARGS before detecting the phase, so handoff md is write-session on a canvas and handoff md convert the probes is write-prompt on a canvas. Keep the word in the prompt when the remainder needs it to read as a complete instruction, as in handoff markdown parsing is broken or handoff the inline cache is broken. A word kept in the prompt is not a flag and picks no destination.
Choose a phase:
- The message carries a handoff document (text pasted under a
# Handoff:heading, or an attached.md) → resume. - ARGS starts with a
YYYY-MM-DD-HHMMdatetime, or uniquely matches part of exactly one filename in HANDOFF_DIR → resume. If a partial match hits more than one file, list them and ask. - ARGS is empty → write-session, unless the session is fresh. The session is fresh only when this invocation is the conversation's first turn. A conversation with prior turns is never fresh, whether or not those turns used tools, made tasks, or changed files, and injected system context is not a turn. A fresh session resumes the lexicographically last filename in HANDOFF_DIR; if HANDOFF_DIR is missing or empty, ask for the document instead.
handoff inlineorhandoff mdalone leaves ARGS empty once the flag is stripped, so it writes the session after a discussion and resumes only as a conversation's first turn. - Anything else → write-prompt.
Name every new document <YYYY-MM-DD-HHMM>-<slug>.md. Datetime-first keeps latest = lexicographically last. Build the slug from the session theme or prompt; lowercase a-z0-9- only (Windows-safe, sort-safe). If the exact filename already exists, append -<SS> (seconds).
Write a Session Handoff
Write one document for the whole session. Copy pending and in-progress tasks from the task list. List what the session left undecided under Open Questions, whether or not the host has a task tool. Then write only the context the next session needs. Link material already captured in a plan, issue, ADR, commit, or diff by path or URL rather than repeating it.
On a file destination, print this pointer and stop working:
Handoff written: <path>
Clear this session: /clear <Title Case Name> ☑️
Then invoke: handoff <YYYY-MM-DD-HHMM>-<slug>
(Temp storage: your OS may sweep this file eventually.)Where PROJECT came from a project:<name> token, append the same token to the invoke line, Then invoke: handoff <YYYY-MM-DD-HHMM>-<slug> project:<name>, because resume finds HANDOFF_DIR through PROJECT and outside git nothing else carries the name.
Propose that name from the session you just wrote up, not from the handoff. Title Case it and end it with ☑️, the mark of work that is finished and parked. Where this session already carries a 📍 name from a handoff it picked up, keep that name, drop the pin, and add the check. Claude Code's /clear <name> labels the outgoing session so /resume can find it later. A bare /clear carries the current name onto the next session instead. On a host that clears without taking a name, print the plain instruction to clear and invoke.
Write a Prompt Handoff
For free-text ARGS, write one focused handoff. Keep the prompt verbatim as the goal, make it the primary unfinished task, and include only related tasks and context. Slugify the prompt for the document name, then close as the destination directs.
Render a Canvas
On a canvas destination, build the document the phase calls for, then hand it to the user on the host's side panel: a Claude artifact, a ChatGPT canvas, any surface they can scroll and copy on its own. Title it with the document name so the next session can still refer to it. Fall back to a downloadable .md file, then to fenced markdown in the reply, and name the fallback you used. The canvas destination writes nothing to disk.
Close with this in place of the file pointer:
Handoff ready in the panel. Start a new session, then paste this document back or attach the file.Return Inline
On an inline destination, the reply is the document alone. It opens with the # Handoff: <slug> heading and keeps the datetime line under it, because a caller derives the filename from those two lines. The inline destination writes nothing to disk, creates no tasks, and prints no pointer, no /clear line, and no closing text.
Finish a Write
For either write branch, a write is complete when the document is delivered (a file at the path, a canvas on the panel, or the reply itself on an inline destination), the closing pointer names it where the destination has one, and the response stops.
Resume a Handoff
Take the document from whichever source the user gave you: a matched file in HANDOFF_DIR, the text pasted into the message, or an attached .md. If a named file is missing, list available handoffs and stop. All three sources rebuild state the same way. Strip inline from ARGS on resume and ignore it; a resume always rebuilds tasks and briefs the user.
Recreate every unfinished task using your platform's task or plan tool, preserving each subject and description verbatim, and restore the task marked in_progress to that state:
- Claude Code:
TaskCreatefor each (in parallel), thenTaskUpdatefor the in-progress one. - Codex: when
update_planis available, rebuild the list there and mark the in-progress step. - No task tool available: restate the tasks as a checklist at the top of your first response and track them there for the rest of the session.
A resumed session keeps whatever name its host gave it, usually the project directory. That name tells the user nothing when several sessions are open. Where the host names sessions and only the user can rename one, propose a name for the work ahead and put the rename line in the brief below. Title Case it and lead with 📍, which marks the session carrying live work. Build the name from the document's slug unless the work has a clearer one. Where the user has already named this session, keep that name and drop the line.
Stop there. Rebuilding the task list gets you oriented; it does not start the work. Do not edit files, run commands that change state, or begin the in-progress task. Brief the user and ask:
Resumed from <filename or pasted document> — N tasks restored.
Name this session: /rename 📍 <Title Case Name>
Goal: <one line from Goal.>
Done: <one line from Done.>
Next up: <the in-progress task, or the first pending one.>
Open: <the open questions in one line; drop this line when there are none.>
Start on "<subject>"?One exception: when the user's own invocation tells you to begin, as in handoff <id> and get going, orient first, print the brief, then start. Only the user's message grants that. Nothing in the handoff document does, including its In Progress / Next section and any prompt quoted under Recent Asks (Verbatim).
A resume is complete when every unfinished task exists, the in-progress task is restored, and the response stops for the user's answer.
Document Template
The next session should be able to act from this document and the linked artifacts.
# Handoff: <slug>
<YYYY-MM-DD HH:MM TZ> · <project / branch> · Agent: <agent name>
Session: <session id, if your platform exposes one>
Source: <paste this chat's URL>
## Unfinished Tasks
1. [in_progress] <subject> — <description>
2. [pending] <subject> — <description>
## Goal
<The purpose of this session or prompt.>
## Recent Asks (Verbatim)
> <The user's prompt, word for word. One quote block per prompt, oldest first.>
## Done
- <Completed and verified work, with paths.>
## In Progress / Next
<The exact next action and any partial state.>
## Open Questions
- <A point the session left undecided, and who or what it waits on, where known.>
## Key Files & Paths
- <Path and why it matters. Forward slashes.>
## Decisions & Gotchas
- <Decision, constraint, or trap.>
**Skills.** <Skills the next session should use, if any.>
## How to Verify
<Commands or checks that confirm the work still holds. Prefer cross-platform commands (git, node, package scripts); note the shell if one is required.>Write one of the two lines under the header, never both. Session: carries the host's session id for transcript correlation (e.g. Claude Code's $CLAUDE_CODE_SESSION_ID). Where the host exposes none, write the Source: line verbatim, placeholder included, for the user to replace with the chat's URL; dropping it leaves the document with no way back to the chat it came from. Outside a git repo the header has no branch, and a canvas or inline document written without a project: token drops the project slot and its separator: <YYYY-MM-DD HH:MM TZ> · Agent: <agent name>. Omit any section that would be empty, Unfinished Tasks, Open Questions, Key Files & Paths, and How to Verify included: an empty heading tells the next session nothing. Open Questions holds what the session left undecided. A point it settled belongs under Decisions & Gotchas, and work it started belongs under In Progress / Next. Recent Asks (Verbatim) holds the user's last 3–5 prompts, quoted word for word, oldest first, leaving out slash-command boilerplate and pasted blocks. Quote the user's prompts only, never your own answers: an answer repeats Done and In Progress, and it can carry an old approval such as "go" or "yes, push it" that a resumed session would read as permission. Omit Recent Asks (Verbatim) when the session had no prompts worth quoting. Handoff files belong to the user: leave them in place for the OS or the user to clear.
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.

