Memory Graph Skill
This skill teaches you how to create, update, search, and prune a persistent knowledge graph using the Model Context Protocol (MCP) Memory server.
When connected, Memory tools appear as MCP tools named like mcp__memory__<tool>. Use these tools proactively whenever you identify durable facts, entities, or relationships you want to persist across sessions.
See operations.md for exact tool I/O shapes and playbooks.md for common patterns and routing rules.
When To Use
- New durable facts emerge (requirements, decisions, owners, IDs, endpoints)
- You meet a new entity (person, team, service, repository, dataset)
- You discover relationships ("Service A depends on Service B", "Alice owns Repo X")
- You want to reference prior sessions or quickly search memory
- You need to prune or correct stale memory
Golden Rules
- Prefer small, well-typed entities over long notes
- Record relationships in active voice:
relationType describes how from relates to to
- Add observations as atomic strings; include dates or sources when helpful
- Before creating, search existing nodes to avoid duplicates
- When correcting, prefer
delete_observations then add_observations over overwriting
Auto Triggers
- UserPromptSubmit adds a Memory Graph activation block when durable facts or explicit memory intents are detected. Disable with
LAZYDEV_DISABLE_MEMORY_SKILL=1.
- PostToolUse emits lightweight suggestions when tool results include durable facts. Disable with
LAZYDEV_DISABLE_MEMORY_SUGGEST=1.
Tooling Summary (server "memory")
create_entities, add_observations, create_relations
delete_entities, delete_observations, delete_relations
read_graph, search_nodes, open_nodes
Always call tools with the fully-qualified MCP name, for example: mcp__memory__create_entities.
Minimal Flow
mcp__memory__search_nodes for likely duplicates
mcp__memory__create_entities as needed
mcp__memory__add_observations with concise facts
mcp__memory__create_relations to wire the graph
- Optional:
mcp__memory__open_nodes to verify saved nodes
Error Handling
- If create fails due to existing name, switch to
add_observations
- If
add_observations fails (unknown entity), retry with create_entities
- All delete tools are safe on missing targets (no-op)
Examples
See examples.md for end-to-end examples covering projects, APIs, and people.
1---2name: memory-graph3description: Persistent memory graph skill using the MCP Memory server4---5
6# Memory Graph Skill
7
8This skill teaches you how to create, update, search, and prune a persistent knowledge graph using the Model Context Protocol (MCP) Memory server.
9
10When connected, Memory tools appear as MCP tools named like `mcp__memory__<tool>`. Use these tools proactively whenever you identify durable facts, entities, or relationships you want to persist across sessions.
11
12See `operations.md` for exact tool I/O shapes and `playbooks.md` for common patterns and routing rules.
13
14## When To Use
15- New durable facts emerge (requirements, decisions, owners, IDs, endpoints)
16- You meet a new entity (person, team, service, repository, dataset)
17- You discover relationships ("Service A depends on Service B", "Alice owns Repo X")
18- You want to reference prior sessions or quickly search memory
19- You need to prune or correct stale memory
20
21## Golden Rules
22- Prefer small, well-typed entities over long notes
23- Record relationships in active voice: `relationType` describes how `from` relates to `to`
24- Add observations as atomic strings; include dates or sources when helpful
25- Before creating, search existing nodes to avoid duplicates
26- When correcting, prefer `delete_observations` then `add_observations` over overwriting
27
28## Auto Triggers
29- UserPromptSubmit adds a Memory Graph activation block when durable facts or explicit memory intents are detected. Disable with `LAZYDEV_DISABLE_MEMORY_SKILL=1`.
30- PostToolUse emits lightweight suggestions when tool results include durable facts. Disable with `LAZYDEV_DISABLE_MEMORY_SUGGEST=1`.
31
32## Tooling Summary (server "memory")
33- `create_entities`, `add_observations`, `create_relations`
34- `delete_entities`, `delete_observations`, `delete_relations`
35- `read_graph`, `search_nodes`, `open_nodes`
36
37Always call tools with the fully-qualified MCP name, for example: `mcp__memory__create_entities`.
38
39## Minimal Flow
401) `mcp__memory__search_nodes` for likely duplicates
412) `mcp__memory__create_entities` as needed
423) `mcp__memory__add_observations` with concise facts
434) `mcp__memory__create_relations` to wire the graph
445) Optional: `mcp__memory__open_nodes` to verify saved nodes
45
46## Error Handling
47- If create fails due to existing name, switch to `add_observations`
48- If `add_observations` fails (unknown entity), retry with `create_entities`
49- All delete tools are safe on missing targets (no-op)
50
51## Examples
52See `examples.md` for end-to-end examples covering projects, APIs, and people.