Auto-loads session context at conversation start. Shows latest session doc, recent git activity, and WIP state for development continuity.
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.
!ls -t ${CC_SESSION_DOCS_DIR:-docs}/SESSION_*.md 2>/dev/null | head -1
!git log --oneline -10 2>/dev/null
!git branch --show-current 2>/dev/null
!git status --short 2>/dev/null | head -5
!git diff --name-only 2>/dev/null | head -10
!git ls-files --others --exclude-standard 2>/dev/null | head -10
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.
Read the most recent session document shown in the live context above. Extract:
Look at uncommitted changes and untracked files from the live context:
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.
If the user explicitly asks to refresh context:
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 |
| 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.
!command`` sections inject live state at load timeSESSION_*.md in the configured docs directory/session-sync separatelySearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer