handoff
Skill1 starsChanged 2 months agoMITView on GitHub
Compact a session into cold-start state — context filling, a `/clear` coming, work pausing, a decision a later session would re-open. Rewrites the five-field `docs/session-state.md`, appends to the append-only log. Not a run narrative (`pull-request`), not a State flip (`orchestrator`), not an ADR (`documentation-and-adrs`).
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 repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- acceptance-criteriaSkill
- aim-higherSkill
- api-designSkill
- architecture-designSkill
- browser-testing-with-devtoolsSkill
- ci-cdSkill
- codebase-designSkill
- codebase-researchSkill
- code-reviewSkill
- code-simplificationSkill
- comprehension-quizSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- environment-manifestSkill
- gauntlet-loopSkill
- git-workflowSkill
- idea-refineSkill
- incremental-implementationSkill
- interview-meSkill
- literate-explainerSkill
- observability-and-instrumentationSkill
- orchestratorSkill
- performance-optimizationSkill
- plan-breakdownSkill
- preflight-readinessSkill
- project-setupSkill
- pull-requestSkill
- quality-verificationSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- spec-grillingSkill
- spec-reviewSkill
- test-driven-developmentSkill
- to-prdSkill
- using-agent-skillsSkill
- worktreeSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 172 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 46
Read the log and the artifacts you cite, then name each by path: what sits in prd.md, plan.md, an ADR or a commit diverges the moment a …
“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
Purpose
Stage: cross-cutting. Principles 3, 5, 7.
Compacts the live session into two files a cold agent resumes from: docs/session-state.md, the
five-field snapshot rewritten whole, and docs/session-log.md, the append-only record of what was
decided and why. Two files because only the latest snapshot is true, while every entry stays true about
the day it was written.
When to use / when to skip
- Context is filling, the work is pausing, a
/clearis coming, or a fresh agent picks this up cold. - A decision was made a later session would re-open — append that entry even where no snapshot is worth rewriting; an unrecorded reason is re-argued for free.
- Skip it where
STATE.mdand the feature's artifacts hold everything, or the work is one step you finish this turn. - Near-miss — a narrative of what a slice ran: the pull request body and
qa.mdcarry that. - Near-miss — a slice's
StateorGatemoving: the run owns the board.
Inputs
- The current conversation — helps: the thing being compacted · without it: reconstruct from
STATE.md, the artifacts and recent commits, markedderived. docs/session-log.md— helps: which questions are settled, so an entry reversing one says so · without it: yours is the first.docs/session-state.md— helps: the snapshot you overwrite · without it: write the header and the five fields fresh.STATE.md,docs/features/<slug>/,docs/adr/, commits — helps: durable state you cite by path instead of copying in · without it: what the conversation holds, markedderived.- A next-session focus, when passed — helps: the lens; bias
Current stateandNext phasetoward it · without it: write for whoever arrives next.
Process
- Finish the step you are in first — a handoff written mid-thought is worse than none.
- Resuming rather than ending? Read
docs/session-state.mdbefore your first plan, edit or question, and the log before re-opening anything it may answer; reversing a logged decision is a new entry with a reason. - Read the log and the artifacts you cite, then name each by path: what sits in
prd.md,plan.md, an ADR or a commit diverges the moment a copy exists. - Rewrite
docs/session-state.mdwhole, keeping the header that points atdocs/session-log.md(seeded byproject-setup; write it if absent) and the five fields in canonical order (state-schema). A snapshot carries no history of what it last said. - Make
## Next phaseone concrete action somebody resumes from without asking a question — the file, the step, and the skill that owns it — and## Boundarieswhat is in and out of scope. - Route a throwaway mid-session compaction to the OS temp dir instead: same five fields, no entries.
- Append one entry per decision — shape in state-schema — to the committed log alone; an append-only record inside a file somebody deletes records nothing.
- Redact before you append: every key, token, password and PII becomes
[REDACTED], and an environment need points atenvironment.md. A secret in the diff is a stop-list item (safety-rails).
The session log
What earns an entry. Apply the re-open test first: would a later session, not knowing this, re-open the question? If not, nothing was decided — delete the entry. Most sessions append zero or one; several means the bar slipped, and the fix is the bar. Keep files, diffs, commands and test results out of every entry.
Append-only. Prove it mechanically — the committed log must still be present, byte for byte, at the head of the new one:
was=$(mktemp)
git show HEAD:docs/session-log.md 2>/dev/null > "$was"
n=$(wc -c < "$was" | tr -d ' ')
if [ "$n" -eq 0 ]; then echo "append-only: OK" # not in HEAD yet — no earlier entries
else head -c "$n" docs/session-log.md | cmp -s - "$was" \
&& echo "append-only: OK" || echo "append-only: VIOLATION"; fiA bare git diff cannot stand in: with no ref, a staged rewrite prints nothing and reads as a pass.
Report a violation as four things — which entry, what changed, that the file is append-only, and the
new-entry route — then restore the earlier bytes, append a new entry naming the old one, and carry it as
a Decided-for-you row. Old entries are never trimmed or rolled up; the one edit allowed is a live
credential already in an entry — redact it, rotate the credential, report the edit as the exception, and
append a new entry.
What outranks it. The log is the weakest source in the repo, under docs/adr/ and a signed
acceptance.md; promote a decision that has to bind future work into docs/adr/
(documentation-and-adrs owns the shape), then append a new entry naming both. Keep both files
committed and out of .gitignore, or they die on the next fresh clone. Move a legacy ## Log heading's
entries out of docs/session-state.md verbatim and whole, then delete the heading, restore the header,
and run the append-only check against docs/session-log.md's first commit, where it fires correctly.
Rationalizations
- "I'll summarize what we discussed." → a summary hands the next agent a reconstruction job.
- "
Continue where we left offis enough." → it names no file and no step. - "That entry was worded badly, I'll tidy it." → the edit destroys the evidence the call was once made that way; a new entry naming it is the route.
- "A lot happened, so the record should be complete." → the log holds decisions, not activity; a session that settled nothing appends nothing.
- "The log is long, I'll roll up the old ones." → compaction is for what grows with elapsed time, and a log grows with work.
Red flags
- A
## Next phasereading "keep working on X" — no file, no step, no skill. - A file body, diff, or
prd.mdsection pasted in place of its path. - An earlier entry that reads differently than it did: reworded, re-dated, re-ordered, gone.
- An entry for work that merely happened — a slice landed, a test went green.
- Several entries from one session, or one against nearly every session on the board.
- A
## Logheading insidedocs/session-state.md, or either file in.gitignore.
Verification
- Five fields present and non-empty,
## Next phasenaming a file, a step and the owning skill, so somebody resumes without a question. - Every decision this session has an entry passing the re-open test, and no entry names a file, diff, command or test result.
- The append-only check printed OK, or a violation was reported naming the entry.
- Both files clean under
grep -nE 'sk-|sk_live|AKIA|password=|token=', and both tracked by git.
Outputs & handoff
docs/session-state.md— cap 300 words. Rewritten whole: the header pointing atdocs/session-log.mdand the five##fields in canonical order (state-schema), no## Logheading. Overflow moves to the file that owns it.docs/session-log.md— cap 60 words per entry; appended to, never rewritten; entry shape in state-schema.- A throwaway compaction —
$TMPDIR/handoff.md, the same five fields under the same 300-word cap, never committed. - No
STATE.mdrow: the caller owns the slice's transition (state-schema). - Returns in conversation: each file's measured length against its cap (an over-cap draft is reported, never handed on as if it fit), the entries appended or that none were, and any violation. No verdict.
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.

