1.7 KiB
1.7 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| b159c0de-2e5e-4baa-a29b-0ab98f35cdbc | workflow | /save-memories command + memory-saver agent for session memory capture |
|
0.7 | 0.8 | 2026-02-19T22:09:55.179468+00:00 | 2026-02-28T20:57:20.251349+00:00 |
|
Created a two-part system for saving session learnings to cognitive memory.
Components
Command (~/.claude/commands/save-memories.md):
- Runs inline with full conversation context
- Finds cutoff point (last memory_store call) to avoid duplicates
- Analyzes conversation after cutoff point
- Builds structured summary with all session items
- Spawns memory-saver agent in background via Skill tool
Agent (~/.claude/agents/memory-saver.md):
- Runs on haiku model
- Receives structured summary as prompt
- Stores each item via MCP tools (with CLI fallback)
- Handles mechanical storage work
Workflow
- User calls
/save-memoriesat session end - Command analyzes full conversation context
- Command creates structured summary of learnings
- Command spawns agent in background with Task tool and
run_in_background=true - User gets control back immediately
- Agent processes items asynchronously
Advantages
- Replaces manual end-of-session memory saving
- Command handles context-dependent analysis
- Agent handles time-consuming storage operations
- Clean separation of concerns (context vs. mechanics)
- User not blocked waiting for storage to complete