claude-context-memory
v1.0.1
Published
Project-level knowledge base skill for Claude Code. Auto-records feature implementations, bug fixes, architecture decisions into structured .context/ files with INDEX.md routing and git commit association.
Maintainers
Readme
claude-context-memory
Project-level knowledge base skill for Claude Code. Automatically records feature implementations, bug fixes, architecture decisions into structured .context/ files with INDEX.md routing and git commit association.
Install
npx claude-context-memoryThis will:
- Check prerequisites (Python 3.9+, Git, Auggie MCP)
- Install skill files to
~/.claude/skills/context-memory/ - Configure
~/.claude/CLAUDE.mdwith Phase 1 retrieval + Phase 6 sedimentation rules
Enable for a project
cd your-project
claude-context-memory initCreates .context/ directory structure and adds activation to project's CLAUDE.md.
How it works
Phase 1 — Retrieval: At conversation start, Claude checks .context/INDEX.md for relevant history before querying the codebase. Matched entries provide retrieval_hints that guide Auggie for more precise code retrieval.
Phase 6 — Sedimentation: After completing a task, Claude evaluates whether to record:
- Runs
analyze-diffto check git changes (file count, critical path hits) - If recording is warranted, asks you: "📋 This change touches N files, record as
feature: 'title'? (Y/N)" - On approval, writes entry in background (non-blocking)
You control what gets recorded. Claude only suggests — never auto-records without asking.
Commands
claude-context-memory # Install
claude-context-memory init # Enable for current project
claude-context-memory status # Check installation status
claude-context-memory uninstall # Remove skillContext Manager CLI
The underlying Python script supports 9 subcommands:
python3 ~/.claude/skills/context-memory/scripts/context_manager.py \
--project-root "/path/to/project" <command>| Command | Description |
|---------|-------------|
| record --input-json '{...}' | Record a new context entry |
| query --keyword X --tag Y --category Z --file F | Search entries (weighted scoring) |
| index | Rebuild INDEX.md (auto-archives at 200+ entries) |
| link-commit --entry-id ID --commit HEAD | Associate git commit with entry |
| history --category feature --limit 10 | View event history |
| prune --days-stale 90 --dry-run | Archive stale entries |
| summary --category feature --window-days 30 | Generate category summary |
| analyze-diff | Git change analysis for trigger decisions |
| verify | Check if entry-referenced files still exist |
Directory structure
.context/
├── INDEX.md # Routing table (always read first)
├── entries/
│ ├── feature/ # Feature implementations
│ ├── bugfix/ # Bug fixes
│ ├── decision/ # Architecture decisions
│ └── discovery/ # Key discoveries
├── history/ # Event logs (append-only)
├── commits/ # commit hash → entry_id mapping
├── summaries/ # Generated summaries
└── .archive/ # Archived old entriesRequirements
- Python 3.9+ (stdlib only, no pip install)
- Git
- Claude Code
- Auggie MCP (optional — enhances Phase 1 retrieval)
License
MIT
