description: Save a summary of the current Claude Code session to unified AI storage
Save Session
Create a comprehensive session summary and save it to the unified AI storage at ~/.local/share/ai/sessions/.
Important Guidelines
- DO NOT use echo or command-line tools to communicate - output all text directly in your response
- Create a properly formatted session entry following the template below
- Save to the correct location with proper filename format
- Be concise but comprehensive - capture what matters
Workflow
Step 1: Analyze the Session
Review the conversation and identify:
- Main accomplishments - What was actually done?
- Key decisions - What choices were made and why?
- Next steps - What follow-up work is needed?
Step 2: Generate Session Entry
Filename format: YYYY-MM-DD-description-with-dashes.md
Rules:
- Use only lowercase letters, digits, and dashes in the description
- Keep description to 3-6 words
- NO underscores in filenames
- NO timestamps beyond the date
- NO
_SESSION_prefix
Location: ~/.local/share/ai/sessions/YYYY-MM/
Template:
# Session: <Brief Description>
**Date:** YYYY-MM-DD
**Tool:** claude
## Summary
Brief description of what was accomplished.
## What Was Accomplished
- Task 1
- Task 2
## Files Changed
- `path/to/file` - Description of change
## Outcome
Result of the session.
## Next Steps
- [ ] Follow-up task 1
- [ ] Follow-up task 2
### Tags
#claude #relevant-topic-tags
Step 3: Save the File
Use the Write tool to save the session entry to:
~/.local/share/ai/sessions/YYYY-MM/YYYY-MM-DD-description.md
Good examples:
~/.local/share/ai/sessions/2026-02/2026-02-10-tekton-pr-review.md~/.local/share/ai/sessions/2026-02/2026-02-10-nix-systems-refactoring.md
Bad examples:
~/.local/share/ai/sessions/2026-02/2026-02-10_SESSION_something.md❌~/.config/claude/history/sessions/2026-02/...❌ (old location!)
Step 4: Confirm to User
After saving, inform the user:
✅ Session saved to: ~/.local/share/ai/sessions/YYYY-MM/YYYY-MM-DD-description.md
Examples
Example 1: Infrastructure Session
# Session: Configure Syncthing Folder Sync
**Date:** 2026-01-15
**Tool:** claude
## Summary
Added claude-history folder to Syncthing configuration for cross-machine backup of AI session data.
## What Was Accomplished
- Added syncthing folder to `globals.nix` with generated ID
- Configured sync for kyushu and aomi machines
- Verified existing sync patterns for consistency
## Files Changed
- `globals.nix` — added claude-history syncthingFolder entry
- `systems/kyushu/extra.nix` — enabled sync on kyushu
- `systems/aomi/extra.nix` — enabled sync on aomi
## Outcome
Syncthing will sync `~/.local/share/ai/` across both machines after next NixOS rebuild.
## Next Steps
- [ ] Rebuild NixOS on kyushu and aomi to activate
- [ ] Verify syncthing picks up the new folder
### Tags
#claude #nixos #syncthing #homelab
Example 2: Development Session
# Session: Tekton PR Review and Fix
**Date:** 2026-02-08
**Tool:** claude
## Summary
Reviewed PR #9143 for multi-credential git support, identified issues with test coverage, and submitted review with requested changes.
## What Was Accomplished
- Analyzed git credential resolution logic changes
- Found missing test case for overlapping host credentials
- Submitted review with 3 inline comments and change request
- Created follow-up issue for documentation update
## Outcome
PR review submitted. Author needs to add edge case tests before merge.
## Next Steps
- [ ] Re-review after author addresses feedback
- [ ] Update Tekton docs with multi-credential examples
### Tags
#claude #tekton #code-review #git
Best Practices
- Be specific — say what was modified, not just “worked on code”
- Capture decisions — document WHY choices were made
- Include context — future you needs to know what prompted this work
- Keep it real — if nothing significant happened, skip saving
When to Use
- After completing significant work
- When making important architectural decisions
- At the end of productive sessions
- When asked by SessionEnd hook
When to Skip
- Very short sessions (<5 minutes)
- Purely exploratory work with no findings
- When no meaningful progress was made