api-integration
Use this skill when the user says 'API integration', 'connect APIs', 'sync data', 'data mapping', 'rate limiting', or needs…
Use when the user says 'save diary', 'log session', 'wrapping up', or at end of a productive session.
Claude Code
$ npx -y skills add cwinvestments/memstack --skill diary --agent claude-code
Codex
$ npx skills add cwinvestments/memstack --skill diary -a codex -y
Cursor
$ npx skills add cwinvestments/memstack --skill diary -a cursor -y
Gemini CLI
$ npx skills add cwinvestments/memstack --skill diary -a gemini-cli -y
GitHub Copilot
$ npx skills add cwinvestments/memstack --skill diary -a github-copilot -y
OpenCode
$ npx skills add cwinvestments/memstack --skill diary -a opencode -y
Windsurf
$ npx skills add cwinvestments/memstack --skill diary -a windsurf -y
name: diary description: "Use when the user says 'save diary', 'log session', 'wrapping up', or at end of a productive session." version: 1.1.0
*Document what was accomplished in each CC session for future recall.*
When this skill activates, output:
`📓 Diary: Logging session...`
Then execute the protocol below.
| 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 | | **Multi-agent session (Builder/Reviewer role)** | DORMANT: Manager handles diary | none | | **Mid-session, user is actively coding** | DORMANT, don't interrupt flow | none | | **Casual conversation, no code changes made** | DORMANT: nothing to log | none | | **User asks to recall past sessions ("what did we do")** | DORMANT, Echo handles recall, not Diary | none | | **User says "save project" or "handoff"** | DORMANT, Project skill handles this | none | | **Session just started, no work yet** | DORMANT: nothing to log | none |
When the user asks to save a diary, keep these in mind:
| Temptation | Why it matters | |---|---| | "Nothing important happened" | Even small decisions are worth recording: what was decided, and who decided it. | | "Commits capture everything" | Commits don't capture decisions, blockers, or next steps. | | "Skip the handoff section" | Handoffs are the most valuable part for session continuity. |
**Never pass a JSON payload as a quoted command-line argument. Write it to a file and pipe it in with the dash sentinel, as every command below shows. On Windows, cmd.exe treats single quotes as ordinary characters, so a redirection operator anywhere in a quoted payload is executed rather than passed.**
**All JSON field values must be plain strings. Never pass arrays or objects. If multiple items (files, commits, decisions), join them as a comma-separated string.**
1. **Summarize the session:**
2. **Check git log** for commits:
git log --oneline -10
3. **Format the diary entry:**
# Session Diary: {project}, {date}
## Accomplished
- Item 1...
## Files Changed
- path/to/file.ts: description
## Commits
- abc1234 Message
## Decisions
- User decision: what was decided. Stated reason: as quoted from the session, the task prompt or a commit message, or "none stated"
- Session choice: what was chosen
## 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, as observed: temporary decisions and who made them, the debugging state as last seen (what was run and what it showed), gotchas found]4. **Save to SQLite database** (primary storage):
Write the payload to a file, then pipe it in with `-` as the argument. A payload on stdin is never seen by the shell's parser, so a redirection operator inside your prose cannot be read as one.
cat session.json | python "${CLAUDE_PLUGIN_ROOT}/db/memstack-db.py" add-session -The store is `~/.memstack/memstack.db`, one file per user, never a file beside the script. Every command prints the path it used on stderr as `memstack-db: store <path>`, so a session can confirm where it wrote instead of assuming.
**The SQLite row is the primary store. The markdown in `memory/sessions/` is a backup export.** The row holds the full `raw_markdown`, so a markdown file that is lost, truncated or overwritten can be restored from it: find the row in the `sessions` table by project and date, and write `raw_markdown` back to the file. This matters because `memory/` is gitignored, so version control is not a fallback and the database is the only one there is.
`session.json` contains:
{"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>"}5. **Save insights** for cross-project search:
Same form: write the payload to a file, pipe it in, `-` as the argument. Insight text is prose, so it must never travel on the command line.
cat insight.json | python "${CLAUDE_PLUGIN_ROOT}/db/memstack-db.py" add-insight -`insight.json` contains:
{"project":"<name>","type":"<type>","content":"<insight>","context":"Session <date>","tags":"<project>"}Choose `<type>` deliberately from this vocabulary, do not default to one:
The structured skill framework for Claude Code: 131 professional skills for deployment, security, databases, content, marketing, and more. Skills activate automatically when you need them. Say "deploy this to Railway" and the right skill loads on demand.
Use this skill when the user says 'API integration', 'connect APIs', 'sync data', 'data mapping', 'rate limiting', or needs…
Use this skill when the user says 'content pipeline', 'content automation', 'auto-publish', 'repurpose content', 'multi-platform…
Use this skill when the user says 'cron job', 'scheduled task', 'run every', 'cron expression', 'recurring job', or needs…
Use when the user says 'what MCP servers', 'find an MCP for', 'hosted MCP', 'list MCP servers', 'MCP catalog', 'available MCP…
Use this skill when the user says 'n8n workflow', 'build a workflow', 'automation workflow', 'connect services', or needs visual…
Use this skill when the user says 'webhook', 'webhook handler', 'webhook endpoint', 'receive events', 'HMAC verification',…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…
Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…