>
Add this skill
npx mdskills install ErebusEnigma/context-memoryWell-structured persistent session memory with clear triggers, comprehensive examples, and robust search
Persistent, searchable context storage across Claude Code sessions using SQLite + FTS5.
Claude Code sessions are ephemeral - every conversation starts from zero. Close the terminal and everything you discussed, decided, and solved is gone. The only way to get that context back is to re-explain it or hope Claude reads the right files.
context-memory fixes this.
/recall authentication pulls up exactly what you did, what you decided, and why./recall retry pattern --detailed brings it back./recall --project scopes to whatever you're working in. Instant refresher on where you left off./recall CORS finds it regardless of which project it came from./remember and Claude does the rest: summarizes, extracts topics, identifies key code, stores it all. Add a note if you want, or don't.Without it, every session is a blank slate. With it, Claude Code has a long-term memory that grows more valuable the more you use it.
Core:
/remember generates rich summaries with brief/detailed text, key decisions, problems solved, technologies used, and outcome classification (success/partial/abandoned)auto_save.py, pre_compact_save.py) and work cross-platform — Windows (CMD, PowerShell), macOS, and Linux.python ~/.claude/context-memory/uninstall.py
This removes the skill, commands, hooks (both Stop and PreCompact), and MCP server registration. Your saved sessions are preserved by default. Use --remove-data to also delete the database, or --keep-data to skip the prompt. Use --force to remove command files even if they've been modified.
pip install mcppip install flask flask-cors/remember [note]Save the current session to context memory.
/remember
/remember "Fixed the auth bug with refresh tokens"
/remember "Important: OAuth2 implementation details"
Claude will automatically:
/recall [options]Search past sessions.
/recall authentication
/recall "database migration" --project
/recall jwt --detailed --limit 5
Options:
--project - Limit search to the current project--detailed - Include full message content and code snippets--limit N - Maximum number of results (default: 10)Sessions are stored in a SQLite database at ~/.claude/context-memory/context.db with the following structure:
Search uses FTS5 (Full-Text Search 5) with two tiers:
flask and flask-cors (pip install flask flask-cors). These are not needed for the core plugin.All core scripts have full argparse CLIs and can be run directly:
db_save.py — Save sessions from the command line:
python skills/context-memory/scripts/db_save.py --session-id abc123 --project-path /my/project \
--brief "Fixed auth bug" --topics "auth,jwt" --outcome success
python skills/context-memory/scripts/db_save.py --json session.json # or --json - for stdin
python skills/context-memory/scripts/db_save.py --auto --dedup-window 5 # auto-save mode with dedup
db_search.py — Search from the command line:
python skills/context-memory/scripts/db_search.py "authentication" --project /my/project --format json
python skills/context-memory/scripts/db_search.py "CORS" --detailed --limit 5
db_prune.py — Prune old data:
python skills/context-memory/scripts/db_prune.py --max-sessions 100 --dry-run
python skills/context-memory/scripts/db_prune.py --max-age 90 # delete sessions older than 90 days
python skills/context-memory/scripts/db_prune.py --prune-checkpoints --max-checkpoints-per-session 3
db_init.py — Database management:
python skills/context-memory/scripts/db_init.py # initialize database
python skills/context-memory/scripts/db_init.py --verify # verify schema integrity
python skills/context-memory/scripts/db_init.py --stats # show database statistics
python skills/context-memory/scripts/db_init.py --force # force recreation
Initialize or verify the database manually:
python skills/context-memory/scripts/db_init.py
python skills/context-memory/scripts/db_init.py --verify
python skills/context-memory/scripts/db_init.py --stats
The project has 364 tests across 12 test modules. CI runs on Python 3.8, 3.11, and 3.12 via GitHub Actions with ruff linting.
python -m pytest tests/ -v # run all tests
ruff check . # lint
See CONTRIBUTING.md for development setup, testing, and contribution guidelines.
MIT - See LICENSE for details.
ErebusEnigma
Best experience: Claude Code
/plugin marketplace add ErebusEnigma/context-memoryThen /plugin menu → select skill → restart. Use /skill-name:init for first-time setup.
Other platforms
Install via CLI
npx mdskills install ErebusEnigma/context-memoryContext Memory is a free, open-source AI agent skill. >
Install Context Memory with a single command:
npx mdskills install ErebusEnigma/context-memoryThis downloads the skill files into your project and your AI agent picks them up automatically.
Context Memory works with Requires Python >= 3.8 With Sqlite3 Fts5 Support (Included In Standard Library). Mcp Server Requires Python >= 3.10. Claude Code Cli Only.. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.