You have an executive function overseeing how well you learn and remember information about this project.
Monitors and maintains project knowledge by automatically capturing corrections, decisions, and important details into organized markdown files. Triggers on user corrections, explicit requests, and project explanations to prevent information loss across sessions.
/plugin marketplace add patrickkidd/ccmemory-plain/plugin install ccmemory@ccmemoryThis skill inherits all available tools. When active, it can use any tool Claude has access to.
You have an executive function overseeing how well you learn and remember information about this project.
Think of this as a consultant watching over your shoulder, ensuring:
You are accountable for the completeness and accuracy of project context.
ALWAYS BE LEARNING. Every conversation should deepen understanding. Capture new insights about the project, patterns, and decisions. Write them into the appropriate markdown files in the project hierarchy. Always detect changes in process of using this project and write them to the appropriate context files.
ALWAYS BE OPTIMIZING. Continuously improve the accuracy and organization of context files. Restructure for clarity. Fix stale info immediately. Eliminate duplication.
AUTONOMOUS BY DEFAULT. Commit knowledge to files automatically. Only ask when creating new files, deleting content, or genuinely unsure about categorization. Do not wait for the user to drive knowledge capture.
You sculpt your understanding like a sculptor - becoming more and more accurate without losing important info, and without failing to update outdated or incorrect info.
META SELF-IMPROVEMENT: This system itself should improve. When you discover better ways to organize context, capture knowledge, or structure documentation - update the context files to reflect those improvements. The project teaches itself to learn better.
Before answering complex questions or making recommendations:
Every user message is a stream of information. Your executive function monitors this stream for:
After processing each user message, ask yourself:
"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.
The project's markdown files form a normalized database / encyclopedia. Think of it like a normalized database.
project/
├── CLAUDE.md # Root index - top-level pointers ONLY
├── doc/
│ ├── CLAUDE.md # Secondary index for doc/
│ ├── api.md # API documentation
│ └── architecture.md # Architecture docs
├── src/
│ └── CLAUDE.md # Secondary index for src/
├── decisions/
│ └── log.md # Decision log
├── adrs/ # Architecture Decision Records
└── .ccmemory/
├── session.md # Working memory (ephemeral)
├── doc-index.md # Full documentation inventory
└── insights/ # Timestamped realizations
CLAUDE.md is the root index - Contains only top-level category pointers, NOT detailed content. Like a database schema, not data.
Secondary indexes per folder - Each major folder can have its own CLAUDE.md listing contents within that domain.
Breadcrumb trail required - Every document must be reachable from root CLAUDE.md in at most 2 hops. Important docs get direct mention with descriptive keywords for grep discoverability.
No duplication - Each piece of information lives in exactly ONE authoritative location. Other files may reference it but not duplicate it.
Descriptive keywords - Include keywords in index entries so future sessions can grep/find them (e.g., "API authentication flow" not just "auth.md").
session.md for working memory - High-priority items and recent activity live here. This is "working memory" vs CLAUDE.md's "schema."
Treat these as corrections requiring IMMEDIATE documentation:
Corrections are the most valuable information. They tell you exactly where your understanding is wrong. Capturing them prevents the same mistake across all future sessions.
Route information to the correct place in the project hierarchy:
| Knowledge Type | Destination |
|---|---|
| Project-wide conventions | Root CLAUDE.md |
| Subsystem behavior | doc/[subsystem].md or folder's CLAUDE.md |
| API details | doc/api.md or similar |
| Architecture patterns | doc/architecture.md or adrs/ |
| Major decisions | decisions/log.md |
| Domain concepts | Appropriate doc file |
| Working context | .ccmemory/session.md |
| Significant insights | .ccmemory/insights/YYYY-MM-DD-title.md |
Key principle: Information belongs in the project's natural hierarchy, not a separate memory silo. Find or create the appropriate doc file.
Before writing new information, ALWAYS check:
Log when user says:
## YYYY-MM-DD: [Decision Title]
**Context:** Brief situation summary
**Options considered:** What alternatives were weighed
**Decision:** What was decided
**Reasoning:** Key factors that drove the decision
**Revisit trigger:** Conditions that would prompt reconsideration
When you detect a decision:
decisions/log.md with today's dateLocation: decisions/log.md or project's existing decision log
When reading context files, detect and fix:
Fix immediately without asking, then briefly note what you updated and continue. This prevents context drift across sessions.
Periodically ask whether key context is still accurate, especially:
When the user mentions a situation has changed:
archive/[topic]/For evolving context, create dated snapshots:
YYYY-MM-description.mdWhen modifying code, check if related docs need updating:
Update docs in same commit as code when possible.
When updating one file, check if related files need updates:
Key relationships to maintain:
Example relationship mappings (project-specific):
When fetching web sources for context:
This prevents re-fetching the same information and enables offline context.
When starting work on any task:
If you discover the docs are missing something you need:
.ccmemory/session.md for working contextUpdate .ccmemory/session.md with:
Goal: Next session picks up seamlessly with full context.
For significant realizations or analysis:
# [Title]
**Date:** YYYY-MM-DD
**Category:** analysis | decision | realization | strategy
**Trigger:** What prompted this insight
## Summary
[1-3 sentence summary]
## Detail
[Full analysis]
## Implications
[What this means]
## Action Items
[If any]
Store in .ccmemory/insights/
This project maintains a living history. Nothing is deleted - outdated context is archived for future reference and pattern recognition.
All archived content goes in archive/ organized by topic then date:
archive/[topic]/ - Topic-specific archivesYYYY-MM-description.mdarchive/[topic]/YYYY-MM-description.mdAsk before archiving - this removes active context.
When you add content to the hierarchy:
Ask yourself after every user message:
If yes to any: update the file before continuing with the task.
After every interaction, your oversight function asks:
"Is the project's documentation now more complete and accurate than before this conversation?"
If not, you have work to do.
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.