session-end
Skill13 starsChanged 8 months agoMITView on GitHub
Session completion — handoff, reflect, docs-reflect cascade.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- puritysb/AgentDecktheir own version, first seen Sep 28, 2026
- mae616/ai-templatetheir own version, first seen Aug 22, 2026
- lumatic2/askewly-harnesstheir own version, first seen Aug 21, 2026
- redamancy231-create/claude-skillstheir own version, first seen Jul 15, 2026
- valpere/session-indexertheir own version, first seen Jul 12, 2026
- iamneilroberts/claude-skillstheir own version, first seen Jul 3, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- puritysb/AgentDeck★ 256same name
- faizkhairi/claude-code-blueprint★ 71same name
- valpere/session-indexer★ 42same name
- iamneilroberts/claude-skills★ 26same name
- itsjwill/claude-memory★ 15same name
- mae616/ai-template★ 9same name
- freskhu/genesis★ 4same name
- jkm-4314/claude-code-skills★ 4same name
- redamancy231-create/claude-skills★ 3same name
- DanielGuru/repomemory★ 2same name
2 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 repository10 other files it gives its agents.
- docs-reflectSkill
- memory-setupSkill
- memorySkill
- parkSkill
- reflectSkill
- session-continueSkill
- session-insightsSkill
- session-restoreSkill
- session-startSkill
- task-templateSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 8 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
8
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 18
Check what is current:
- Distinctive: line 99
Use the Write tool directly for the global file.
- Very specific: line 101
If all items land in _unassigned, skip per-workstream writes and save only the global handoff.
- Distinctive: line 107
Check backlog.md — what's closed, what's new
- Distinctive: line 110
Write to backlog + memory
- Distinctive: line 114
Check DOC: labels from the session:
- Distinctive: line 120
If DOC: labels found — run /docs-reflect:
- Very specific: line 124
Write to .claude/rules/ or docs/
- Distinctive: line 126
If no DOC: labels — skip, report: "No documentation findings this session."
- Distinctive: line 143
If there's nothing to save — say so, don't create an empty handoff
“Common” is measured: kept by at least 6 in 10 of the 7 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-end — Handoff for the next session
Save context before finishing. Three phases: handoff → reflect → docs-reflect.
Phase 1: Handoff
1a: Update MEMORY.md
Check what is current:
- Profile — no changes?
- Rules — new agreements?
- Reference — new links?
1b: Routing analysis (preview)
Classify session activity by workstream — preview, not yet written (AP-24).
node "$MEM" --dir="$MEM_DIR" session-activity > /tmp/activity.json
node "$MEM" --dir="$MEM_DIR" session-changes > /tmp/changes.json
# Combine items + file paths + commit subjects into one array for classify
jq -s '[.[0].items[], .[1].commits[], .[1].files[]]' /tmp/activity.json /tmp/changes.json > /tmp/items.json
node "$MEM" --dir="$MEM_DIR" classify --items=/tmp/items.jsonShow user a compact routing table:
Routing analysis:
lifecycle → 7 items
infrastructure → 3 items
research → 1 item
_unassigned → 2 items
(preview — handoffs per workstream will be written in step 1d)1c: Propose handoff
MUST show the proposed handoff content to the user and wait for confirmation before writing.
Prepare workstreams/handoff.md content:
---
name: Session handoff
description: Context for starting the next session
type: project
---
## Last session: YYYY-MM-DD
### What was done
- <list>
### Where we stopped
- <current state>
### What's next
1. <task> → recommendation: <model>
2. <task> → recommendation: <model>
### Uncommitted changes
- <git status summary, or "clean tree">
### Session decisions
- <new agreements, if any>1d: Confirm and write
Show handoff to user. Wait for "ok" / "save" before writing.
On confirm, write in two layers:
- Per-workstream handoffs — for each non-empty bucket from routing (excl.
_unassigned):# Compose per-workstream slice (relevant What-was-done / What's-next / decisions). # Save to /tmp/<ws>-handoff.md, then: node "$MEM" --dir="$MEM_DIR" write-handoff --workstream=<ws> --content=/tmp/<ws>-handoff.md - Global handoff — write
workstreams/handoff.md(overall summary + cross-refs):
Use the Write tool directly for the global file.### Per-workstream handoffs - lifecycle → workstreams/lifecycle/handoff.md - research → workstreams/research/handoff.md
If all items land in _unassigned, skip per-workstream writes and save only the global handoff.
Phase 2: Reflect
Session analysis — run /reflect:
- Check backlog.md — what's closed, what's new
- Find workarounds, repetitions, gaps, insights
- Show to user, wait for confirmation
- Write to backlog + memory
Phase 3: Docs-reflect
Check DOC: labels from the session:
node "$MEM" --dir="$MEM_DIR" docsIf DOC: labels found — run /docs-reflect:
- Collect and group DOC: labels
- Generalize, determine target files
- Show to user, wait for confirmation
- Write to
.claude/rules/ordocs/
If no DOC: labels — skip, report: "No documentation findings this session."
Phase 4: Report
Session complete:
✓ Handoff saved to workstreams/handoff.md
✓ Reflect: N items → backlog.md
✓ Docs: N rules → .claude/rules/ (or: no DOC: notes)
On next start — /session-start will pick up the context.Rules
- Handoff = concise, 20-30 lines maximum
- Model recommendation — based on the type of the next task
- If there's nothing to save — say so, don't create an empty handoff
- Phases 2 and 3 can be skipped if the user requests a quick finish
- Each phase requires user confirmation before writing
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.

