Kanbanzai codebase-memory-reference
install
source · Clone the upstream repo
git clone https://github.com/sambeau/kanbanzai
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/sambeau/kanbanzai "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.github/skills/codebase-memory-reference" ~/.claude/skills/sambeau-kanbanzai-codebase-memory-reference && rm -rf "$T"
manifest:
.github/skills/codebase-memory-reference/SKILL.mdsource content
Codebase Memory MCP — Tool Reference
Tools (14 total)
| Tool | Purpose |
|---|---|
| Parse and ingest repo into graph (only once — auto-sync keeps it fresh) |
| Check indexing status (ready/indexing/not found) |
| List all indexed projects with timestamps and counts |
| Remove a project from the graph |
| Structured search with filters (name, label, degree, file pattern) |
| Grep-like text search within indexed project files |
| BFS call chain traversal (exact name match required). Supports for impact classification. |
| Map git diff to affected symbols + blast radius with risk scoring |
| Cypher-like graph queries (200-row cap) |
| Node/edge counts, relationship patterns |
| Read source code by qualified name |
| Read any file from indexed project |
| List files/directories with glob filter |
| Ingest OpenTelemetry traces to validate HTTP_CALLS edges |
Edge Types
| Type | Meaning |
|---|---|
| Direct function call within same service |
| Synchronous cross-service HTTP request |
| Async dispatch (Cloud Tasks, Pub/Sub, SQS, Kafka) |
| Module/package import |
/ | Module/class defines a function/method |
| Route node handled by a function |
| Type implements an interface |
| Struct method overrides an interface method |
| Read reference (callback, variable assignment) |
| Git history change coupling |
/ / | Structural containment |
Node Labels
Project, Package, Folder, File, Module, Class, Function, Method, Interface, Enum, Type, Route
Qualified Name Format
<project>.<path_parts>.<name> — file path with / replaced by ., extension removed.
Examples:
(Go)myproject.cmd.server.main.HandleRequest
(Python)myproject.services.orders.ProcessOrder
(TypeScript)myproject.src.components.App.App
Use
search_graph to discover qualified names, then pass them to get_code_snippet.
Cypher Subset (for query_graph)
Supported:
with node labels and relationship typesMATCH- Variable-length paths:
-[:CALLS*1..3]->
withWHERE
,=
,<>
,>
,<
,>=
,<=
(regex),=~
,CONTAINSSTARTS WITH
withWHERE
,AND
,ORNOT
with property access,RETURN
,COUNT(x)DISTINCT
withORDER BY
/ASCDESCLIMIT- Edge property access:
,r.confidence
,r.url_pathr.coupling_score
Not supported:
WITH, COLLECT, SUM, CREATE/DELETE/SET, OPTIONAL MATCH, UNION
Common Cypher Patterns
# Cross-service HTTP calls with confidence MATCH (a)-[r:HTTP_CALLS]->(b) RETURN a.name, b.name, r.url_path, r.confidence LIMIT 20 # Filter by URL path MATCH (a)-[r:HTTP_CALLS]->(b) WHERE r.url_path CONTAINS '/orders' RETURN a.name, b.name # Interface implementations MATCH (s)-[r:OVERRIDE]->(i) RETURN s.name, i.name LIMIT 20 # Change coupling MATCH (a)-[r:FILE_CHANGES_WITH]->(b) WHERE r.coupling_score >= 0.5 RETURN a.name, b.name, r.coupling_score # Functions calling a specific function MATCH (f:Function)-[:CALLS]->(g:Function) WHERE g.name = 'ProcessOrder' RETURN f.name LIMIT 20
Regex-Powered Search (No Full-Text Index Needed)
search_graph and search_code support full Go regex, making full-text search indexes unnecessary. Regex patterns provide precise, composable queries that cover all common discovery scenarios:
search_graph — name_pattern / qn_pattern
| Pattern | Matches | Use case |
|---|---|---|
| names ending in Handler | Find all handlers |
| case-insensitive "auth" | Find auth-related symbols |
| any of three words | Find data-loading functions |
| names starting with on + uppercase | Find event handlers |
| Service...Impl pattern | Find service implementations |
| CRUD prefixes | Find CRUD operations |
| names ending in _test | Find test functions |
| qn_pattern for directory scoping | Scope to controllers dir |
search_code — regex=true
| Pattern | Matches | Use case |
|---|---|---|
| multi-pattern scan | Find tech debt markers |
| case-insensitive secrets | Security scan |
| Go test functions | Find test entry points |
| API version references | Find versioned API usage |
| scoped npm imports | Find package imports |
Combining Filters for Surgical Queries
# Find unused auth handlers search_graph(name_pattern="(?i).*auth.*handler.*", max_degree=0, exclude_entry_points=true) # Find high fan-out functions in the services directory search_graph(qn_pattern=".*\\.services\\..*", min_degree=10, relationship="CALLS", direction="outbound") # Find all route handlers matching a URL pattern search_code(pattern="(?i)(POST|PUT).*\\/api\\/v[0-9]\\/orders", regex=true)
Critical Pitfalls
does NOT return edges — it filters nodes by degree. Usesearch_graph(relationship="HTTP_CALLS")
with Cypher to see actual edges.query_graph
has a 200-row cap before aggregation — COUNT queries silently undercount on large codebases. Usequery_graph
withsearch_graph
/min_degree
for counting.max_degree
needs exact names — usetrace_call_path
first to discover names.search_graph(name_pattern=".*Partial.*")
misses cross-service callers — usedirection="outbound"
for full context.direction="both"
Decision Matrix
| Question | Use |
|---|---|
| Who calls X? | |
| What does X call? | |
| Full call context | |
| Find by name pattern | |
| Dead code | |
| Cross-service edges | with Cypher |
| Impact of local changes | |
| Risk-classified trace | |
| Text search | or Grep |