session-handoff
Skill0 starsChanged 3 days agoMITView on GitHub
Write a handoff document that lets a fresh agent session resume the current session's work, save it in the user's temp directory, and return a link to it. Run only when the user explicitly invokes it.
164 other projects use a version of this.
Adopted by
Most recently taken up by
- OpenAgentsInc/openagentstheir own version, first seen Nov 29, 2026
- anivar/agentic-sdlctheir own version, first seen Nov 29, 2026
- weiweimhy/agent-skillstheir own version, first seen Nov 29, 2026
- exerias21/brainstorm-toolkittheir own version, first seen Nov 29, 2026
- jamesctucker/morainetheir own version, first seen Nov 29, 2026
- DawnMoon1542/agents-skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use ascii-diagram, research-fleet 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.
SethGammonSkillascii-diagram
Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.
Also in 4 projects that use this
SethGammonSkillresearch-fleet
Parallel research using Fleet wave mechanics. Spawns multiple scout agents, each investigating a different angle of the same question. Findings are compressed between waves. Produces a unified research brief from multiple independent perspectives.
Also in 3 projects that use this
ferocknewSkilldoc-reader
当用户要求"读取 Word 文档"、"解析 DOCX 文件"、"将 Word 转换为 Markdown"、"提取文档内容"、"读取 docx"时,或者需要在 JavaScript/Node.js 环境中读取 Microsoft Word 文档(.docx)并转换为 Markdown、HTML 或纯文本格式时使用此 skill。
Also in 3 projects that use this
vicoa-aiSkilllive-preview
Start a local app in the current user project, expose it through a tunnel, and return preview details in structured Markdown. Use when the user asks for a preview URL, public URL, shareable localhost, mobile/web preview, or tunnel setup.
Also in 4 projects that use this
mcabreradevSkillbug-diagnosis
Use when something is broken, failing or intermittent. Diagnose before fixing: a command that goes red on this bug first, then falsifiable hypotheses.
Also in 4 projects that use this
botlearn-aiSkilldoc-gen
Also in 4 projects that use this
Other versions164 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 164
- rohitg00/pro-workflow★ 2.9ksame name
- SethGammon/Citadel★ 927same name
- wanshuiyin/HERO-Anti-OverDefense★ 925same name
- OpenAgentsInc/openagents★ 469same name
- OneWave-AI/claude-skills★ 378same name
- ai-analyst-lab/ai-analyst★ 304same name
- entireio/skills★ 240same name
- Innei/SKILL★ 93same name
- yuzushi-dev/session-handoff★ 67same name
- Hive-Academy/ptah-extension★ 35same name
154 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 repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-contextSkill
- agent-pluginsSkill
- architecture-decisionsSkill
- brand-identitySkill
- browser-controlSkill
- cross-harnessSkill
- efficient-tool-callsSkill
- git-historySkill
- github-actionsSkill
- gitignore-standardsSkill
- html-reportSkill
- java-developmentSkill
- mermaid-diagramsSkill
- meta-workspaceSkill
- product-designSkill
- project-backlogSkill
- project-setupSkill
- project-upgradeSkill
- python-developmentSkill
- refinement-tribunalSkill
- shell-scriptsSkill
- software-architectureSkill
- technical-documentationSkill
- test-designSkill
- typescript-developmentSkill
- web-auth-bridgeSkill
- worktree-isolationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 11 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 140 edited versions we read keep these.
11
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 38
Treat the focus as the user's priority for the next session, not as a replacement for the session's goals.
- Very specific: line 52
Run the bundled script, resolving its path from the directory that contains this SKILL.md (not from the working directory), with 2 to 5 …
- Distinctive: line 64
Write the document into the reserved file.
- Distinctive: line 66
If the script exits non-zero, report its error to the user and stop.
- Distinctive: line 70
Do the same steps by hand.
- Distinctive: line 73
Create the handoff directory inside that root, and only there, one level at a time.
- Distinctive: line 76
Create the file exclusively:
- Distinctive: line 95
Never upload or send the document anywhere the user has not asked for.
- Distinctive: line 159
Write for a reader with zero context.
- Distinctive: line 161
Keep it short. Target under 150 lines.
- Very specific: line 165
Never include secrets: tokens, passwords, API keys, cookies, private keys, or connection strings with credentials.
- Distinctive: line 175
Do not paste the document into the reply.
- Distinctive: line 179
Before reporting, check the written file:
“Common” is measured: kept by at least 6 in 10 of the 140 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
Objective
Capture the current session in one compact Markdown document that a new session, with no access to this conversation, can read once and continue the work without re-asking the user anything already settled. Save it to the user's temp directory and give the user a link.
Scope
In-scope:
- Summarizing the current session's goals, context, progress, artifacts, blockers, and next steps
- Narrowing the document to a next-session focus the user supplies
- Writing the file to the platform temp directory and reporting its location
Out-of-scope:
- Auto-triggering. Run this skill only when the user invokes it by name. Never start it because a session is long, a context limit is near, or work is ending.
- Committing, pushing, uploading, or sharing the document anywhere
- Persisting facts to long-term memory or instruction files
- Starting the next session
Input
| Input | Required | Use |
| Next-session focus | No | Free text after the invocation. When present, lead with it, order next steps around it, and drop context that does not serve it. When absent, hand off the whole session. |
Treat the focus as the user's priority for the next session, not as a replacement for the session's goals. If the focus contradicts a goal or decision made earlier, record both and flag the conflict under Open questions.
Procedure
- Gather. Review the whole conversation, not only recent turns. Collect goals, decisions and their reasons, constraints the user stated, files read or changed, commands run, results, errors, and anything still pending.
- Verify cheaply. Where tools allow, confirm facts the next session depends on instead of recalling them: current branch and uncommitted changes (
git status,git log -1), whether referenced files exist, and PR or CI state if one was in play. Do not run long builds or tests for this. Mark anything unverified as such. - Reserve the file (see Output location).
- Write the document into it using the template and the writing rules.
- Report the result to the user (see Final response).
Output Location
Reserve the file
Run the bundled script, resolving its path from the directory that contains this SKILL.md (not from the working directory), with 2 to 5 words naming the goal (or the focus, when given):
python3 "<skill-dir>/scripts/new_handoff.py" fix safari export # use "python" or "py" where "python3" is absentIt prints {"path": "...", "uri": "file:///..."} and guarantees:
- Verified temp root. Tries, in order, Windows
TEMP,TMP,TMPDIR; UnixTMPDIR,TEMP,TMP,/tmp,/var/tmp. A root qualifies only if it is an absolute, existing directory where the handoff directory and file can be created (a read-only, full, or denied root falls through to the next), and it is private: on Windows, inside%USERPROFILE%(the profile is ACL'd to its owner); on Unix, either owned by the user and not writable by group or others, or sticky and owned by the user orroot(like/tmp). Never falls back to the working directory; exits non-zero instead. - Private directory. Windows:
<root>\agent-skills\session-handoff\, inheriting the profile's owner-only ACL. Unix:<root>/agent-skills-<uid>/session-handoff/, both levels mode0700and owned by the user. An existing entry that is a symlink, junction, non-directory, or owned by someone else stops the script. - No overwrites. Creates
handoff-<YYYYMMDD-HHMMSS>-<slug>.mdexclusively, mode0600, with the slug capped at 60 characters; on a name clash only, it tries-2,-3, and so on, up to 99.
Write the document into the reserved file. Never write to any other path.
If the script exits non-zero, report its error to the user and stop. Do not pick another location.
Without Python
Do the same steps by hand. If any check fails, stop and report it; do not pick another location.
- Pick the root from the same candidate list, applying the same qualification (absolute, existing; Windows: inside
%USERPROFILE%; Unix: check withls -ldthat it is yours and not group- or other-writable, or that it has the sticky bittand is owned by you orroot). - Create the handoff directory inside that root, and only there, one level at a time. Create or verify the parent before creating the child:
- Windows (PowerShell):
$parent = New-Item -ItemType Directory -Force "$root\agent-skills"; confirm itsLinkTypeis empty. Then$dir = New-Item -ItemType Directory -Force "$parent\session-handoff"; confirm itsLinkTypeis empty. - Unix:
umask 077; parent="$root/agent-skills-$(id -u)"; mkdir -p "$parent"; confirm withls -ld "$parent"that it is a plain directory (not a symlink), owned by you, modedrwx------. Thendir="$parent/session-handoff"; mkdir -p "$dir"and checkls -ld "$dir"the same way.
- Windows (PowerShell):
- Create the file exclusively:
- Windows:
New-Item -ItemType File -Path "$dir\handoff-<stamp>-<slug>.md". It fails on any existing entry. If the error says the name exists, try the next suffix, up to 99; on any other error, stop. - Unix:
mktemp "$dir/handoff-<stamp>-<slug>.XXXXXX". It creates a new0600file with a random suffix and fails on any existing entry. The name has no.mdextension; that is acceptable.
- Windows:
Link
Report both forms:
- The absolute path, in the platform's native form.
- The
file://URI the script printed (by hand:file:///C:/Users/<user>/AppData/Local/Temp/...on Windows,file:///tmp/...on Unix, percent-encoding reserved characters).
Remote sessions
A file:// link opens on the user's machine. When the agent runs elsewhere (cloud container, remote shell, devcontainer, SSH), the link alone does not reach the file. In that case:
- Deliver the file through a file-sharing or download mechanism the harness provides, if one exists and the user expects it.
- Otherwise give a concrete copy-out command for that environment (for example
scp <host>:<path> .,docker cp <container>:<path> ., orcat <path>to copy from the terminal), and offer to print the document inline. - Say that the file disappears with the environment.
Never upload or send the document anywhere the user has not asked for.
Document Template
Omit a section only when it would be empty; never pad. Keep the headings so a reader can scan.
# Handoff: <goal in one line>
- Created: <ISO 8601 local timestamp with offset>
- Working directory: <absolute path, or "n/a">
- Repository and branch: <remote URL or path> @ <branch> (<short SHA>, <clean | N uncommitted files>)
- Next-session focus: <user-supplied focus, or "Continue the session goals">
## Start here
<3 to 5 sentences: what the work is, where it stands now, and the single next action. A reader who stops here can still begin.>
## Goals
1. <Primary goal, with the definition of done>
2. <Secondary goals>
## Critical context
- <Decisions made, each with its reason>
- <User preferences and constraints that must keep holding>
- <Non-obvious facts learned the hard way: quirks, gotchas, environment details>
- <Approaches tried and rejected, and why, so they are not retried>
## Key locations
| What | Path or URL | Notes |
| ---- | ----------- | ----- |
| <repo, file, doc, dashboard, PR, issue> | <absolute path or full URL> | <why it matters> |
## Progress so far
1. <Step taken, with its outcome>
2. <...>
## Artifacts
| Artifact | Location | State |
| -------- | -------- | ----- |
| <file changed or created, branch, PR, report, log> | <path or URL> | <draft, committed, pushed, merged, failing, ...> |
## Blockers and risks
- <Blocker: what is stuck, why, and what would unblock it>
- <Risk or known failure: symptom and current hypothesis>
## Open questions
- <Question the next session or the user must answer, and who can answer it>
## Next steps
1. <Concrete action, with the command, file, or URL it starts from>
2. <...>Writing Rules
- Write for a reader with zero context. Expand acronyms and internal names on first use. Never write "as discussed", "the earlier approach", or "the file above".
- Be specific. Use absolute paths, full URLs, exact branch names, exact error messages, exact commands. A vague pointer costs the next session a search.
- Keep it short. Target under 150 lines. Prefer bullets and tables over prose. Summarize logs and long outputs; quote only the decisive lines.
- Separate fact from guess. Mark anything unverified or inferred with "(unverified)" or "(hypothesis)".
- Record why, not only what, for every decision and rejected approach.
- Make next steps executable: each starts with a verb and names its starting point. Order them by the focus when one was given, otherwise by dependency.
- Never include secrets: tokens, passwords, API keys, cookies, private keys, or connection strings with credentials. Name where the secret lives instead (for example "the API key in the
FOO_TOKENenvironment variable").
Final Response
Reply to the user with only:
- The link, as a Markdown link whose target is the
file://URI and whose text is the absolute path. - One line stating the goal and next step the handoff leads with.
- For a remote session, the retrieval step from Remote sessions.
Do not paste the document into the reply.
Validation
Before reporting, check the written file:
- Every template section with content is present; empty ones are omitted.
- "Start here" names the single next action.
- Every path is absolute and every URL is complete.
- Branch and change state were verified, or marked unverified.
- The focus, when given, appears in the header and drives Next steps.
- No secrets appear.
- The file exists at the reported path, inside the private handoff directory.
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.

