handoff
Skill2 starsChanged 4 months agoMITView on GitHub
Summarize the current session's work into a structured handoff block and a saved markdown artifact that a fresh coding-agent session can execute on, including Codex, Claude Code, a VPS shell, or another local environment. Use whenever the user says "handoff", "hand off", "pass to next session", "wrap up for handoff", "session summary for next chat", "continue in new chat", or anything about transferring context to a new conversation or environment. Also use when the user is about to end a session with unfinished work. Includes the GitHub issue reference if one exists. Do NOT use for PR descriptions, commit messages, or release notes — those summarize code changes for reviewers, not session state for the next agent. Do NOT use to dispatch parallel agents — that's `parallel-dispatch`.
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 repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-coordinationSkill
- blog-image-genSkill
- bogdan-baciu-designSkill
- chat-analysisSkill
- deep-decideSkill
- deep-research-agentsSkill
- grill-meSkill
- insight-lockSkill
- parallel-dispatchSkill
- quiz-meSkill
- skill-drift-scannerSkill
- table-system-migrationSkill
- weekly-updateSkill
- x-signal-researchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 14 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 172 edited versions we read keep these.
14
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 24
When editing this skill, run:
- Very specific: line 37
GitHub issue: Check known session metadata sources such as /tmp/.agent-session-issue-number, /tmp/.claude-session-issue-number, or an …
- Very specific: line 38
Git diff since session start: Check known session metadata sources such as /tmp/.agent-session-start-commit, …
- Distinctive: line 39
Working tree state: Run git status --short to catch uncommitted work.
- Distinctive: line 50
After gathering automatic context, ask the user only what you can't infer:
- Distinctive: line 56
Keep it to 1–2 questions max.
- Distinctive: line 63
Use this when working in a repo or project folder.
- Distinctive: line 66
Use this when there is no git repo but the working directory is meaningful.
- Distinctive: line 68
Use only when the project directory is not writable or no useful workspace exists.
- Distinctive: line 70
Never imply that a local path is available from another machine.
- Distinctive: line 128
Include the exact error messages: if the session ended with a failing test or unresolved bug.
- Distinctive: line 129
Don't pad: If a section is empty (e.g., no gotchas), omit it entirely rather than writing "None."
- Distinctive: line 132
Do not treat temp files as portable: If the handoff is saved outside the repo/workspace, the final response must say that the chat block is …
- Distinctive: line 133
Do not commit handoff artifacts by default: If the user wants the saved file to travel through git, confirm it is sanitized first or state …
- Distinctive: line 139
After outputting the handoff block, remind the user where the artifact was saved and how to use it:
- Distinctive: line 173
Use the same structure, but make "What's Left" explicit: "None for this task.
“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
Session Handoff
Produce both:
- A structured, copy-pasteable handoff block in the chat.
- A saved markdown handoff artifact when filesystem access is available.
The goal is zero context loss between sessions and environments — the next chat should be able to read the handoff and immediately start working without re-exploring the codebase or asking clarifying questions. The chat block is the universal fallback. The saved file is a convenience artifact, and the response must make clear whether the next environment can access it.
Why this matters
Coding-agent sessions are usually stateless across chats, tools, machines, and hosts. Project instructions and memory may provide durable context, but session-specific state (what you just tried, what failed, what decisions were made, what's half-done) is easily lost. A good handoff captures exactly that session-specific context in a form that works for Codex, Claude Code, local shells, and remote environments.
Workflow
Step 0 — Optional skill eval
When editing this skill, run:
PYTHONDONTWRITEBYTECODE=1 python3 evals/run_evals.pyThis validates trigger fixture structure and the artifact path priority for repo-local, workspace-local, and OS-temp handoff saves.
Step 1 — Gather session context
Collect these automatically when available (don't ask the user for them):
- GitHub issue: Check known session metadata sources such as
/tmp/.agent-session-issue-number,/tmp/.claude-session-issue-number, or an explicit issue reference in the conversation. If a number exists andghis available, fetch the issue title and URL viagh issue view <number> --json title,url. - Git diff since session start: Check known session metadata sources such as
/tmp/.agent-session-start-commit,/tmp/.claude-session-start-commit, or an explicit start commit in the conversation. If a start commit exists, rungit log --oneline <start-commit>..HEADandgit diff --stat <start-commit>..HEADto see what changed. - Working tree state: Run
git status --shortto catch uncommitted work. - Conversation review: Review the full conversation history to extract:
- The original task/request
- What was accomplished
- What was attempted but didn't work (and why)
- Key decisions or findings
- What remains to be done
- Execution context: Capture the current working directory, repo root if available, current branch if available, and the current execution environment if known (Codex, Claude Code, VPS, local shell, etc.).
Step 2 — Ask targeted questions
After gathering automatic context, ask the user only what you can't infer:
- "Is there anything I missed or got wrong in this summary?"
- "Any specific instructions for the next session beyond what's here?"
- "Which environment will pick this up next?" only if the answer changes the transfer method.
Keep it to 1–2 questions max. Don't over-interview.
Step 3 — Choose the artifact path
Save the handoff as markdown when filesystem writes are available. Prefer locations in this order:
- Repo-local durable path:
<repo-root>/.agent-handoffs/YYYYMMDD-HHMMSS-brief-slug.md- Use this when working in a repo or project folder.
- This is the safest path for switching between agent sessions on the same machine or when the workspace is synced.
- Workspace-local durable path:
<cwd>/.agent-handoffs/YYYYMMDD-HHMMSS-brief-slug.md- Use this when there is no git repo but the working directory is meaningful.
- OS temp fallback:
${TMPDIR:-/tmp}/agent-handoffs/YYYYMMDD-HHMMSS-brief-slug.md- Use only when the project directory is not writable or no useful workspace exists.
Never imply that a local path is available from another machine. If the next session is on a VPS or another host, say explicitly that the chat block is the portable handoff unless the file is copied or committed.
Step 4 — Generate the handoff content
Output the handoff inside a fenced code block so the user can copy it in one click. Use a fence long enough to contain any code fences inside the handoff; default to ````markdown when there is any chance the content includes triple-backtick snippets, logs, or commands. Use this structure:
## Session Handoff — [brief title]
### GitHub Issue
#[number] — [title]
[URL]
### Original Task
[What the user asked for, in their words or close to it]
### What Was Done
- [Completed item 1]
- [Completed item 2]
- ...
### What's Left
- [ ] [Remaining item 1]
- [ ] [Remaining item 2]
- ...
### Suggested Starting Point
- [Exact first command, file, issue, or repo area the next session should inspect]
- [Mention any relevant skills/tools/modes if known]
### Key Decisions & Findings
- [Decision or finding that the next session needs to know]
- [Why something was done a certain way]
- [What was tried and rejected, and why]
### Files Changed
[git diff --stat output or curated list]
### Uncommitted Work
[git status output, or "None — all committed and pushed"]
### Environment & Transfer Notes
- Current environment: [Codex / Claude Code / VPS / local shell / unknown]
- Current working directory: [absolute path]
- Repo root: [absolute path, or omitted if not in a repo]
- Saved handoff artifact: [absolute path, or "Not saved — reason"]
- Cross-environment note: [If changing machines, use the chat block or copy/commit the artifact; do not assume this local path exists elsewhere]
### Gotchas & Context
- [Anything non-obvious the next session should watch out for]
- [Test failures to be aware of]
- [Blocked dependencies]Output rules
- Be specific, not vague. "Fixed
calcOrigination()to normalize Infinity in tier bounds" is useful. "Fixed a calculation bug" is not. - Include file paths and line numbers where relevant so the next session can jump straight to the code.
- Include the exact error messages if the session ended with a failing test or unresolved bug.
- Don't pad. If a section is empty (e.g., no gotchas), omit it entirely rather than writing "None."
- The "What's Left" section is the most important part. The next session's first action will be to read this list and start executing. Make it actionable — each item should be something the next agent can do without further clarification.
- Include the GitHub issue so the next session can pick it up rather than creating a duplicate tracking issue.
- Do not treat temp files as portable. If the handoff is saved outside the repo/workspace, the final response must say that the chat block is the reliable cross-environment copy.
- Do not commit handoff artifacts by default. If the user wants the saved file to travel through git, confirm it is sanitized first or state that the chat block is safer.
- Redact secrets and sensitive personal data. Include where to find secrets only by naming the expected env var, secret manager, or config path pattern; never paste secret values into the handoff.
- Prefer pointers over duplicated artifacts. Link to files, commits, issues, PRs, logs, and generated artifacts rather than pasting large content into the handoff.
Step 5 — Remind the user
After outputting the handoff block, remind the user where the artifact was saved and how to use it:
Paste the block above as the first message in the new chat, or give the next session the saved markdown artifact at [path]. If the next session is on another machine or VPS, use the pasted block unless you have copied or committed the file there.
Worked examples
Example 1: Repo work with unfinished implementation
User: "handoff this to the next agent."
Include:
- Current branch, repo root, and whether commits were pushed.
- Exact files changed and the verification commands already run.
- A "What's Left" checklist that starts with the next executable step, not a vague project goal.
- Any current blockers, including the exact error text.
Example 2: Cross-machine transfer
User: "pass this to the VPS."
Do:
- Say that the chat block is the portable copy unless the file is committed or copied.
- Label suggested commands as
VPS Hetzner - ssh shelland includecd /root/dans-brainwhen relevant.
Do not:
- Claim that a Mac-local
.agent-handoffs/...path exists on the VPS.
Example 3: Finished work, but user wants a record
User: "wrap this up for handoff even though it's done."
Use the same structure, but make "What's Left" explicit: "None for this task; future follow-up is optional..." Then list the proof and pushed commit so the next session can verify without redoing the work.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

