codebase-memory

Query a codebase knowledge graph for call tracing, dependency analysis, and dead code detection.

Updated Aug 3, 2026
One-click install
npx skills add https://github.com/Yvesdefaria/GymLab --skill codebase-memory-yvesdefaria
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-memory
Source: https://github.com/Yvesdefaria/GymLab/tree/main/gymlab-app/.agents/skills/codebase-memory
Command: npx skills add https://github.com/Yvesdefaria/GymLab --skill codebase-memory-yvesdefaria

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Exploring an unfamiliar codebase with grep and manual file reading is slow and token-expensive. This Skill provides structural answers about code—who calls a function, what a function calls, which code is dead—in roughly 500 tokens instead of 80K, using a pre-indexed knowledge graph. ## Core Features & Use Cases - Call Chain Tracing: Trace inbound, outbound, or bidirectional call paths for any function with trace_path, including risk-classified results. - 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 in both directions, check index coverage for gaps, and identify every caller that could break. ## Quick Start Ask the agent to use the codebase knowledge graph to show who calls the function you are about to modify and trace its full call chain.

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 codebase?

Use trace_path with direction set to inbound to find who calls a function, or direction both for full call context. First run search_graph with a name pattern to discover the exact function name, since trace_path requires exact names.

How to detect dead code and unused functions in a project?

Run search_graph with max_degree set to 0 and exclude_entry_points set to true to find functions with no incoming or outgoing relationships. Verify index coverage with check_index_coverage before making exhaustive dead-code claims.

What is the difference between search_graph and query_graph?

search_graph filters nodes by degree and name patterns with pagination, while query_graph runs raw Cypher for edge-level queries like HTTP_CALLS relationships. Use query_graph when you need actual edge properties rather than node filtering.

Why does trace_path return no results for my function?

trace_path requires exact function names, so run search_graph with a name pattern first to discover the precise name. Also check index coverage, since partial or stale indexing can leave gaps in the graph.

Can I analyze the impact of my uncommitted code changes?

Yes, detect_changes maps your local git diff to affected symbols in the graph. Combine it with trace_path in both directions to see which callers and callees your changes could impact.

What are the limitations of graph-based code search?

query_graph caps results at 100k rows, search_graph paginates at 50 results per page, and outbound-only tracing misses cross-service callers. Always check has_more for pagination and use direction both for complete traces.