From cairn
Use when a session is ending — the user says "that's enough for today", "let's wrap up", "stop here", "close the session"; or when the agent itself judges the session is at a natural stopping point and wants to leave a clean handoff. Produces the end-of-session ritual — final journal entry, commit-status snapshot, handoff summary with concrete SHAs and explicit yes/no questions for the next session, and optional memory updates for durable preferences revealed during the session.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cairn:close-sessionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide the agent through the **end-of-session ritual**. The goal
Guide the agent through the end-of-session ritual. The goal is to leave the project in a state where a future session (human or agent) can pick up without context loss.
/clear, new
conversation).Read:
git status -uno — what's uncommitted?git log <main>..HEAD --oneline — what's unpushed?docs/todo.md — anything the session revealed that should be
on the punch list but isn't?Leaving uncommitted changes across a session break is usually fine — but flag what's there. Options:
Do not push unless the user's instructions authorise it.
[x].Write (or check) these sections:
## heading: ## Closing — <what shipped>.
Bullet list of the session's deliverables with SHAs.## Skipped / not done this session — honest list of what
was deferred, with rationale.## Things I'd like your review / yes-or-no on when you're back — the explicit-questions block. Only questions that
genuinely need user input before the next session.Two profiles — user (global, personal) and project (per-project, shared):
cairn-build-user-profile skill):
Scan today's journal for durable observations about how the
user thinks — decision patterns, design values, collaboration
posture. Only add observations with evidence (a concrete
session reference or quote). If ≥5 observations have been
added since last synthesis, re-read and consolidate; don't
just append.cairn-build-project-profile skill):
If a session settled a project-wide stance (risk tolerance,
security posture, quality bar, contribution norm), update
docs/project-profile.md as part of the close-out commit so
it rides with the shipping PR.If your CLI also has a memory system (e.g. Claude Code's
~/.claude/projects/<slug>/memory/), save individual preference
memories there in addition to the user-profile synthesis —
single-observation memories are cheap to reference and the
user-profile is the rollup.
Do NOT save:
A docs(session): close out <date> commit is standard. Include:
docs/todo.md changes.The final response in chat is a compact summary of what the user will see when they next open the project. Shape:
**Session closing — <date>.**
Shipped: <bullet list with SHAs>.
Open questions for your review (in the journal): <numbered list
of the yes/no questions>.
Not done / deferred: <bullet list>.
Next session starting point: <one sentence>.
Keep it under ~200 words. The full detail lives in the session journal; chat is just the pointer.
docs(session): <topic> planning commit is fine; no code
changes needed./compact if applicableMany CLIs support /compact or similar context-reduction
operations. At session close, a gentle reminder:
"Session closed cleanly. If you're continuing later,
/compactis a good next step to free context — the journal + punch list carry everything the next session needs."
Only suggest it if your CLI actually has it. Don't invent one.
npx claudepluginhub foobarto/cairn --plugin cairnGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.