Layer 2
Lifecycle Skills: /start, /prime, and /wrap
The real power comes from wiring the pipeline into your session lifecycle. Three skills handle this: /start for quick resumes, /prime for full boots, and /wrap at session end.
/start — Quick Resume
/start is the lightweight alternative to /prime. Use it for same-day work or resuming after a short break. Claude:
1. Queries session-rag for recent session context
2. Searches mem0 for project memories
3. Checks git state and open issues
4. Presents a quick briefing — no indexing, no health checks
Use /start when you're continuing the same thread of work.
Use /prime when you've been away for days or switching projects.
/prime — Full Session Boot
When you start a session and type /prime, Claude:
1. Queries session-rag for recent session context
2. Searches mem0 for recent memories about this project
3. Checks git status, open PRs, and unfinished issues
4. Verifies code indexes are fresh (vector DB + graph DB)
5. Gathers full project status
6. Presents a unified startup briefing:
"Last session you were working on STAK-498 (price scraper bug).
PR #903 was merged. Tasks 4-5 are still open. The poller was
redeployed to both Portainer and Fly.io. Code indexes are fresh."
/wrap — Session End
When you're done and type /wrap, Claude runs the retrospective inline (no separate /retro step) and saves everything to mem0:
1. Checks for uncommitted changes, open PRs, in-progress tasks
2. Asks what to do with any loose ends (commit? stash? discard?)
3. Runs retrospective inline — captures prescriptive lessons
(what to do differently, not just what happened)
4. Saves retro lessons + curated session summary to mem0
5. Cleans up merged worktree branches
6. Prints a session recap with shipped/pending/next-session summary
Note: /wrap saves to mem0 only. session-rag indexes the raw JSONL
transcript automatically — no digest step needed.
Prompt for Claude: Build session lifecycle skills
I want three Claude Code skills for session lifecycle management:
/start (quick resume): Query session-rag for recent session context, search mem0 for project memories, check git status and open issues, and present a quick briefing. No indexing or health checks — use this for same-day work or short breaks.
/prime (full session boot): Search mem0 for recent project memories, check git status and open issues, verify code indexes are healthy, and present a full briefing that tells me where I left off and what needs attention. Use this after days away or when switching projects.
/wrap (session end): Check for uncommitted work, capture retrospective lessons to mem0 (mistakes, successful approaches, preferences), save a curated session summary to mem0, clean up merged branches, and print a session recap. session-rag handles transcript indexing automatically — no digest agent needed.
All three skills should be saved as
~/.claude/skills/<name>/SKILL.md files. They should ask me before taking destructive actions (deleting branches, discarding changes).