📓 Diary — Logging Session...
Document what was accomplished in each CC session for future recall.
Activation
When this skill activates, output:
📓 Diary — Logging session...
Then execute the protocol below.
Context Guard
| Context |
Status |
Priority |
| User says "save diary", "log session", "write diary" |
ACTIVE — write diary |
P1 |
| User explicitly says they're done ("that's it", "wrapping up") |
ACTIVE — suggest diary if work was done |
P2 |
| Mid-session, user is actively coding |
DORMANT — don't interrupt flow |
— |
| Casual conversation, no code changes made |
DORMANT — nothing to log |
— |
| User asks to recall past sessions ("what did we do") |
DORMANT — Echo handles recall, not Diary |
— |
| User says "save project" or "handoff" |
DORMANT — Project skill handles this |
— |
| Session just started, no work yet |
DORMANT — nothing to log |
— |
Anti-Rationalization
If you're thinking any of these, STOP — you're about to skip the protocol:
| You're thinking... |
Reality |
| "Nothing important happened this session" |
Every session has decisions, even small ones. Log them. |
| "I'll remember this for next time" |
You won't. You don't persist. The database does. Write the diary. |
| "The user didn't ask me to log this" |
The rule says log at session end. You don't need explicit permission. |
| "This was just a quick fix, not worth logging" |
Quick fixes contain decisions ("why this approach?"). Future you needs that context. |
| "I already committed, so the work is saved" |
Commits don't capture decisions, blockers, or next steps. The diary does. |
| "The Session Handoff section isn't needed" |
Handoffs are the most valuable part. Always include in-progress work and pickup instructions. |
Protocol
Summarize the session:
- Project name and working directory
- Date and approximate duration
- What was built or changed
- Key files created or modified
- Commits made (hashes and messages)
- Decisions made and why
- Problems encountered and solutions
Check git log for commits:
git log --oneline -10
Format the diary entry:
# Session Diary — {project} — {date}
## Accomplished
- Item 1...
## Files Changed
- path/to/file.ts — description
## Commits
- abc1234 Message
## Decisions
- Decision: reason
## Next Steps
- What to do next
## Session Handoff
**In Progress:** [what was actively being worked on when session ended]
**Uncommitted Changes:** [list any unstaged/uncommitted work, or "None"]
**Pick Up Here:** [exact instruction for next session — specific enough to start cold]
**Session Context:** [anything important that isn't captured elsewhere — temp decisions, debugging state, gotchas discovered]
Save to SQLite database (primary storage):
python C:/Projects/memstack/db/memstack-db.py add-session '{"project":"<name>","date":"<YYYY-MM-DD>","accomplished":"<bullets>","files_changed":"<bullets>","commits":"<bullets>","decisions":"<bullets>","problems":"<bullets>","next_steps":"<bullets>","duration":"<estimate>","raw_markdown":"<full text>"}'
Also save decisions as insights for cross-project search:
python C:/Projects/memstack/db/memstack-db.py add-insight '{"project":"<name>","type":"decision","content":"<decision>","context":"Session <date>","tags":"<project>"}'
Update project context with last session date:
python C:/Projects/memstack/db/memstack-db.py set-context '{"project":"<name>","last_session_date":"<YYYY-MM-DD>"}'
Also save markdown copy to memory/sessions/{date}-{project}.md (export format, human-readable backup)
Session File Size Management
The 500-line limit on markdown files is no longer a concern since SQLite is the source of truth.
Markdown files in memory/sessions/ are now just human-readable exports.
Old markdown files are preserved but not the primary storage.
Inputs
- Current session context
- Project name from working directory or config.json
- Git log for commit history
Outputs
- Session entry in SQLite database
- Insights extracted from decisions
- Markdown backup in memory/sessions/
- Brief confirmation summary
Example Usage
User: "save diary"
📓 Diary — Logging session...
Saved: memory/sessions/2026-02-18-adminstack.md
Project: AdminStack | Duration: ~2 hours
Accomplished: Built CC Monitor page, API routes, setup guide
Commits: 4 (45b4c42, d1c7e11, f6c8e18, f0e793f)
Files changed: 8
This session is now searchable via Echo.
Level History
- Lv.1 — Base: Session logging with git integration. (Origin: MemStack v1.0, Feb 2026)
- Lv.2 — Enhanced: Added YAML frontmatter, context guard, 500-line limit with archive, activation message. (Origin: MemStack v2.0 MemoryCore merge, Feb 2026)
- Lv.3 — Advanced: SQLite as primary storage, auto-extract insights from decisions, markdown as backup export. (Origin: MemStack v2.1 Accomplish-inspired upgrade, Feb 2026)
- Lv.4 — Native: CC rules integration (
.claude/rules/diary.md), always-on session logging awareness without skill file read. (Origin: MemStack v3.0-beta, Feb 2026)
- Lv.5 — Handoff: Added structured Session Handoff section — in-progress work, uncommitted changes, exact pickup instructions, session context preservation. (Origin: MemStack v3.1, Feb 2026)
Pro Feature: PreCompact Auto-Save
MemStack™ Pro includes a PreCompact hook that automatically saves a diary entry before Claude Code context compaction runs. Free version requires manual diary saves only.
Upgrade: memstack.pro
1---2name: diary3description: Use when the user says 'save diary', 'log session', 'wrapping up', or at end of a productive session.4---567# 📓 Diary — Logging Session...8*Document what was accomplished in each CC session for future recall.*910## Activation1112When this skill activates, output:1314`📓 Diary — Logging session...`1516Then execute the protocol below.1718## Context Guard1920| Context | Status | Priority |21|---------|--------|----------|22| **User says "save diary", "log session", "write diary"** | ACTIVE — write diary | P1 |23| **User explicitly says they're done ("that's it", "wrapping up")** | ACTIVE — suggest diary if work was done | P2 |24| **Mid-session, user is actively coding** | DORMANT — don't interrupt flow | — |25| **Casual conversation, no code changes made** | DORMANT — nothing to log | — |26| **User asks to recall past sessions ("what did we do")** | DORMANT — Echo handles recall, not Diary | — |27| **User says "save project" or "handoff"** | DORMANT — Project skill handles this | — |28| **Session just started, no work yet** | DORMANT — nothing to log | — |2930## Anti-Rationalization3132If you're thinking any of these, STOP — you're about to skip the protocol:3334| You're thinking... | Reality |35|---|---|36| "Nothing important happened this session" | Every session has decisions, even small ones. Log them. |37| "I'll remember this for next time" | You won't. You don't persist. The database does. Write the diary. |38| "The user didn't ask me to log this" | The rule says log at session end. You don't need explicit permission. |39| "This was just a quick fix, not worth logging" | Quick fixes contain decisions ("why this approach?"). Future you needs that context. |40| "I already committed, so the work is saved" | Commits don't capture decisions, blockers, or next steps. The diary does. |41| "The Session Handoff section isn't needed" | Handoffs are the most valuable part. Always include in-progress work and pickup instructions. |4243## Protocol44451. **Summarize the session:**46 - Project name and working directory47 - Date and approximate duration48 - What was built or changed49 - Key files created or modified50 - Commits made (hashes and messages)51 - Decisions made and why52 - Problems encountered and solutions53542. **Check git log** for commits:55 ```bash56 git log --oneline -1057 ```58593. **Format the diary entry:**60 ```markdown61 # Session Diary — {project} — {date}6263 ## Accomplished64 - Item 1...6566 ## Files Changed67 - path/to/file.ts — description6869 ## Commits70 - abc1234 Message7172 ## Decisions73 - Decision: reason7475 ## Next Steps76 - What to do next7778 ## Session Handoff79 **In Progress:** [what was actively being worked on when session ended]80 **Uncommitted Changes:** [list any unstaged/uncommitted work, or "None"]81 **Pick Up Here:** [exact instruction for next session — specific enough to start cold]82 **Session Context:** [anything important that isn't captured elsewhere — temp decisions, debugging state, gotchas discovered]83 ```84854. **Save to SQLite database** (primary storage):86 ```bash87 python C:/Projects/memstack/db/memstack-db.py add-session '{"project":"<name>","date":"<YYYY-MM-DD>","accomplished":"<bullets>","files_changed":"<bullets>","commits":"<bullets>","decisions":"<bullets>","problems":"<bullets>","next_steps":"<bullets>","duration":"<estimate>","raw_markdown":"<full text>"}'88 ```89905. **Also save decisions as insights** for cross-project search:91 ```bash92 python C:/Projects/memstack/db/memstack-db.py add-insight '{"project":"<name>","type":"decision","content":"<decision>","context":"Session <date>","tags":"<project>"}'93 ```94956. **Update project context** with last session date:96 ```bash97 python C:/Projects/memstack/db/memstack-db.py set-context '{"project":"<name>","last_session_date":"<YYYY-MM-DD>"}'98 ```991007. **Also save markdown copy** to `memory/sessions/{date}-{project}.md` (export format, human-readable backup)101102## Session File Size Management103104The 500-line limit on markdown files is no longer a concern since SQLite is the source of truth.105Markdown files in `memory/sessions/` are now just human-readable exports.106Old markdown files are preserved but not the primary storage.107108## Inputs109- Current session context110- Project name from working directory or config.json111- Git log for commit history112113## Outputs114- Session entry in SQLite database115- Insights extracted from decisions116- Markdown backup in memory/sessions/117- Brief confirmation summary118119## Example Usage120121**User:** "save diary"122123```124📓 Diary — Logging session...125126Saved: memory/sessions/2026-02-18-adminstack.md127128Project: AdminStack | Duration: ~2 hours129Accomplished: Built CC Monitor page, API routes, setup guide130Commits: 4 (45b4c42, d1c7e11, f6c8e18, f0e793f)131Files changed: 8132133This session is now searchable via Echo.134```135136## Level History137138- **Lv.1** — Base: Session logging with git integration. (Origin: MemStack v1.0, Feb 2026)139- **Lv.2** — Enhanced: Added YAML frontmatter, context guard, 500-line limit with archive, activation message. (Origin: MemStack v2.0 MemoryCore merge, Feb 2026)140- **Lv.3** — Advanced: SQLite as primary storage, auto-extract insights from decisions, markdown as backup export. (Origin: MemStack v2.1 Accomplish-inspired upgrade, Feb 2026)141- **Lv.4** — Native: CC rules integration (`.claude/rules/diary.md`), always-on session logging awareness without skill file read. (Origin: MemStack v3.0-beta, Feb 2026)142- **Lv.5** — Handoff: Added structured Session Handoff section — in-progress work, uncommitted changes, exact pickup instructions, session context preservation. (Origin: MemStack v3.1, Feb 2026)143144## Pro Feature: PreCompact Auto-Save145146MemStack™ Pro includes a PreCompact hook that automatically saves a diary entry before Claude Code context compaction runs. Free version requires manual diary saves only.147148Upgrade: memstack.pro