session-lifecycle
Skill0 starsChanged 8 months agoMITView on GitHub
Use when starting or ending a Claude Code working session — load context from memory, output a session brief, save decisions and progress at session end, and ensure work is resumable next session.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- Kangentic/kangentictheir own version, first seen Oct 5, 2026
- nikzlabs/shipittheir own version, first seen Oct 2, 2026
- Giobebbe/second-brain-os-templatetheir own version, first seen Apr 11, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Kangentic/kangentic★ 124same name
- Giobebbe/second-brain-os-template★ 9same name
- nikzlabs/shipit★ 9same name
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 repository190 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-auditSkill
- accessibility-complianceSkill
- ado-api-cliSkill
- ado-artifactsSkill
- ado-container-deploymentsSkill
- ado-organizationSkill
- ado-pipeline-designSkill
- ado-pipeline-optimizationSkill
- ado-pipeline-securitySkill
- ado-pipelines-opsSkill
- ado-release-managementSkill
- ado-security-policiesSkill
- ado-work-trackingSkill
- adr-writingSkill
- agentic-ai-patternsSkill
- agentic-evalSkill
- agentic-memorySkill
- agentic-reliabilitySkill
- agentic-securitySkill
- ai-data-moatSkill
- ai-harnessSkill
- ai-product-designSkill
- ai-product-monetizationSkill
- ai-product-positioningSkill
- ai-product-retentionSkill
- ai-product-validationSkill
- ai-safety-guardrailsSkill
- add-analytics-instrumentationSkill
- analyze-account-healthSkill
- analyze-ai-topicsSkill
- analyze-chartSkill
- analyze-dashboardSkill
- analyze-experimentSkill
- analyze-feedbackSkill
- compare-user-journeysSkill
- create-chartSkill
- create-dashboardSkill
- daily-briefSkill
- debug-replaySkill
- diagnose-errorsSkill
- diff-intakeSkill
- discover-analytics-patternsSkill
- discover-event-surfacesSkill
- discover-opportunitiesSkill
- instrument-eventsSkill
- investigate-ai-sessionSkill
- monitor-ai-qualitySkill
- monitor-reliabilitySkill
- replay-ux-auditSkill
- review-agent-insightsSkill
- taxonomySkill
- weekly-briefSkill
- what-would-lenny-doSkill
- analytics-reportingSkill
- api-contract-testingSkill
- api-designSkill
- authentication-patternsSkill
- blockchain-auditSkill
- brainstormingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Run in order, stop if any step reveals a blocker:
- Distinctive: line 41
Never dump full memory file — extract 1-2 key facts per line
- Distinctive: line 42
If no memory exists: "First session — no prior context"
- Distinctive: line 107
When starting session and snapshot exists:
- Distinctive: line 109
Ask: "Continue from [next phase] or start fresh?"
- Distinctive: line 110
If continue → load phase context → dispatch next phase
“Common” is measured: kept by at least 6 in 10 of the 3 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 Lifecycle
When to Use
- Starting a new working session (run /session-start)
- Ending a working session (run /session-end)
- Mid-session checkpoint after completing a major phase
- Handing off work to next session without losing context
Core Jobs
1. Session Start Checklist
Run in order, stop if any step reveals a blocker:
# 1. Load memory index
cat ~/.claude/projects/[project-hash]/memory/MEMORY.md 2>/dev/null || echo "No memory yet"
# 2. Check git state
git status --short
git log --oneline -3
# 3. Check for WIP
git stash list | head -3Produce 3-line session brief:
Last session: [summary from memory or last commit message]
Current state: [branch name, N uncommitted files or "clean"]
Suggested next: [from memory "project" type or last WIP note]Rules:
- Brief must be under 5 lines total
- Never dump full memory file — extract 1-2 key facts per line
- If no memory exists: "First session — no prior context"
- Complete in under 30 seconds
2. Session End Checklist
1. Summarize session (3-5 bullets, concrete actions done)
2. Extract decisions → write to memory (project type)
3. Extract new conventions → update memory (feedback type) if NEW
4. Check uncommitted work:
- If complete → remind user to commit
- If WIP → offer: "Create WIP commit? [y/n]"
5. Update MEMORY.md index (add any new memory files)
6. Output closing summaryWIP commit format:
git add -A
git commit -m "wip: [1-line summary of incomplete work]
Context: [what was being done]
Next: [what needs to happen next session]
Status: [what's done, what's not]"Memory update format:
---
name: session-[YYYY-MM-DD]
description: Key decisions and context from [date] session
type: project
---
## Decisions Made
- [decision]: [rationale]
## Work Completed
- [what was built/fixed/researched]
## Pending
- [what was started but not finished]3. Mid-Session Snapshot
Called by @workflow-orchestrator after major workflow phases:
1. Write current task status to memory/session-snapshot.md (overwrite each time)
2. Record: workflow template, phases completed, phases pending, key files changed
3. Silent operation — don't interrupt the workflowSnapshot format:
Workflow: [template type] — "[task description]"
Completed phases: [list]
Current phase: [name] — [status]
Pending phases: [list]
Key files changed: [list]4. Context Handoff Protocol
When starting session and snapshot exists:
- Load snapshot → announce: "Resuming [workflow] — [task]. Last completed: [phase]"
- Ask: "Continue from [next phase] or start fresh?"
- If continue → load phase context → dispatch next phase
Non-resumable phases (restart from beginning of template):
- Incident template: triage + hotfix phases must run atomically — if session ended mid-phase, restart from triage to ensure correct diagnosis
- Any phase where partial execution could leave the system in an inconsistent state
Key Concepts
- Session brief — 3-line summary of last session, current git state, suggested next
- WIP commit — git commit preserving incomplete work with context for next session
- Memory update — writing decisions/context to
~/.claude/projects/[hash]/memory/ - Snapshot — ephemeral record of workflow progress for mid-session resumability
Checklist
- Memory loaded before starting session (not starting cold)?
- Session brief generated in 3 lines or less?
- Session end saves decisions to memory (not just summarizing to terminal)?
- WIP commit created if uncommitted work exists at session end?
- MEMORY.md index updated after adding new memory files?
Key Outputs
- Session start: 3-line brief (last session / current state / suggested next)
- Session end: 3-5 bullet summary + updated memory + WIP commit if needed
Output Format
- 🔴 Critical — ending session with uncommitted work and no WIP commit, no memory update (context lost)
- 🟡 Warning — session brief longer than 5 lines (defeats the purpose), not loading memory at session start
- 🟢 Suggestion — snapshot after each workflow phase (not just at end), use consistent WIP commit format
Anti-Patterns
- Session end that only prints to terminal (nothing persisted to memory = lost next session)
- Loading full memory files at session start (expensive + noisy — load index only)
- WIP commits without context note (next session can't understand what was being done)
- Skipping session start check (working without context = duplicate work, missed conventions)
Integration
claude-memoryskill — memory file format, types, MEMORY.md index structure@workflow-sessionagent uses this skill as its primary operating guideworkflow-templates— @workflow-session called for snapshots between phases
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.

