querying-the-codebase-memory-graphlisted
Install: claude install-skill sblattj/agent-chandlery
## More triggers
codebase-memory (old name)
# Codebase Memory: Knowledge Graph Tools
Needs the [codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp) server connected to your client. To build or repair an index, see `indexing-a-repo-into-codebase-memory`.
Graph tools return precise structural results in ~500 tokens vs ~80K for grep.
## Quick Decision Matrix
| Question | Tool call |
|----------|----------|
| Who calls X? | `trace_path(direction="inbound")` |
| What does X call? | `trace_path(direction="outbound")` |
| Full call context | `trace_path(direction="both")` |
| Find by name pattern | `search_graph(name_pattern="...")` |
| Dead code | `search_graph(max_degree=0, exclude_entry_points=true)` |
| Cross-service edges | `query_graph` with Cypher |
| Impact of local changes | `detect_changes()` |
| Risk-classified trace | `trace_path(risk_labels=true)` |
| Text search | `search_code` or Grep |
## Exploration Workflow
1. `list_projects`: check if project is indexed
2. `get_graph_schema`: understand node/edge types
3. `search_graph(label="Function", name_pattern=".*Pattern.*")`: find code
4. `get_code_snippet(qualified_name="project.path.FuncName")`: read source
## Tracing Workflow
1. `search_graph(name_pattern=".*FuncName.*")`: discover exact name
2. `trace_path(function_name="FuncName", direction="both", depth=3)`: trace
3. `detect_changes()`: map git diff to affected symbols
## Evidence Tiers
- **Scout (Tier 1):** fast positive lookup with few gra