end-session
Skill0 starsChanged 3 months agoMITView on GitHub
Wrap up a session — decide whether a reboot is actually pending and delegate to the handover skill if so, save anything memory-worthy that hasn't been captured yet, and report usage stats. Use whenever the user says they're done, wrapping up, or closing the session — this is the one command to reach for at session end, not `/handover` directly; it decides which mechanism applies instead of making the user track that.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- jocarrd/crux-agentstheir own version, first seen Nov 8, 2026
- abhayla/claude-best-practicestheir own version, first seen Nov 1, 2026
- DavoDC/claude-playbooktheir own version, first seen Oct 13, 2026
- lunaman81/claude-skillstheir own version, first seen Oct 6, 2026
- edwardyen724-g/claude-session-skillstheir own version, first seen Aug 30, 2026
- ozgurkarahan/ai-agent-memorytheir own version, first seen Jul 24, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- YehudaFrankel/clankbrain★ 16same name
- abhayla/claude-best-practices★ 9same name
- ozgurkarahan/ai-agent-memory★ 8same name
- alxyrgin/agent-forge★ 4same name
- jocarrd/crux-agents★ 4same name
- DavoDC/claude-playbook★ 1same name
- heffrey/claude-skills★ 1same name
- edwardyen724-g/claude-session-skills★ 0same name
- lunaman81/claude-skills★ 0same name
- markbaindesign/bain-studio★ 0same name
1 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.
- CLAUDE.mdCLAUDE.md
- etc-driftSkill
- handoverSkill
- host-checkSkill
- incidentSkill
- reset-triageSkill
- security-privacy-checkSkill
- update-checkSkill
- vendor-updateSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Run rpm-ostree status — a staged deployment not yet booted is the primary signal on this Silverblue machine.
- Very specific: line 35
If pending: invoke the handover skill in write mode (Skill(handover, "write")) rather than duplicating its steps here — it owns the actual …
- Very specific: line 39
If not pending: skip handover entirely.
“Common” is measured: kept by at least 6 in 10 of the 9 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
The two continuity mechanisms this project has — .claude/handover.md and
the auto-memory system — solve different problems and neither replaces the
other:
- Handover is ephemeral, task-in-flight state: what's staged but
unverified, the exact next step, uncommitted git state. It exists only to
give a resumed session the same continuity as
claude -cwithout replaying the whole prior transcript (and its token cost) on every turn after. It's overwritten each time, gitignored, and only useful right before something reboots the session. - Memory is durable, cross-session narrative — decisions, feedback, ongoing project facts. It's meant to accumulate over months, not describe what to do the moment the session resumes. The auto-memory system's own rules already exclude ephemeral task state from it, so this is not duplicate coverage — dumping handover-shaped content into memory would violate its scope, same as leaving durable narrative in a file that gets overwritten next time.
end-session exists so the user doesn't have to decide which applies —
run this at the end of every session, reboot-pending or not.
Steps
- Decide if a reboot is actually pending.
- Run
rpm-ostree status— a staged deployment not yet booted is the primary signal on this Silverblue machine. - Also weigh anything this session proposed but hasn't yet executed that
needs a restart to take effect (kernel module changes, certain
systemctlunit changes) — judgment call, not just the one command. - If pending: invoke the
handoverskill in write mode (Skill(handover, "write")) rather than duplicating its steps here — it owns the actual snapshot logic (what's confirmed done, staged git state, the exact next step). - If not pending: skip handover entirely. Writing one anyway leaves
stale state for a future session to trip over — the handover skill's
own read-mode guidance says to flag a handover file that looks stale
against current
git log/rpm-ostree status; don't create that problem by writing one with nothing to describe.
- Run
- Capture anything memory-worthy that isn't saved yet. Review the session against the auto-memory system's four types (user, feedback, project, reference) per the main memory instructions already in context. This is not a new mechanism — just making sure nothing surfaced this session is left uncaptured before it closes. Do not put task-in-flight state here; that's step 1's job when it applies.
- Report usage. Tell the user to run the built-in
/costcommand for authoritative token and dollar usage — never fabricate a dollar figure./costis intercepted client-side by the CLI before it reaches the model, so it costs nothing to run and can't be triggered from inside a skill; it has to be the user typing it. If a quick sanity check is useful in the meantime, this project'sscripts/session-token-check.shreads the last assistant turn's usage from the transcript for a fast context-size read — clearly label that as context size, not cumulative session cost, since it isn't the same number/costreports. - Close with a short summary, mirroring what a resumed session (via handover's read mode, or just memory) would need: what changed, what's committed vs. pending, and the single next step — surfaced directly in chat here since this is the same session ending, not a fresh resume reading it back from a file.
- End the summary by prompting
/costthen/clear(or/exitif the user wants to leave the terminal entirely) as the two things to type next. Both are CLI-level commands, same as/cost— a skill has no tool that can invoke either, so this is a prompt for the user to act on, not something the skill executes itself.
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.

