Executive oversight for Claude Code context management
npx claudepluginhub patrickkidd/ccmemoryContext graph for persistent memory across Claude Code sessions
A Claude Code plugin that provides executive oversight for context management. Ensures nothing important is lost and everything learned is reused.
Claude Code forgets between sessions. You explain how something works, make a decision, correct a misunderstanding - and next session, it's gone. You end up re-explaining the same things repeatedly.
ccmemory adds an executive function that monitors every conversation, ensuring:
After every user message, the plugin prompts Claude to ask:
"Did the user just tell me something important about this project that I should remember next session?"
If yes → capture it immediately, before continuing with the task.
Information routes to the project's natural hierarchy - not a separate memory silo:
| Knowledge Type | Destination |
|---|---|
| Project conventions | CLAUDE.md |
| Subsystem behavior | doc/[topic].md or folder's CLAUDE.md |
| Decisions | decisions/log.md |
| Working context | .ccmemory/session.md |
The plugin treats project documentation as a normalized encyclopedia:
Add the marketplace and install:
claude plugin marketplace add patrickkidd/ccmemory
claude plugin install ccmemory
Then restart Claude Code. Verify with /plugins.
After the plugin is updated on GitHub:
claude plugin marketplace update ccmemory
Then restart Claude Code to pick up the changes.
Note: Script changes (.sh, .py) take effect immediately on next hook trigger. Changes to hooks, skills, or prompts require a restart.
On first session, ccmemory initializes:
your-project/
└── .ccmemory/
├── session.md # Working memory / session handoff
├── doc-index.md # Documentation inventory
├── decisions.md # Decision log (if needed)
└── insights/ # Significant realizations
| Event | Action |
|---|---|
| SessionStart | Loads previous session context |
| UserPromptSubmit | Executive oversight analyzes each message |
| Stop | Logs session, reminds to update session.md |
Corrections are the most valuable information - they tell Claude exactly where understanding is wrong.
When you correct Claude:
When starting any task, Claude:
As Claude reads context files, it watches for:
After every interaction:
"Is the project's documentation now more complete and accurate than before this conversation?"
If not, there's work to do.
ccmemory/
├── hooks/hooks.json # Hook configuration
├── prompts/analyze-message.md # Executive oversight prompt
├── scripts/
│ ├── load-memory.sh # Session start
│ ├── log-session.py # Session logging
│ └── save-memory.sh # Session end
├── skills/memory/SKILL.md # Executive oversight instructions
└── templates/ # Initial file templates
MIT