codebase-memory

Query a codebase knowledge graph to trace calls, find dead code, and analyze dependencies.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/ByronWilliamsCPA/plugin --skill codebase-memory-byronwilliamscpa
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-memory
Source: https://github.com/ByronWilliamsCPA/plugin/tree/main/plugins/wff-code/skills/codebase-memory
Command: npx skills add https://github.com/ByronWilliamsCPA/plugin --skill codebase-memory-byronwilliamscpa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Exploring large codebases with grep and file reading is slow and token-expensive. This Skill uses a pre-indexed knowledge graph to answer structural questions—who calls a function, what it calls, which code is dead—in roughly 500 tokens instead of 80K. ## Core Features & Use Cases - Call Tracing: Trace inbound, outbound, or bidirectional call chains for any function with trace_path, including risk-classified traces. - Structural Search: Find functions by name pattern, detect dead code (zero-degree nodes), and identify high fan-in/fan-out refactor candidates with search_graph. - Impact Analysis: Map local git diffs to affected symbols with detect_changes, and run custom Cypher queries via query_graph for cross-service edge analysis. - Use Case: Before refactoring a shared utility function, trace its full call context across services to see every caller, then run a dead-code audit to find unused functions safe to delete. ## Quick Start Ask the AI to trace who calls a specific function and show its dependencies using the codebase knowledge graph.

Frequently Asked Questions about codebase-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find all callers of a function in a large codebase?▼

Use trace_path with direction set to inbound to find all callers of a function. First run search_graph with a name pattern to get the exact function name, since trace_path requires exact names to work correctly.

How to detect dead code and unused functions automatically?▼

Run search_graph with max_degree set to 0 and exclude_entry_points set to true. This returns functions with no incoming or outgoing call edges, excluding entry points like main handlers that legitimately have no callers.

What is the difference between search_graph and query_graph?▼

search_graph filters nodes by name patterns and degree constraints, while query_graph runs raw Cypher queries to inspect actual edges like HTTP_CALLS. Note that query_graph caps results at 200 rows, so use search_graph for counting.

Does codebase-memory work without the MCP server installed?▼

No, the codebase-memory-mcp binary must be installed and configured in ~/.claude/.mcp.json before any graph query works. If it is missing, run codebase-memory-mcp install or fall back to Grep and Glob for discovery.

Why does trace_path miss cross-service callers?▼

The outbound direction only follows calls made by the function and misses inbound cross-service edges. Use direction set to both to capture callers and callees across service boundaries in a single trace.