Run maintenance on memory system
Decrease confidence or update a memory (corrective feedback)
Archive or delete a memory by ID
List memories with optional filters
Promote observation to memory or memory to CLAUDE.md
Review and clean up low-confidence memories
Give negative feedback to a memory (-0.2 confidence)
Archive a memory by ID (with confirmation)
List memories with optional filters
Interactive review and promotion of high-confidence memories to CLAUDE.md
Matches all tools
Hooks run on every tool call, not just specific ones
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A file-based memory system for Claude Code that learns from observations and improves over time.
# Add the plugin marketplace
/plugin marketplace add /path/to/ccmem
# Install the plugin
/plugin install ccmem@ccmem-dev
# Restart Claude Code to activate
# Clone or copy to ~/.claude/memory/
# Set up hooks in Claude Code settings
To use the ccmem CLI directly from your terminal, add the plugin's bin directory to your PATH:
# Find where the plugin is installed
CCMEM_PATH=$(find ~/.claude/plugins -name "ccmem" -type f -path "*/bin/*" 2>/dev/null | head -1 | xargs dirname)
# Add to your shell profile (~/.zshrc or ~/.bashrc)
export PATH="$CCMEM_PATH:$PATH"
Alternatively, use slash commands in Claude Code (no PATH setup needed):
/ccmem-stats — View statistics/ccmem-list — List memories/ccmem-search <query> — Search memories/ccmem-show <id> — Show memory details/ccmem-remember <description> — Create a memory/ccmem-reinforce <id> — Positive feedback/ccmem-correct <id> — Negative feedback/ccmem-promote — Review and promote to CLAUDE.md/ccmem-cleanup — Review low-confidence memories# View statistics
ccmem stats
# Search memories
ccmem search "pnpm"
ccmem search "workflow"
# List all memories
ccmem list
# Show specific memory
ccmem show <memory-id>
# Provide feedback
ccmem reinforce <memory-id> # Positive feedback
ccmem correct <memory-id> # Negative feedback
# Run maintenance manually
ccmem maintenance
# Check automation status
ccmem automation status
# Unload automation
ccmem automation unload
If Claude Code crashes or is killed abruptly (terminal closed, process killed), sessions may be left without a proper session_end event. The system automatically detects and recovers these orphaned sessions:
session_end events"recovered": true in sessions.jsonSet CLAUDE_MEMORY_DIR environment variable to customize where memory data is stored:
export CLAUDE_MEMORY_DIR="/custom/path/to/memory"
Default: ~/.claude/memory/
~/.claude/memory/
├── config.json # System configuration
├── index.json # Master memory index
├── observations.jsonl # Event stream (hooks write here)
├── feedback.jsonl # User feedback log
├── search-index.json # Full-text search index
├── memories/
│ ├── global/ # Global memories
│ └── projects/ # Per-project memories
├── hooks/ # Claude Code hooks
├── scripts/ # Utility scripts
├── skills/ # Claude Code skills
└── bin/ # CLI commands
observations.jsonlHigh-confidence memories (≥0.8) are automatically synced to your CLAUDE.md file at session start:
<!-- memory-sync: start -->
<!-- These sections are auto-updated from high-confidence memories -->
### Active Memories (High Confidence)
- prefer-pnpm-over-npm (0.85) — Suggest pnpm for Node.js projects
- prefer-task-based-workflow (0.90) — Use TodoWrite for complex tasks
...
<!-- memory-sync: end -->
How it works:
on-start.sh hook automatically runs ccmem sync --promoteccmem reinforce) or corrected (ccmem correct)Manual sync:
# Promote high-confidence memories to CLAUDE.md
ccmem sync --promote
# Import CLAUDE.md rules back to memories
ccmem sync --import
# Two-way sync
ccmem sync
# Install the launch agent
cp ~/.claude/memory/com.elche.memory-maintenance.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.elche.memory-maintenance.plist
# Verify it's loaded
launchctl list | grep memory-maintenance
Runs daily at midnight.
# Edit crontab
crontab -e
# Add line for daily maintenance at 2 AM
0 2 * * * ~/.claude/memory/scripts/maintenance.sh run
Run maintenance whenever convenient:
ccmem maintenance
npx claudepluginhub gaodes/ccmem --plugin ccmemPersistent memory system for Claude Code with enforced context
Persistent memory for Claude Code. Capture work across sessions and recall relevant context.
Claude Mind - Give Claude photographic memory in ONE portable file. Share, version, and transfer your Claude's brain.
Curated persistent memory for Claude Code. Write gate prevents bloat — only behavior-changing facts get saved. Tiered architecture: daily logs, structured registers, and auto-loaded working memory.
Persistent memory for Claude Code - store decisions, patterns, and context across sessions
Pure filesystem-based memory system for Claude Code with custom ontology support