session-handoff
Skill0 starsChanged 7 months agoMITView on GitHub
Save / list / resume task context across Claude Code sessions on the user's terms (instead of relying on /compact to choose what to keep). Writes a structured Markdown handoff file under <root>/.claude/handoff/ containing the current task, decisions, open questions, files touched, and next steps. Use save when wrapping up a session, resume at the start of the next one.
72 other projects use a version of this.
Adopted by
Most recently taken up by
- upex-galaxy/agentic-qa-boilerplatetheir own version, first seen Oct 5, 2026
- aktsmm/Agent-Skillstheir own version, first seen Oct 4, 2026
- kreid415/claude-science-skillstheir own version, first seen Oct 3, 2026
- yuzushi-dev/session-handofftheir own version, first seen Oct 2, 2026
- OneWave-AI/onewave-toolkittheir own version, first seen Oct 2, 2026
- rohitg00/pro-workflowtheir own version, first seen Sep 29, 2026
Used with
Projects with it also use domain-modeling, subagent-driven-development 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.
AWSSkilldomain-modeling
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
Also in 4 projects that use this
OpenAISkillsubagent-driven-development
Use when executing implementation plans with independent tasks in the current session
Also in 3 projects that use this
NVIDIASkilltesting
Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.
Also in 3 projects that use this
OpenAISkillexecuting-plans
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Also in 3 projects that use this
genomewalkerSkilllearn
Learn from web sources, generate SKILL.md, and store key patterns in soul memory. Trigger keywords: learn, skill-gen, web-learn, documentation, tutorial.
Also in 3 projects that use this
AWSSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 4 projects that use this
- +3 more from openai
Other versions72 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 72
- rohitg00/pro-workflow★ 2.9ksame name
- softaworks/agent-toolkit★ 2.5ksame name
- SethGammon/Citadel★ 922same name
- OneWave-AI/claude-skills★ 321same name
- ai-analyst-lab/ai-analyst★ 304same name
- entireio/skills★ 223same name
- Innei/SKILL★ 86same name
- yuzushi-dev/session-handoff★ 66same name
- aktsmm/Agent-Skills★ 26same name
- upex-galaxy/agentic-qa-boilerplate★ 26same name
62 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 repository9 other files it gives its agents.
- answer-cacheSkill
- api-contractSkill
- codemapSkill
- diff-summarySkill
- file-summarySkill
- git-digestSkill
- log-extractSkill
- run-quietSkill
- test-failures-onlySkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 3 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 61 edited versions we read keep these.
3
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 39
Do NOT invoke save for trivial tasks where the diff alone tells the story.
- Distinctive: line 50
If the command fails (not in a git repo), use the current working directory and warn the user that the handoff is not anchored to a git …
- Distinctive: line 59
Run these in a single Bash batch:
- Very specific: line 85
Make sure the parent directory exists (mkdir -p .claude/handoff on Unix, New-Item -ItemType Directory -Force .claude\handoff on PowerShell).
- Very specific: line 120
If the user passed a full Markdown document (e.g.
- Distinctive: line 158
If the directory does not exist or is empty, print:
- Very specific: line 168
If the user passed name=<slug>, glob for *<slug>*.md in the handoff directory and pick the most recent match.
- Very specific: line 171
If no file matches, print session-handoff: error: no handoffs to resume.
- Very specific: line 176
Read the file. Strip the YAML frontmatter (everything between the first two --- lines).
- Very specific: line 214
Never overwrite an existing handoff file — the timestamp prefix makes collisions effectively impossible, but if one happens, append -1, -2, …
“Common” is measured: kept by at least 6 in 10 of the 61 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
A Markdown-only skill — no Python, no scripts. You (Claude) read/write
Markdown files under <repo-root>/.claude/handoff/ using the Read, Write,
Glob, and Bash tools.
When to invoke
Three operations:
save
Invoke when ANY of these apply:
- The user is wrapping up a session and wants to "save where we are".
- The conversation is getting long and you want to checkpoint state before
/compactsummarizes it for you. - You've just made a non-trivial decision the next session should know about.
list
Invoke when the user asks "what handoffs do I have?" or "what was I working on last?".
resume
Invoke at the start of a new session when the user says "let's continue" or mentions previous work. Read the most recent handoff (or a specific named one) and use it to seed the next response.
Do NOT invoke save for trivial tasks where the diff alone tells the story.
This is for in-progress work with context that is not in the code itself.
Finding the repo root
For all operations, locate the repo root:
git rev-parse --show-toplevelIf the command fails (not in a git repo), use the current working directory and warn the user that the handoff is not anchored to a git repo.
The handoff directory is always <repo-root>/.claude/handoff/.
Operation: save
Step 1 — gather metadata in parallel
Run these in a single Bash batch:
| Command | Purpose |
git rev-parse --show-toplevel | Repo root. |
git symbolic-ref --quiet --short HEAD | Current branch (or empty / non-zero on detached HEAD). |
The current timestamp comes from date -u +"%Y-%m-%dT%H:%M:%SZ" (UTC), and
the filename prefix from date -u +"%Y%m%d-%H%M%S".
Step 2 — build the slug
The slug is a lowercase, kebab-case, filename-safe string up to 60 chars, derived from (in priority order):
- The
name=argument the user provided. - The
task=text (first ~6 words). - Literal
handoffas last resort.
Replace anything outside [a-z0-9-] with -, collapse repeated dashes,
strip leading/trailing dashes.
Step 3 — write the file
Path: <repo-root>/.claude/handoff/<YYYYMMDD-HHMMSS>-<slug>.md
Make sure the parent directory exists (mkdir -p .claude/handoff on Unix,
New-Item -ItemType Directory -Force .claude\handoff on PowerShell).
File contents:
---
saved_at: <UTC timestamp, e.g. 2026-05-14T18:00:00Z>
branch: <current branch, or "(no branch)" if detached/no-git>
slug: <slug>
---
# Handoff: <task or slug>
## Current task
<text from task= argument; omit section if empty>
## Decisions made
<text from decisions= argument; omit if empty>
## Open questions
<text from open= argument; omit if empty>
## Files touched
- <path1>
- <path2>
<omit section if empty>
## Next steps
<text from next= argument; omit if empty>
## Notes
<text from notes= argument; omit if empty>If the user passed a full Markdown document (e.g. from-stdin style or just
a big block of text), use that as the body verbatim, but still prepend the
YAML frontmatter.
Step 4 — confirm
Print one line:
session-handoff: wrote .claude/handoff/<filename>Operation: list
Step 1 — list files
ls -1t <repo-root>/.claude/handoff/*.md(or use Glob with pattern: ".claude/handoff/*.md" and sort by mtime
descending). Take the top N (default 10).
Step 2 — read each file's frontmatter
For each file in the list, read just the first ~10 lines to extract
saved_at and branch from the YAML frontmatter. Compute "X ago"
from the saved_at timestamp.
Step 3 — print
.claude/handoff/
20260514-180000-auth-rewrite.md on skill/auth (3h ago)
20260513-220000-fix-pagination.md on main (1d ago)
20260513-100000-spike-graphql.md on skill/graphql (2d ago)If the directory does not exist or is empty, print:
session-handoff: no handoffs found.Operation: resume
Step 1 — pick the file
- If the user passed
name=<slug>, glob for*<slug>*.mdin the handoff directory and pick the most recent match. - Otherwise, pick the most recently modified
*.mdin the handoff directory. - If no file matches, print
session-handoff: error: no handoffs to resume.and stop.
Step 2 — print the handoff
Read the file. Strip the YAML frontmatter (everything between the first
two --- lines). Print a header followed by the body:
# resuming <filename> (saved <saved_at> on <branch>, <age>)
<body>Then use the handoff to seed your understanding of the next response — but verify any file paths or references against the current code before acting on them (handoffs can go stale).
Slug examples
| Input | Slug |
name="Auth rewrite" | auth-rewrite |
task="Refactor user model + API" (no name) | refactor-user-model-api |
task="" and name="" | handoff |
name="feat/users#42" | feat-users-42 |
Humanizing age
| Seconds since saved | Display |
| < 60 | Ns ago |
| < 3600 | Nm ago |
| < 86400 | Nh ago |
| ≥ 86400 | Nd ago |
Notes
- Handoff files live under
<repo>/.claude/handoff/. The.claude/folder should be in the project's.gitignore. - Resuming a stale handoff (file paths that no longer exist, branch that has been deleted) is fine — the data is purely informational. Verify against the current code before acting.
- Never overwrite an existing handoff file — the timestamp prefix makes
collisions effectively impossible, but if one happens, append
-1,-2, etc. to the slug.
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.

