Visualize local knowledge graph as a Mermaid diagram with 8 entity types and 8 relation types from the decisions memory store.
View on GitHubyonatangross/orchestkit
ork-memory-graph
February 2, 2026
Select agents to install to:
npx add-skill https://github.com/yonatangross/orchestkit/blob/main/plugins/ork-memory-graph/skills/graph-viz/SKILL.md -a claude-code --skill graph-vizInstallation paths:
.claude/skills/graph-viz/# Graph Visualization
Render the local knowledge graph as a Mermaid diagram from `.claude/memory/decisions.jsonl`.
Supports the full OrchestKit visualization system with **8 entity types** and **8 relation types** (GH #246).
## Usage
```bash
/ork:graph-viz # Full graph
/ork:graph-viz --category api # Filter by category
/ork:graph-viz --recent 10 # Last 10 decisions
/ork:graph-viz --limit 30 # Cap at 30 entities
/ork:graph-viz --type Technology # Show only Technology entities
/ork:graph-viz --relation CHOSE # Show only CHOSE relations
/ork:graph-viz --layout LR # Left-to-right layout (default: TD)
```
## Workflow
### 1. Read Decisions
Read `.claude/memory/decisions.jsonl` (one JSON object per line). Each record has:
```jsonc
{
"type": "decision | preference | pattern | problem-solution | workflow",
"content": {
"what": "The decision text",
"why": "Rationale",
"alternatives": ["Option B", "Option C"] // rejected alternatives
},
"entities": ["PostgreSQL", "cursor-pagination"],
"metadata": {
"category": "database",
"timestamp": "2025-01-15T10:30:00Z",
"confidence": 0.9,
"source": "session-abc"
}
}
```
### 2. Apply Filters
Parse flags from the user prompt:
| Flag | Description | Example |
|------|-------------|---------|
| `--category <cat>` | Keep records where `metadata.category` matches | `--category api` |
| `--recent <N>` | Keep only the last N records by timestamp | `--recent 10` |
| `--limit <N>` | Cap total entities shown (default: 50) | `--limit 30` |
| `--type <T>` | Show only entities of this type | `--type Technology` |
| `--relation <R>` | Show only edges of this relation type | `--relation CHOSE` |
| `--layout <dir>` | Diagram direction: `TD` (top-down) or `LR` (left-right) | `--layout LR` |
### 3. Extract Entities and Relations
From each decision record, extract the 8 entity types and 8 relation types defined in the