From memory
Orchestrate knowledge capture across skills. Routes learnings to appropriate MEMORY.md files. Use when user says /memory.
How this skill is triggered — by the user, by Claude, or both
Slash command
/memory:skills/memoryThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Centralized knowledge management for the skill ecosystem. Captures learnings from development sessions and routes them to the appropriate skill's MEMORY.md file based on knowledge type.
Centralized knowledge management for the skill ecosystem. Captures learnings from development sessions and routes them to the appropriate skill's MEMORY.md file based on knowledge type.
/memory capture "learned X" - Route learning to appropriate skill/memory review [skill] - Show accumulated knowledge/memory consolidate - Deduplicate and organize| Command | Purpose | When to Use |
|---|---|---|
/memory capture "..." | Capture a learning | During/after development when something is learned |
/memory review | Review all learnings | To refresh knowledge before starting work |
/memory review <skill> | Review skill-specific learnings | Before using a specific skill |
/memory consolidate | Clean up and organize | Periodically, or when memory feels cluttered |
Knowledge is routed based on its type:
Domain-specific knowledge about how to do things.
| Skill | Content Types |
|---|---|
bugfix | Debugging patterns, root cause analysis techniques |
tdd | Test patterns, TDD workflow refinements |
arch | Architecture decisions, layer boundary learnings |
code | Code style patterns, language idioms |
debugger | Production debugging, log analysis techniques |
Workflow knowledge about when and in what order to do things.
| Skill | Content Types |
|---|---|
developer | Development workflow orchestration |
task | Task management and prioritization |
workflow | Multi-skill coordination patterns |
Capture a learning and route it to the appropriate skill's MEMORY.md.
/memory capture "Always run tests before commit"
The skill analyzes your learning to determine where it belongs:
Is this about HOW to do something?
├── Yes → Sub-skill memory
│ ├── Debugging → bugfix
│ ├── Testing → tdd
│ ├── Architecture → arch
│ ├── Code style → code
│ └── Production → debugger
└── No → Is this about WHEN/ORDER?
├── Yes → Orchestrator memory
│ ├── Development process → developer
│ ├── Task organization → task
│ └── Skill coordination → workflow
└── Unclear → Ask user to clarify
Sub-skill indicators:
Orchestrator indicators:
| Learning | Scope | Target |
|---|---|---|
| "Use vi.fn() for mocking in vitest" | HOW | tdd |
| "Run /arch check before implementation" | WHEN | developer |
| "Mock at boundaries, not internals" | HOW | tdd |
| "Debug async by logging promise chain" | HOW | bugfix |
| "Always do TDD before writing handlers" | WHEN | developer |
If the learning could apply to multiple skills, the memory skill will ask:
This learning could apply to:
- code (style enforcement)
- arch (layer boundary rule)
Which scope is most appropriate?
Review accumulated knowledge, either all or for a specific skill.
# Review all knowledge
/memory review
# Review specific skill
/memory review tdd
## TDD Learnings
### Patterns (3)
- Use describe blocks for logical grouping...
- Mock at boundaries, not internal functions...
- Always test edge cases: null, empty, boundary values
### Gotchas (2)
- Vitest requires explicit reset between tests...
- Don't mock what you don't own...
### Best Practices (1)
- Test behavior, not implementation...
Deduplicate and organize learnings across all MEMORY.md files.
/memory consolidate
Scanning 8 MEMORY.md files...
Found:
- 23 total entries
- 3 exact duplicates
- 5 near-duplicates (similar content)
Proposed changes:
- Merge 2 entries in tdd/MEMORY.md (same concept, different wording)
- Remove 1 duplicate in bugfix/MEMORY.md
- Recategorize 2 entries in developer/MEMORY.md (workflow -> pattern)
Apply changes? [Y/n]
Entries are stored in a consistent format:
## 2024-01-26 - pattern
**Context**: Debugging async race conditions in test suite
**Learning**: Always log the promise chain order first before adding
breakpoints. The execution order is often not what you expect.
**Tags**: #debugging #async #testing
---
| Category | Description |
|---|---|
pattern | Reusable approach that works |
gotcha | Edge case or pitfall to avoid |
best_practice | Recommended approach |
anti_pattern | What NOT to do |
workflow | Process/sequencing knowledge |
tool | Tool-specific knowledge |
project | Project-specific (not universal) |
Bad: "Remember to test edge cases"
Good: "When testing date parsing, always include: empty string, null,
invalid format, timezone edge cases (midnight, DST transitions)"
Bad: "Use retry logic"
Good: "When calling external APIs in handlers, use retry with exponential
backoff (3 attempts, 100ms base) - learned from production timeout
issues in payment service"
#project - Project-specific (won't apply elsewhere)#universal - General pattern (applies broadly)#language:go - Language-specific#tool:vitest - Tool-specific| Don't | Why | Do Instead |
|---|---|---|
| Capture without routing | Becomes unsearchable | Let memory skill route appropriately |
| Add duplicates | Clutters memory | Run /memory consolidate periodically |
| Vague learnings | Not actionable later | Include specific context and examples |
| Wrong scope | Won't be found | HOW = sub-skill, WHEN = orchestrator |
The memory skill works with all other skills. Each skill can have its own MEMORY.md file:
.claude/skills/
├── bugfix/
│ ├── SKILL.md
│ ├── skill.yaml
│ └── MEMORY.md <- Debugging knowledge
├── tdd/
│ ├── SKILL.md
│ ├── skill.yaml
│ └── MEMORY.md <- Testing knowledge
├── developer/
│ ├── SKILL.md
│ ├── skill.yaml
│ └── MEMORY.md <- Workflow knowledge
└── memory/
├── SKILL.md
└── skill.yaml <- This skill (routes to others)
User: /memory capture "When using vitest, always call vi.clearAllMocks()
in beforeEach to avoid test pollution"
Memory: Analyzing learning...
- Topic: Testing/mocking
- Scope: HOW to handle mocks correctly
- Tool: vitest
Routing to: tdd/MEMORY.md
Category: gotcha
Added entry:
## 2024-01-26 - gotcha
**Context**: Vitest mock behavior between tests
**Learning**: Always call vi.clearAllMocks() in beforeEach
to avoid test pollution. Mock state persists between tests
by default.
**Tags**: #vitest #mocking #testing #universal
---
User: /memory review tdd
Memory: ## TDD Learnings (4 entries)
### Gotchas (2)
- vi.clearAllMocks() in beforeEach...
- Mock timers need vi.useRealTimers() cleanup...
### Patterns (2)
- Use describe blocks to group related tests...
- Mock at boundaries (API clients, not internal)...
npx claudepluginhub dohernandez/claude-skills --plugin memoryCaptures patterns, decisions, gotchas, procedures, and feature knowledge from conversations into durable skills for on-demand reuse. Invoked via /learn or 'please remember'.
Captures high/medium/low confidence patterns from conversations to prevent repeating mistakes and preserve successes. Invoke proactively after corrections, praise, edge cases, or skill-heavy sessions.
Persists learnings into a 5-layer memory hierarchy (CLAUDE.md files, memory/MEMORY.md) and consolidates by pruning outdated entries and promoting recurring patterns. Triggers on 'extract learnings', 'remember', 'dream'.