handoff
Skill0 starsChanged 7 days agoMITView on GitHub
Write or update this thread's handoff file in the repo's handoffs folder in ~/.claude/handoffs/ (or, for an orchestrator session, its _overview.md) so the next Claude Code session, in any worktree of the repo, can continue this work from a clean context. Use when the user says handoff, wrap up, save progress, or before /clear on unfinished work, when a task or part of a plan is finished and the rest continues in a new session, or when a hook asks for a handoff.
- Reads credentials
191 other projects use a version of this.
Adopted by
Most recently taken up by
- xiaoxiaosrm/dsh-mattpocock-skillstheir own version, first seen Nov 8, 2026
- ethosagent/ethostheir own version, first seen Nov 8, 2026
- dsifry/metaswarmtheir own version, first seen Nov 8, 2026
- glebis/claude-skillstheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 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 42 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 93 projects that use this
GoogleSkillask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Also in 87 projects that use this
RoentekSkillloop-me
Grill me about specs for the workflows I want to build, within this workspace.
Also in 51 projects that use this
LesaniSkillwriting-beats
Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.
Also in 54 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★ 309ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- GreyDGL/PentestGPT★ 16ksame name
- ykdojo/claude-code-tips★ 10ksame name
- ArcReel/ArcReel★ 6.3ksame name
- vinvcn/mattpocock-skills-zh-CN★ 5.5ksame name
- withcoral/coral★ 4.9ksame name
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/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 repository10 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- design-checkSkill
- playbookSkill
- prSkill
- retroSkill
- spec-firstSkill
- systematic-debuggingSkill
- tddSkill
- ux-principlesSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 172 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Write the state of the current work to this thread's handoff file, so a fresh session can pick it up without re-reading this conversation.
- Very specific: line 25
Never write a handoff inside a linked worktree.
- Distinctive: line 30
Keep it under 80 lines. Be specific: file paths, function names, commands, exact errors.
- Distinctive: line 31
Only include what the next session needs.
- Very specific: line 32
Keep every heading of the template (the done rule below is the only exception).
- Very specific: line 33
Never include secrets, API keys, passwords or .env values.
- Distinctive: line 37
Other threads' files: never edit, overwrite or delete them.
- Very specific: line 42
If this session is the orchestrator, write _overview.md (see Orchestrator below).
- Distinctive: line 50
Check git status and git diff --stat so "Done" reflects what actually changed.
- Very specific: line 129
If Status: done, skip the prompt: say the work is finished and the handoff is marked done.
“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 the state of the current work to this thread's handoff file, so a fresh session can pick it up without re-reading this conversation. Then give the user a prompt to paste into that session.
A thread is one line of work with a goal (for example "best score"); it may span several branches, one per PR of a plan. Each thread has one file, <slug>.md, in the repo's handoffs folder, the same folder from every worktree of the repo. It is outside the repo: a file inside a linked worktree is deleted with the worktree, and Claude Code refuses writes from a desktop-app worktree (.claude/worktrees/<name>) into the main checkout. Print its path with this one command, run in a single Bash call from anywhere inside the current checkout:
common=$(git rev-parse --path-format=absolute --git-common-dir)
if [ "$common" = "$(git rev-parse --path-format=absolute --git-dir)" ]; then main=$(git rev-parse --show-toplevel)
elif [ -n "$(git --git-dir="$common" config core.worktree)" ]; then main=$(git --git-dir="$common" rev-parse --show-toplevel)
elif [ "${common##*/}" = .git ]; then main=${common%/.git}
else main=""; fi
[ -n "$main" ] && echo "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/handoffs/$(printf '%s' "$main" | LC_ALL=C tr -c 'A-Za-z0-9' '-')"It finds the main checkout (this checkout, the submodule's checkout for a linked worktree of a submodule, or the parent of the common .git) and names the folder after its path, every byte other than a letter or digit replaced by -, as the SessionStart hook does: /Users/me/Developer/app gives ~/.claude/handoffs/-Users-me-Developer-app. If it prints nothing (a linked worktree of a --separate-git-dir repo), there is no main checkout to use: tell the user the handoff cannot be shared across worktrees and ask where to write it. Moving or renaming the main checkout changes the name, so its threads stay in the folder of the old path.
Old folder: thread files used to live in <main checkout>/docs/handoffs/. The hook still loads and lists them, and names their path. To update one, write it to the handoffs folder under the same slug and leave the old file alone: the hook ignores it from then on. Never write new files there.
Never write a handoff inside a linked worktree. If a write to the handoffs folder is refused, do not work around it through Bash: tell the user and ask where to write. Not a git repo: use docs/handoffs/<slug>.md in the current folder.
Rules
- Overwrite the file. It describes the current state, not a history. Git holds the history.
- Keep it under 80 lines. Be specific: file paths, function names, commands, exact errors. No narrative.
- Only include what the next session needs. Leave out anything already in
CLAUDE.md, except under Verify with: that section always has the command and what a pass looks like, even whenCLAUDE.mdnames the command. - Keep every heading of the template (the
donerule below is the only exception). A section with nothing to say gets one line,- none.Updatedis local time. - Never include secrets, API keys, passwords or
.envvalues. - Branch is the branch this thread's commits are on, normally the current branch (
git branch --show-current), and is updated when a plan moves to its next branch. Not a git repo:none. - Status is about the whole goal, not the last task. Finishing one task, subtask or part of a plan is
in-progress. Usedoneonly when nothing is left in Next steps; then keep only Goal and Done. - Plan in progress (an epic from
spec-first, file indocs/plans/): the plan and spec are committed on the thread's branch, so name them by repo path (docs/plans/<plan>.md); a new session gets them aftergit switch <branch>. If the plan is untracked (older epics), say so under Gotchas. List only the remaining tasks, each asTask N: <short description>, numbered as in the plan (for exampleTask 5.2) and with "Task" in the conversation's language. The description is the task's In short line from the plan, or, if it has none, one short plain sentence (about 15 words) written from the task's text: the gist of what the user will see or get, not a list of features, no codes or type names they would have to look up, and never only the title. The plan holds the details; do not copy anything else from it. - Other threads' files: never edit, overwrite or delete them.
- Language: write the content in the language of this conversation. These parts stay exactly as in the template in every language (the SessionStart hook reads
Status:,Branch:and## Next steps, and a fixed layout keeps handoffs comparable): the# Handoff:and# Overview:title prefixes, theStatus:,Updated:andBranch:keys, the valuesin-progressanddone, and the##section headings.
Which file
If this session is the orchestrator, write _overview.md (see Orchestrator below). Otherwise, the first that applies:
- The thread file (in the handoffs folder or the old folder) that the SessionStart hook loaded (not merely listed) and this session continued, or that the user asked this session to continue. This holds after you switched to a new branch too.
- An in-progress thread file whose
Branch:is the current branch (the newest, if several), only if this session worked on that thread's goal. - A new file. Slug: kebab-case
[a-z0-9-]from the task name (best-score), never from the branch. If<slug>.mdalready exists in the handoffs folder or the old folder, it belongs to another thread (done or not): use<slug>-2,<slug>-3, ..., the first that is free.
Before writing
- Check
git statusandgit diff --statso "Done" reflects what actually changed. - The Write tool creates the handoffs folder if it does not exist.
- Legacy file: if the current checkout has
docs/handoff.md(the old single-file handoff) for the same work, for example because the hook loaded it, carry its still-relevant content (decisions, gotchas, next steps) into the file you write, then deletedocs/handoff.md. If it describes other unfinished work, leave it.
Format
# Handoff: <short task name>
Status: in-progress | done
Updated: <YYYY-MM-DD HH:MM>
Branch: <current git branch>
## Goal
One or two sentences: what we are building or fixing, and what "done" looks like.
## Done
- <change> (`path/to/file`)
## Next steps
1. <first concrete action, with file/function>
2. ...
## Decisions and constraints
- <decision made and why; things the user ruled out>
## Gotchas
- <what failed or misled us, so the next session does not repeat it>
## Verify with
- `<command>`: <what a pass looks like>Orchestrator
The orchestrator is a session that coordinates worker sessions in other worktrees; it usually runs in the main checkout, and the hook loaded _overview.md for it. It writes _overview.md in the handoffs folder instead of a thread file, and reads the workers' thread files for their state but never edits them. Worker sessions never write _overview.md. The orchestrator does not run spec-first's build loop itself; the workers do. The Rules above apply; Status is done when every thread is merged or dropped.
# Overview: <short goal>
Status: in-progress | done
Updated: <YYYY-MM-DD HH:MM>
Branch: <current git branch>
## Goal
One or two sentences.
## Plan
- `docs/plans/<plan>.md`, `docs/specs/<spec>.md`, committed on `<branch>` (or: none)
## Threads
| Thread | Branch | Worktree | Current task | State |
|---|---|---|---|---|
| <slug> | <branch> | <path> | Task N: <short description> | working / PR open <link> / merged / not started |
## Waiting to merge
1. <PR link>: <what it adds; merge order or dependency>
## Next steps
1. <first concrete action>
## Decisions and constraints
- <decision made and why>After writing
Your final message, including the prompt, is in the language of this conversation and has exactly these parts:
- One line: the full path of the file written, plus, if you found a legacy
docs/handoff.md, that you moved and deleted it (or left it because it describes other work). - The prompt, in a fenced
textblock. The shapes below are in English, but write the whole prompt in the conversation's language; only the slug and file paths stay as they are.- Same repo (the default, any worktree or the main checkout): 1–3 lines naming the slug and the one next step. Shape:
Continue thread <slug> (<absolute path of the thread file>). Start with <the next step>.For a plan the second sentence isInvoke spec-first, then start with Task N: <short description>.Orchestrator:Continue orchestrating from <absolute path of _overview.md>; the workers run spec-first, not this session.plus the next step. - Another repo, another tool, or no git: the hook will not find the file, so the prompt must stand alone. Include the target folder, the goal, the next steps and the decisions and constraints, taken from the handoff, and for a plan, that
spec-firstcomes first. Up to about 25 lines.
- Same repo (the default, any worktree or the main checkout): 1–3 lines naming the slug and the one next step. Shape:
- How to start, one or two lines. The hook loads the thread file in any worktree on its branch and otherwise lists it, and the prompt names the slug, so the next session finds it either way. A branch is checked out in one worktree at a time, so name the case that applies:
- The branch is still checked out here:
/clearhere and paste the prompt. - A new session in another worktree: close this one first. If the app created this worktree, archive this session; otherwise
git worktree remove <path>from the main checkout. If this is the main checkout, switch it to another branch instead. - Orchestrator:
/clearor a new session in the main checkout. - Stand-alone (another repo, tool or no git): "open a new session in
<folder>and paste the prompt".
- The branch is still checked out here:
If Status: done, skip the prompt: say the work is finished and the handoff is marked done.
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.

