Agent skill
dialogue-save-session
Save session context for continuity across sessions. Creates a per-user session memo capturing active focus, recent work, and open questions. Triggers on "save session", "end session", "session memo", "remember context".
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/dialogue-save-session-pidster-project-2501
SKILL.md
Skill: Save Session
Saves session context to a per-user session memo file for continuity across Claude sessions. This implements the TMS externalisation operation.
When to Use
- At the end of a work session to preserve context
- Before switching to a different task or project
- When you want the next session to have context about current work
How It Works
Session memos are stored per-user at .dialogue/session-memo-{username}.yaml. This supports multi-user workflows where each developer has their own session state that doesn't conflict with others.
At session start, the Dialogue Framework hook reads your session memo and includes key context in the system message.
Schema
# Session memo for {username}
username: "pidster"
last_session: "2026-01-16T18:30:00Z"
active_focus: "FW-017: Merge-Friendly Artifact Structure"
recent_tasks:
- "FW-017" # Tasks worked on
recent_decisions:
- "DEC-20260116-180240" # Decisions made
open_questions:
- "How should session memos handle task completion?"
notes: |
Optional freeform notes about session context.
# Interaction mode preference (overrides project config.yaml)
# Options: human-led | partnership | ai-led
interaction_mode_preference: partnership
# Feature explanation tracking (for teach-by-doing in ai-led mode)
feature_explanations_given:
decision_logging: 0 # Times explained (stop after 2-3)
observation_logging: 0
task_management: 0
To Save Session Context
Gather the following information and write to .dialogue/session-memo-{username}.yaml:
- Determine username: Use
$USERenvironment variable - Identify active focus: Current task or primary activity
- List recent work: Task IDs worked on, decisions made
- Note open questions: Unresolved questions or blockers
- Write file: Create/update
.dialogue/session-memo-{username}.yaml
Example
# Determine username
USERNAME="${USER:-$(whoami)}"
# Write session memo
cat > .dialogue/session-memo-${USERNAME}.yaml << 'EOF'
username: "pidster"
last_session: "2026-01-16T18:30:00Z"
active_focus: "FW-017: Merge-Friendly Artifact Structure"
recent_tasks:
- "FW-017"
recent_decisions:
- "DEC-20260116-180240"
open_questions:
- "How should session memos handle multi-session context?"
notes: |
Completed per-file migration. Next: test with new session.
interaction_mode_preference: partnership
feature_explanations_given:
decision_logging: 2
observation_logging: 1
task_management: 0
EOF
Updating Interaction Mode
When saving a session, preserve any existing interaction_mode_preference unless the user has changed it during the session. If the user used /set-mode, update the preference accordingly.
Multi-User Workflow
Each user has their own session memo file:
session-memo-pidster.yamlsession-memo-alice.yamlsession-memo-bob.yaml
This avoids merge conflicts in distributed VCS workflows - session state is personal context, not shared state.
Relationship to Other Skills
| Skill | Purpose |
|---|---|
dialogue-manage-tasks |
Track shared task state |
dialogue-log-decision |
Record shared decisions |
dialogue-save-session |
Preserve personal session context |
Session memos reference tasks and decisions but contain personal context about what you were working on, not the shared project state.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?