Agent skill
memory-management
Use when saving or retrieving important patterns, decisions, and learnings across sessions. Triggers on keywords like "remember", "save pattern", "recall", "memory", "persist", "knowledge base", "learnings".
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/memory-management-duc01226-easyplatform
SKILL.md
Memory Management & Knowledge Persistence
Build and maintain a knowledge graph of patterns, decisions, and learnings across sessions.
This is the SSOT for MCP memory operations. Other skills should reference this.
Entity Types
| Entity Type | Purpose | Examples |
|---|---|---|
Pattern |
Recurring code patterns | CQRS, Validation, Repository |
Decision |
Architectural/design decisions | Why we chose X over Y |
BugFix |
Bug solutions for future reference | Race condition fixes |
ServiceBoundary |
Service ownership | TextSnippet owns Snippets |
SessionSummary |
End-of-session progress | Task progress, next steps |
Dependency |
Cross-service dependencies | TextSnippet depends on Accounts |
AntiPattern |
Patterns to avoid | Don't call side effects in cmd |
Quick Operations
| Operation | Command |
|---|---|
| Create entity | mcp__memory__create_entities([...]) |
| Create relation | mcp__memory__create_relations([...]) |
| Add observations | mcp__memory__add_observations([...]) |
| Search | mcp__memory__search_nodes({ query }) |
| Open by name | mcp__memory__open_nodes({ names }) |
| Read all | mcp__memory__read_graph() |
| Delete entity | mcp__memory__delete_entities({ entityNames }) |
| Delete observations | mcp__memory__delete_observations([...]) |
| Delete relation | mcp__memory__delete_relations([...]) |
For detailed examples and templates, see references/memory-operations.md.
When to Save
Always Save
- Discovered patterns not in documentation
- Complex bug solutions
- Service boundary ownership
- Architectural decisions with rationale
- Anti-patterns encountered
Save at Session End
Create SessionSummary entity with: Task, Completed, Remaining, Key Files, Discoveries, Next Steps.
Session Workflow
Session Start
- Search for related context:
search_nodes({ query: 'task keywords' }) - Load relevant entities:
open_nodes({ names: [...] }) - Check incomplete sessions:
search_nodes({ query: 'SessionSummary Remaining' })
During Work
- Save discoveries as
Patternentities - Save architectural choices as
Decisionentities - Save bugs as
BugFixentities
Session End
- Create
SessionSummarywith progress snapshot - Update existing entities with new observations
Importance Scoring
| Score | Criteria |
|---|---|
| 10 | Critical bug fixes, security issues |
| 8-9 | Architectural decisions, service boundaries |
| 6-7 | Code patterns, best practices |
| 4-5 | Session summaries, progress notes |
| 1-3 | Temporary notes, exploration results |
Maintenance
- Consolidation: Merge fragmented observations into comprehensive ones
- Cleanup: Delete session summaries older than 30 days
- Pruning: Remove outdated patterns no longer relevant
See references/memory-operations.md for operation details and templates.
IMPORTANT Task Planning Notes
- Always plan and break many small todo tasks
- Always add a final review todo task to review the works done at the end to find any fix or enhancement needed
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?