Persistent project knowledge for Claude Code - Captures patterns, quirks, and decisions that survive session boundaries.
Claude Knowledge builds a persistent understanding of your project by capturing:
- Patterns: Approaches that work well in this codebase
- Quirks: Project-specific gotchas and unusual behaviors
- Decisions: Architectural choices with their rationale
These insights persist across sessions and context compaction, so Claude remembers what it learned even in new conversations.
# Add the marketplace (one-time)
/plugin marketplace add 0xrdan/claude-plugins
# Install the plugin
/plugin install claude-knowledge
# Restart Claude Code to activate- Work on your project as usual
- Run
/learnto extract insights from the conversation - Run
/knowledgeto view accumulated learnings
That's it! Knowledge persists automatically to the knowledge/ directory.
| Command | Description |
|---|---|
/learn |
Extract insights from current conversation |
/learn --deep |
Thorough analysis with forked context |
/learn-on |
Enable learning mode (reminder flag) |
/learn-off |
Disable learning mode |
/knowledge |
View knowledge base status |
/learn-reset |
Clear all knowledge (requires confirmation) |
When you run /learn, Claude analyzes the conversation looking for:
- Successful approaches - "This pattern worked for auth in this project"
- Unexpected behaviors - "This module behaves differently than expected"
- Decisions made - "We chose X over Y because of Z"
Each insight is categorized and saved to:
knowledge/learnings/patterns.mdknowledge/learnings/quirks.mdknowledge/learnings/decisions.md
## Quirk: Auth tokens require base64 padding
- **Discovered:** 2026-01-08
- **Location:** src/auth/tokenService.ts
- **Behavior:** JWT tokens use non-standard base64 without padding
- **Workaround:** Use the custom `decodeToken()` helper instead of atob()
- **Confidence:** highEnable learning mode as a reminder to extract insights:
/learn-on # Enable - /knowledge will remind you to run /learn
/learn-off # DisableNote: In v0.1.0, learning mode is a reminder flag only. You must still run /learn manually.
By default, knowledge is gitignored. To share with your team:
- Edit
knowledge/.gitignore - Comment out or remove
learnings/ - Commit the knowledge files
If you previously used claude-router's knowledge features:
- Your existing
knowledge/learnings/files are compatible - Simply install claude-knowledge and use the same commands
- Note: If both plugins are installed, use full command names like
claude-knowledge:learn
Recommended: Use one plugin for knowledge management:
- claude-knowledge: If you want ONLY knowledge features
- claude-router: If you want routing + knowledge (integrated)
- v0.1.0 (current): Manual extraction only -
/learnmust be called explicitly - v1.0.0 (future): Auto-trigger mechanism (hook-based or notification-based)
knowledge/
├── state.json # Learning mode state
└── learnings/
├── patterns.md # What works well
├── quirks.md # Gotchas and oddities
└── decisions.md # Choices with rationale
MIT License - see LICENSE for details.
Built for the Claude Code community | Report Issues