| name | session-resume |
| description | Auto-loads session context at conversation start. Shows latest session doc, recent git activity, and WIP state for development continuity. |
| user-invocable | true |
| allowed-tools | Bash, Read, Grep, Glob |
| catalog_description | Auto-loads session context — git activity, WIP state, and continuity. |
Session Resume — Automatic Context Recovery
Auto-loads on every session to maintain development continuity. Reads the latest
session document, recent git history, and work-in-progress state so you never
start cold.
Live Context (auto-injected)
Latest Session Document
!ls -t ${CC_SESSION_DOCS_DIR:-docs}/SESSION_*.md 2>/dev/null | head -1
Recent Git Activity
!git log --oneline -10 2>/dev/null
Current Branch Status
!git branch --show-current 2>/dev/null
!git status --short 2>/dev/null | head -5
Uncommitted Work-in-Progress
!git diff --name-only 2>/dev/null | head -10
!git ls-files --others --exclude-standard 2>/dev/null | head -10
Instructions
Step 1: Check if Context is Fresh
If you already have detailed knowledge of the current work state (e.g., from
MEMORY.md loaded into the system prompt), skip to Step 4.
Step 2: Read Latest Session Document
Read the most recent session document shown in the live context above. Extract:
- Completed work: What was accomplished last session
- Continuation point: Exact next step identified
- Pending tasks: Any TODO items or planned work
- Key decisions: Architectural or design choices made
Step 3: Check for Work-in-Progress
Look at uncommitted changes and untracked files from the live context:
- Modified files: Work started but not committed
- Untracked files: New code being developed
- Staged changes: Work ready to commit
Step 4: Greet and Brief
Provide a brief status when the session starts:
Welcome back. Here is where we left off:
Branch: [branch] ([clean/dirty])
Last session: [date] - [brief summary]
Continuation point: [next planned task]
[Any uncommitted work or WIP noted]
Ready to continue with [next task], or would you prefer to work on something else?
If the session context mentions "FIRST SESSION", provide an extended welcome:
Welcome to cognitive-core!
Agents: [list from context]
Top skills to try:
/code-review — Review code against project standards
/pre-commit — Lint staged files before committing
/fitness — Check project quality metrics
@test-specialist — Create or update tests
See .claude/AGENTS_README.md for the full agent routing guide.
For subsequent sessions, use the standard brief greeting.
Keep this brief (3-5 lines). Do not dump the entire session doc.
Step 5: If User Asks to "Remember" or "Refresh"
If the user explicitly asks to refresh context:
- Read the full latest session document
- Read MEMORY.md for persistent cross-session notes
- Check recent commit messages for work stream context
- Read any referenced implementation plans
- Provide a comprehensive summary
Session State Machine
This skill is the entry point for the session lifecycle:
Fresh → Active → Compacted → Resumed → Ended
| Transition | Trigger | This Skill's Role |
|---|
| Fresh → Active | First user message | Loads context, greets, transitions to Active |
| Compacted → Resumed | Context compaction + new message | Re-invoked to reconstruct context |
| Ended → Fresh | New conversation | Auto-loads as Fresh state |
What Is Preserved vs Reconstructed
| Context | Method | Reliability |
|---|
| Key Rules (CLAUDE.md) | compact-reminder.sh re-injects | Always preserved |
| Cross-session notes | MEMORY.md (persistent file) | Always preserved |
| Git state | Repository (immutable history) | Always preserved |
| Last session summary | SESSION_*.md (persistent file) | Always preserved |
| Conversation history | Context window only | Lost after compaction |
| Agent delegation results | Context window only | Lost after compaction |
| Intermediate reasoning | Context window only | Not recoverable |
When resuming after compaction, prioritize reconstructable state (git, files)
over conversation replay. Do not attempt to recover lost intermediate reasoning --
re-derive from current state if needed.
Notes
- This skill auto-loads on every session -- keep it lean
- The
!command`` sections inject live state at load time
- Session docs follow the pattern
SESSION_*.md in the configured docs directory
- For cross-machine sync, use
/session-sync separately