handoff
Skill0 starsChanged 6 months agoMITView on GitHub
Create a structured handoff document at context/handoff.md at the end of a session so the next agent can onboard without prior context. Uses git to discover modified files, filters out ephemeral subagent work artifacts under context/, enforces a strict format, and validates the result with a lint script. The handoff is the single source of truth for the next session. Use whenever a session ends, a task is paused, or work is being passed to another agent.
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 repository5 other files it gives its agents.
- harness-auditSkill
- i-did-not-catch-thatSkill
- readme-updateSkill
- simple-issuesSkill
- the-gistSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 9 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 172 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
If a subagent produced a long artifact (e.g.
- Distinctive: line 32
Do not use this skill for trivial one-off tasks where there is nothing meaningful to hand off.
- Distinctive: line 36
Before writing the document, collect the following.
- Very specific: line 46
Ephemeral subagent artifacts to distill: read every file under context/ (except context/handoff*.md), extract the durable content, and fold …
- Very specific: line 58
Gitignored files: run git check-ignore -v <path> for each candidate.
- Distinctive: line 62
If you are uncertain whether a file is real work or a work artifact, keep it visible to the user.
- Very specific: line 66
Read TEMPLATE.md from this skill directory.
- Very specific: line 67
Before filling sections, read all context/*.md files that aren't handoffs and absorb their content.
- Distinctive: line 69
Keep the section order and heading text exactly as in the template.
- Very specific: line 70
Write the result to <project-root>/context/handoff.md.
- Distinctive: line 71
Do not commit the handoff.
- Very specific: line 72
Do not delete the ephemeral context/* files yourself.
- Distinctive: line 76
After writing the file, run the linter:
- Distinctive: line 88
Write in English regardless of the conversation language.
- Distinctive: line 90
Prefer lists over prose for files, commits, steps, and risks.
- Distinctive: line 92
Never invent commits, files, or test results.
“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
This skill produces a single, self-contained Markdown document that lets a fresh agent (or human) pick up the work without needing prior context, conversation history, or this skill itself loaded.
The output is always written to context/handoff.md relative to the project root.
The source-of-truth rule
context/handoff.md is the only durable artifact this skill produces. Everything else under context/ — context/plan.md, context/research.md, context/notes.md, inter-subagent coordination files, intermediate task lists — is ephemeral. It belongs to the current session, may be wiped between sessions, and must not be relied on by the next agent.
Consequences for how you write the handoff:
- Do not link or reference ephemeral
context/*files as if the next agent could open them. They may not exist. - Distill the useful parts of those files (key findings from research, surviving items from the plan, decisions taken, dead ends explored) directly into the relevant sections of the handoff.
- The only files under
context/that may be referenced are other handoffs (context/handoff*.md), because those follow the same persistence contract. - If a subagent produced a long artifact (e.g. a survey of 12 libraries) and inlining all of it would bloat the handoff, summarize the conclusion and the rejected options with one-line reasons. Do not write "see
context/research.md".
The linter warns on context/*.md references that aren't handoffs. Treat the warning as a smell, not a false positive.
When to use
- A session is ending and work is not finished.
- A task is being paused and may be resumed later by a different agent.
- A long-running task is reaching a natural checkpoint and the context window is getting tight.
- The user explicitly asks for a handoff.
Do not use this skill for trivial one-off tasks where there is nothing meaningful to hand off.
Inputs you must gather
Before writing the document, collect the following. Do not guess. If something is unknown, mark it explicitly in the document.
- Project root:
git rev-parse --show-toplevel. Abort with an explanation if not inside a git repo. - Current branch and HEAD:
git rev-parse --abbrev-ref HEADandgit rev-parse --short HEAD. - Commits created during the session: list new commits on the current branch that did not exist at the session start. If you do not have a reliable session start ref, ask the user for one or fall back to commits authored today by the current user (
git log --since="$(date -I) 00:00" --author="$(git config user.email)" --pretty=format:'%h %s'). State explicitly which strategy you used. - Modified files (full picture, including work done by sub-agents):
- Staged + unstaged:
git status --porcelain - Committed in session:
git diff --name-status <session-start-ref>..HEAD - Untracked: included in
git status --porcelainas?? - Merge the three lists, deduplicate by path, keep the most relevant status per file.
- Staged + unstaged:
- Ephemeral subagent artifacts to distill: read every file under
context/(exceptcontext/handoff*.md), extract the durable content, and fold it into the appropriate handoff sections (Context & Background, Decisions & Rationale, Open Points, Problems & Caveats, References). Then ignore those files for the "Edited Files" listing. - Task summary, status, open points, problems, next steps: derive from the session itself. Be precise. No filler.
- Skills the next agent should load: list by skill name, with one sentence per skill explaining why it is relevant.
Filtering work/helper files
Sub-agents and orchestration produce throwaway files (plans, scratchpads, inter-agent messages, research dumps). These must not appear under "Edited Files". Apply this filter in order:
- Hard ignore by path pattern (always treated as ephemeral, never listed):
- Everything under
context/exceptcontext/handoff*.md— this is where pi-subagents drop their session-local state. .work/,work/,scratch/,.scratch/,tmp/,.tmp/,.agent/,agent-comm/,.handoff-tmp/- Files matching
*.scratch.md,*.tmp,*.work.md,*.agent.md
- Everything under
- Gitignored files: run
git check-ignore -v <path>for each candidate. If ignored, treat as ephemeral unless it is a handoff file. - Heuristic by filename at repo root or top-level docs:
PLAN.md,TODO.md,NOTES.md,AGENT_NOTES.md,subagent-*.md,coordination.md. Treat as ephemeral unless they were already tracked in git before the session started (git log --oneline -- <path>returns commits older than session start). - Ambiguous cases (real work that just looks like a helper): list them under "Possible work artifacts (please confirm)" inside "Edited Files" instead of silently dropping them. Never delete files. Never
git addorgit rmanything as part of the handoff.
If you are uncertain whether a file is real work or a work artifact, keep it visible to the user. Silent omission is worse than a noisy entry.
Producing the document
- Read
TEMPLATE.mdfrom this skill directory. - Before filling sections, read all
context/*.mdfiles that aren't handoffs and absorb their content. Then act as if those files no longer exist. - Fill in every section. If a section legitimately has no content, write
_None._(with the underscores) so the linter can distinguish "empty on purpose" from "forgotten". - Keep the section order and heading text exactly as in the template. The linter is strict about this.
- Write the result to
<project-root>/context/handoff.md. Create thecontext/directory if it does not exist. - Do not commit the handoff. Leave that decision to the user.
- Do not delete the ephemeral
context/*files yourself. The harness/user manages their lifecycle.
Validation
After writing the file, run the linter:
bash <skill-dir>/lint.sh <project-root>/context/handoff.mdExit code 0 means valid. Any non-zero exit means the document must be fixed before ending the session. Do not silently ignore lint errors. If a rule is wrong for the situation, explain it in the handoff and to the user; do not paper over it.
Warnings are not failures but should be addressed. In particular, a warning about context/*.md references almost always means you forgot to distill an ephemeral artifact.
Style rules for the handoff content
- Write in English regardless of the conversation language.
- Be specific. Replace vague phrases ("did some refactoring") with concrete ones ("extracted
parseConfigfromcli.tsintoconfig/parse.ts, kept behavior identical, added 4 unit tests"). - Prefer lists over prose for files, commits, steps, and risks.
- Quote exact commands, file paths, env vars, and error messages verbatim in backticks.
- Never invent commits, files, or test results. If you did not verify something, say so.
- The document must make sense to an agent that has never heard of this skill. Do not reference "the handoff skill" inside the document.
Self-contained output
The handoff document is the contract. Anything the next agent needs to continue must be either in the document or reachable via a path/link the document provides — and that link must point to something that will still exist (committed code, tracked docs, external URLs, prior handoffs). Assume zero prior context and zero ephemeral state.
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.

