skills/session-lifecycle/SKILL.md
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.
npx skillsauth add kienbui1995/magic-powers session-lifecycleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 -3
Produce 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:
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 summary
WIP 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]
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 workflow
Snapshot format:
Workflow: [template type] — "[task description]"
Completed phases: [list]
Current phase: [name] — [status]
Pending phases: [list]
Key files changed: [list]
When starting session and snapshot exists:
Non-resumable phases (restart from beginning of template):
~/.claude/projects/[hash]/memory/claude-memory skill — memory file format, types, MEMORY.md index structure@workflow-session agent uses this skill as its primary operating guideworkflow-templates — @workflow-session called for snapshots between phasescontent-media
Use when designing for XR (AR/VR/MR), choosing interaction modes, or adapting 2D UI patterns for spatial computing
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment
development
Use when you have a spec or requirements for a multi-step task, before touching code
development
Use when executing a structured workflow — select and run a feature, bugfix, refactor, research, or incident template with correct agent and model assignments per phase.