← ClaudeAtlas

graphlisted

explore relationships in the lore knowledge graph - cooccurring files, project sessions, sibling sessions, tagged notes
anipotts/claude-code-tips · ★ 25 · AI & Automation · score 77
Install: claude install-skill anipotts/claude-code-tips
<!-- tested with: claude code v2.1.122 --> When the user runs `/lore:graph`, surface relationships derived from their session history. Unlike `/lore` (which is a dashboard / freeform query) this skill is *graph-shaped*: nodes are sessions, files, projects, tools, and notes; edges are cooccurrence, parent-child, and tags. ## locate the database `````bash DB="$HOME/.claude/lore/lore.db" [ -f "$DB" ] || DB="$HOME/.claude/mine.db" if [ ! -f "$DB" ]; then echo "no lore.db -- run /lore once to seed it"; exit 0; fi ````` If the database doesn't exist, tell the user to run `/lore` once (which auto-backfills) and stop. ## intents | user phrasing | edge type | query | |---|---|---| | "what files appear with X", "what cooccurs with X", "neighbors of X" | file cooccurrence | see `cooccurrence` below | | "show project graph for X", "files in project X" | project → files | see `project_files` below | | "sibling sessions to X", "what came before/after X" | session sequencing | see `siblings` below | | "notes about X", "tagged X" | notes | call `notes.py search "X"` or `notes.py list --tag X` | | "graph for this file" (no args, in a file) | cooccurrence on cwd file | resolve the active file path, then `cooccurrence` | | "summary", no args | global graph stats | see `summary` below | ## queries All queries use parameterized SQL via a small Python heredoc. This matches the convention used in `notes.py` and `/lore:export` -- no shell-string interpolation into SQL, so paths/projects with