|
| 1 | +# StackMemory Plugin for Claude Code |
| 2 | + |
| 3 | +Context persistence and session handoffs for Claude Code. |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +### Option 1: Via StackMemory CLI |
| 8 | + |
| 9 | +```bash |
| 10 | +stackmemory setup-plugins |
| 11 | +``` |
| 12 | + |
| 13 | +### Option 2: Manual Symlink |
| 14 | + |
| 15 | +```bash |
| 16 | +ln -s "$(npm root -g)/@stackmemoryai/stackmemory/plugins/stackmemory" ~/.claude/plugins/stackmemory |
| 17 | +``` |
| 18 | + |
| 19 | +### Option 3: Copy |
| 20 | + |
| 21 | +```bash |
| 22 | +cp -r plugins/stackmemory ~/.claude/plugins/ |
| 23 | +``` |
| 24 | + |
| 25 | +## Commands |
| 26 | + |
| 27 | +| Command | Description | |
| 28 | +|---------|-------------| |
| 29 | +| `/sm-status` | Show StackMemory status and context | |
| 30 | +| `/sm-capture` | Capture work state for session handoff | |
| 31 | +| `/sm-restore` | Restore context from last handoff | |
| 32 | +| `/sm-decision` | Record a key decision | |
| 33 | +| `/sm-memory` | Store a memory/observation | |
| 34 | +| `/sm-context` | Manage context frames | |
| 35 | +| `/sm-tasks` | Manage tasks | |
| 36 | +| `/sm-log` | View activity log | |
| 37 | +| `/sm-clear` | Clear context with ledger | |
| 38 | +| `/sm-help` | Show plugin help | |
| 39 | + |
| 40 | +## Workflow |
| 41 | + |
| 42 | +### Starting a Session |
| 43 | + |
| 44 | +``` |
| 45 | +/sm-restore |
| 46 | +``` |
| 47 | + |
| 48 | +Loads the last captured handoff context. |
| 49 | + |
| 50 | +### During Work |
| 51 | + |
| 52 | +``` |
| 53 | +/sm-decision "Use PostgreSQL for persistence" |
| 54 | +/sm-memory "User prefers TypeScript" |
| 55 | +``` |
| 56 | + |
| 57 | +Record important decisions and observations. |
| 58 | + |
| 59 | +### Ending a Session |
| 60 | + |
| 61 | +``` |
| 62 | +/sm-capture |
| 63 | +``` |
| 64 | + |
| 65 | +Captures current state for the next session. |
| 66 | + |
| 67 | +## Integration with MCP |
| 68 | + |
| 69 | +StackMemory also provides an MCP server for Claude Desktop: |
| 70 | + |
| 71 | +```bash |
| 72 | +stackmemory setup-mcp |
| 73 | +``` |
| 74 | + |
| 75 | +This registers tools like `context_add`, `decision_record`, `memory_store` that can be called directly by Claude. |
| 76 | + |
| 77 | +## Learn More |
| 78 | + |
| 79 | +- [StackMemory Documentation](https://github.com/stackmemoryai/stackmemory) |
| 80 | +- [Claude Code Plugins](https://docs.anthropic.com/claude-code/plugins) |
0 commit comments