"Read-side memory operations: search, recall, load, sync, history, visualize. Use when searching past decisions, loading session context, or viewing the knowledge graph."
Resources
2Install
npx skillscat add yonatangross/orchestkit/memory Install via the SkillsCat registry.
Memory - Read & Access Operations
Unified read-side memory skill with subcommands for searching, loading, syncing, history, and visualization.
Usage
/ork:memory search <query> # Search knowledge graph
/ork:memory load # Load context at session start
/ork:memory history # View decision timeline
/ork:memory viz # Visualize knowledge graph
/ork:memory status # Show memory system healthCRITICAL: Use AskUserQuestion When No Subcommand
If invoked without a subcommand, ask the user what they want:
AskUserQuestion(
questions=[{
"question": "What memory operation do you need?",
"header": "Operation",
"options": [
{"label": "search", "description": "Search decisions and patterns in knowledge graph"},
{"label": "load", "description": "Load relevant context for this session"},
{"label": "history", "description": "View decision timeline"},
{"label": "viz", "description": "Visualize knowledge graph as Mermaid"},
{"label": "status", "description": "Check memory system health"}
],
"multiSelect": false
}]
)Subcommands
search - Search Knowledge Graph
Search past decisions, patterns, and entities from the knowledge graph.
Usage:
/ork:memory search <query> # Search knowledge graph
/ork:memory search --category <cat> <query> # Filter by category
/ork:memory search --limit <n> <query> # Limit results (default: 10)
/ork:memory search --agent <agent-id> <query> # Filter by agent scope
/ork:memory search --global <query> # Search cross-project best practicesFlags:
| Flag | Behavior |
|---|---|
| (default) | Search graph |
--limit <n> |
Max results (default: 10) |
--category <cat> |
Filter by category |
--agent <agent-id> |
Filter results to a specific agent's memories |
--global |
Search cross-project best practices |
Context-Aware Result Limits:
Result limits automatically adjust based on context_window.used_percentage:
| Context Usage | Default Limit | Behavior |
|---|---|---|
| 0-70% | 10 results | Full results with details |
| 70-85% | 5 results | Reduced, summarized results |
| >85% | 3 results | Minimal with "more available" hint |
Search Workflow:
- Parse flags (--category, --limit, --agent, --global)
- Build filters from flags:
Check for --category <cat> flag → metadata.category: "<cat>" Check for --agent <agent-id> flag → agent_id: "ork:{agent-id}" Check for --global flag → user_id: "orchestkit-global-best-practices" - Search knowledge graph via
mcp__memory__search_nodes:{ "query": "user's search query" }
Entity Types to Look For:
Technology: Tools, frameworks, databases (pgvector, PostgreSQL, React)Agent: OrchestKit agents (database-engineer, backend-system-architect)Pattern: Named patterns (cursor-pagination, connection-pooling)Decision: Architectural decisionsProject: Project-specific contextAntiPattern: Failed patterns
Result Formats:
Found {count} results matching "{query}":
[GRAPH] {entity_name} ({entity_type})
-> {relation1} -> {target1}
Observations: {observation1}, {observation2}No results:
No results found matching "{query}"
Try:
- Broader search terms
- /ork:remember to store new decisions
- --global flag to search cross-project best practicesload - Load Session Context
Auto-load relevant memories at session start from knowledge graph.
Usage:
/ork:memory load # Load all relevant context
/ork:memory load --project # Project-specific only
/ork:memory load --global # Include global best practicesWhat it loads:
- Recent decisions from
.claude/memory/decisions.jsonl - Active project context
- Agent-specific memories (if in agent context)
- Global best practices (if --global)
history - Decision Timeline
Visualize architecture decisions over time, tracking evolution and rationale.
Usage:
/ork:memory history # Show recent decisions
/ork:memory history --category <cat> # Filter by category
/ork:memory history --since 7d # Last 7 days
/ork:memory history --mermaid # Output as Mermaid timelineOutput formats:
- Table view (default)
- Mermaid timeline diagram (--mermaid)
- JSON (--json)
viz - Knowledge Graph Visualization
Render the local knowledge graph as a Mermaid diagram.
Usage:
/ork:memory viz # Full graph
/ork:memory viz --entity <name> # Focus on specific entity
/ork:memory viz --depth 2 # Limit relationship depth
/ork:memory viz --type <type> # Filter by entity typeEntity types:
- Technology, Agent, Pattern, Decision, Project, AntiPattern, Constraint, Preference
Relation types:
- USES, RECOMMENDS, REQUIRES, ENABLES, PREFERS, CHOSE_OVER, USED_FOR, CONFLICTS_WITH
status - Memory Health Check
Show memory system status and health.
Usage:
/ork:memory statusOutput:
Memory System Status:
Graph Memory: healthy (42 decisions, 0 corrupt)
Queue Depth: 3 pendingWorkflow
1. Parse Subcommand
Extract first argument as subcommand
If no subcommand -> AskUserQuestion
Validate subcommand is one of: search, load, history, viz, status
Parse remaining flags2. Execute Subcommand
Route to appropriate handler based on subcommand.
3. Report Results
Format output appropriate to the operation.
Related Skills
ork:remember- Store decisions and patterns (write-side)
Permission-Free File Operations
When updating .claude/memory/MEMORY.md or project memory files, prefer Edit over Write to preserve existing content and avoid accidental overwrites:
Recommended Pattern
- Read —
Read(file_path)to get current content - Verify anchor — Confirm section header exists:
## Recent Decisions,## Patterns,## Preferences - Edit —
Edit(file_path, old_string=anchor_line, new_string=anchor_line + "\n" + new_content) - Verify —
Read(file_path)to confirm edit applied correctly
Why Edit Over Write
| Approach | Risk | Permission |
|---|---|---|
| Write (overwrite) | Loses existing content if template incomplete | Requires approval |
| Edit (surgical) | Only modifies target section | Often auto-approved |
Anchor Lines for MEMORY.md
Stable anchors that persist across sessions:
## Recent Decisions— for project decisions## Patterns— for recurring code patterns## Preferences— for user preferences## Detailed Notes— for topic file links
Note: The
memory-writer.tshook uses Node.jswriteFileSync— this is correct for hooks context where full file control is needed. The Edit pattern above is for agent-side SKILL.md operations.
CC 2.1.31 Session Resume Hints
At session end, Claude shows resume hints. To maximize resume effectiveness:
Capture Context Before Ending
# Store key decisions and context
/ork:remember Key decisions for next session:
- Decision 1: [brief]
- Decision 2: [brief]
- Next steps: [what remains]Resume Patterns
# For PR work: Use --from-pr (CC 2.1.27)
/ork:create-pr
# Later: claude --from-pr 123
# For issue fixing: Use memory load
/ork:fix-issue 456
# Later: /ork:memory load # Reloads investigation context
# For implementation: Use memory search
/ork:implement user-auth
# Later: /ork:memory search "user-auth implementation"Best Practice
Always store investigation findings before session end:
/ork:remember Session summary for {task}:
Completed: [what was done]
Findings: [key discoveries]
Next steps: [what remains]
Blockers: [if any]Error Handling
- If graph empty for viz: Show helpful message about using /ork:remember
- If subcommand invalid: Show usage help
- If memory files corrupt: Report and offer repair
- If search query empty: Show recent entities instead
- If no search results: Suggest alternatives