session-wrap
Skill0 starsChanged 8 months agoMITView on GitHub
End-of-session structured wrap-up: capture learnings, update scratchpad with next steps, check for uncommitted changes, ask if polaris needs updating. Complements post-commit-lessons.js (per-commit) — this runs once at session end. Triggers: "end session", "wrap up", "closing session", "fin de session", "session terminée".
13 other projects use a version of this.
Adopted by
Most recently taken up by
- catesandrew/skillstheir own version, first seen Nov 1, 2026
- itgenius-au/skills-librarytheir own version, first seen Oct 30, 2026
- aberson/skill-meshtheir own version, first seen Oct 24, 2026
- pinetreelic/codex-skillstheir own version, first seen Sep 14, 2026
- cacardinal/lailatheir own version, first seen Jul 31, 2026
- Kashyap-001/second-brain-templatetheir own version, first seen Jul 23, 2026
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- ai-native-camp/camp-2★ 19same name
- leonsong09/session-wrap★ 9same name
- immacualate/claude-forge★ 5same name
- aberson/skill-mesh★ 2same name
- dawish39/session-wrap★ 2same name
- borgesme/fastapi-general-template★ 1same name
- cacardinal/laila★ 1same name
- catesandrew/skills★ 1same name
- itgenius-au/skills-library★ 1same name
- Kashyap-001/second-brain-template★ 0same name
3 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 repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ci-watchSkill
- commitSkill
- discovery-interview-prepSkill
- doc-generateSkill
- incident-responseSkill
- opportunity-solution-treeSkill
- polarisSkill
- prd-developmentSkill
- prioritization-advisorSkill
- reviewSkill
- roadmapSkill
- security-auditSkill
- spec-updateSkill
- tddSkill
- tech-debt-auditSkill
- test-runnerSkill
- user-storySkill
- uxSkill
- workshop-facilitationSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 4 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
If any staged or unstaged changes exist → suggest /commit before wrapping:
- Distinctive: line 29
Wait for user response before continuing.
- Very specific: line 34
Look through the conversation for messages prefixed with [LEARN]
- Very specific: line 35
Look in scratchpad for any [LEARN] entries added during the session
- Distinctive: line 53
Read current memory/scratchpad.md.
- Distinctive: line 55
Ask: "What's the next step for next session?
- Distinctive: line 69
Ask: "Did any priorities or goals shift today?
- Very specific: line 71
If yes → run /polaris to update interactively
- Very specific: line 76
If any source files were modified this session and /commit step 6 (spec-update) wasn't already run:
- Very specific: line 98
Fix: Run /session-wrap even for short sessions.
“Common” is measured: kept by at least 6 in 10 of the 10 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 Wrap — End-of-Session Protocol
Purpose
Structured close of a working session. Ensures nothing is lost across /compact or session restart.
Runs once per session at the end — not per commit (that's handled by post-commit-lessons.js).
Application
Step 1 — Uncommitted changes check
git status --shortIf any staged or unstaged changes exist → suggest /commit before wrapping:
"You have uncommitted changes. Run
/commitfirst to preserve this work?"
Wait for user response before continuing.
Step 2 — Learnings capture
Scan the current session for any [LEARN] items:
- Look through the conversation for messages prefixed with
[LEARN] - Look in scratchpad for any
[LEARN]entries added during the session
For each [LEARN] found:
- Present it to the user: "Found a learning: [text]. Add to
memory/patterns.md?" - On approval, append to memory/patterns.md under the Learnings section using the format:
### [Category] Rule description
- **Mistake**: what went wrong
- **Correction**: what to do instead
- **Project**: [project name]
- **Date**: YYYY-MM-DDCategories: Navigation, Editing, Testing, Git, Quality, Context, Architecture, Performance
Step 3 — Scratchpad: next steps
Read current memory/scratchpad.md.
Ask: "What's the next step for next session? I'll add it to the scratchpad."
Append to scratchpad (append-only, never overwrite):
### HH:MM — Session wrap [YYYY-MM-DD]
- Done: [summary of what was completed this session]
- Next: [immediate next step for next session]
- Decision: [any key decision made, if applicable]
---Step 4 — Polaris check
Ask: "Did any priorities or goals shift today? Update polaris.md?" (1 line answer)
- If yes → run
/polaristo update interactively - If no → skip
Step 5 — Spec check (conditional)
If any source files were modified this session and /commit step 6 (spec-update) wasn't already run:
"Code changed but spec update may be missing. Run
/spec-updatenow?"
Advisory — user decides.
Step 6 — Closing summary
Output a brief session summary:
Session closed [YYYY-MM-DD HH:MM]
Done: [2-3 bullet points of what was accomplished]
Committed: [yes/no — last commit hash if yes]
Learnings captured: [N items]
Next: [one-liner from scratchpad]Common Pitfalls
Pitfall 1: Skipping the wrap on short sessions
Symptom: "I'll remember." → next session starts with no context.
Fix: Run /session-wrap even for short sessions. The 2-minute investment prevents a 10-minute re-orientation.
Pitfall 2: Running before committing
Symptom: Uncommitted changes exist at wrap time. Fix: Step 1 always checks — it blocks until user commits or explicitly skips.
References
memory/scratchpad.md— running work log, last 30 lines re-injected by session-context.jsmemory/patterns.md— learnings storage (append only)memory/polaris.md— strategic context (north star, goals, values)/polarisskill — interactive polaris update/spec-updateskill — post-change documentationpost-commit-lessons.jshook — per-commit lesson reminder (complementary, not duplicate)
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.

