| name | codebase-memory |
| description | Maintain a persistent code index and summary. Track important functions, patterns, and architectural decisions for fast future retrieval. |
| user-invocable | true |
Codebase Memory Skill
Purpose
Create and maintain a persistent, queryable memory of the codebase structure — so you don't have to re-read the same files every session.
Memory Artifacts
| File | Purpose |
|---|
context/architecture.md | Service catalog, directory layout |
context/decisions.md | Architectural decisions (ADRs) |
context/tasks/lessons.md | Accumulated wisdom from past work |
Update Protocol
After any significant code change:
- Update architecture.md if new services/modules were added
- Update decisions.md if an architectural decision was made
- Update lessons.md if a mistake was made or a lesson was learned
Search Protocol
Before reading any file from scratch:
- Check
context/architecture.md for the relevant service/module
- Use grep to find specific patterns:
grep -rn 'pattern' --color=never . 2>/dev/null | head -20
- Only then open the specific file
Index Update
After large refactors, run /update-code-index to refresh the code search index.