Set up and maintain a structured `.claude/memory/` directory for persistent context across Claude Code sessions. Use when starting a new project, when context is getting too long and needs to be offloaded, when the user asks about memory organization, or when you notice there is no memory structure in the current project. Provides templates, conventions, and maintenance guidance for MEMORY.md index files and topic-specific reference files.
Persistent memory for Claude Code. Survives context compaction and session boundaries.
memory/ directory exists in the auto memory path (shown in system prompt)memory/
├── MEMORY.md # Index — auto-loaded, kept under 200 lines
├── architecture.md # Module layout, data flow, key types
├── decisions.md # Design decisions with one-line rationale
├── debugging.md # Past bugs: symptom → root cause → fix
└── patterns.md # Code conventions, fixture templates
Start with MEMORY.md only. Add topic files as the project grows.
# Project Name — Memory
## Project State
- Current phase/status in one line
- Key metrics (test count, lint status)
## Key Gotchas
- Hard-won lessons that prevent repeat mistakes
- One line each, specific and actionable
## Architecture Rules
- Invariants that must never be violated
## Build
` ` `bash
# exact commands to build/test/lint
` ` `
## Deep References
- [architecture.md](architecture.md) — module layout, data flow
- [decisions.md](decisions.md) — design decisions and rationale
- [debugging.md](debugging.md) — past bugs, root causes, fixes
- [patterns.md](patterns.md) — code patterns, conventions
architecture.md — Module tree, data flow (ascii), key types table, public API, test map. Update when modules change.
decisions.md — One entry per decision. Title + one-line rationale:
## Decision Title
Brief rationale explaining why this choice was made.
debugging.md — One entry per bug. Three fields:
## Bug Title
**Symptom:** What you observed.
**Root cause:** Why it happened.
**Fix:** What resolved it.
patterns.md — Recurring code patterns with minimal examples. Function signatures, registration patterns, test fixture templates, data model conventions.
MEMORY.md must stay under 200 lines — it's auto-loaded into every promptdocs/, not hereSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer