codebase-memory

Query a codebase knowledge graph for structural code analysis and call tracing.

1|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Chia1104/agent-air --skill codebase-memory-chia1104
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-memory
Source: https://github.com/Chia1104/agent-air/tree/main/skills/claude/codebase-memory
Command: npx skills add https://github.com/Chia1104/agent-air --skill codebase-memory-chia1104

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Exploring large codebases with grep and manual reading is slow and token-expensive. This Skill uses a pre-indexed knowledge graph to answer structural questions—who calls a function, what a function calls, which code is dead—in roughly 500 tokens instead of tens of thousands. ## Core Features & Use Cases - Call Tracing: Trace inbound, outbound, or bidirectional call chains with trace_path, including risk-classified traces. - Structural Search: Find functions by name pattern, degree, or relationship type with search_graph, and run raw Cypher queries via query_graph for cross-service edges. - Quality Analysis: Detect dead code, high fan-out/fan-in functions, and refactor candidates using degree filters. - Use Case: Before refactoring a shared handler, run search_graph to find its exact name, then trace_path(direction="both", depth=3) to map every caller and callee, and detect_changes() to see how your git diff affects indexed symbols. ## Quick Start Ask the agent to trace who calls a specific function in the indexed codebase using the knowledge graph tools.

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="inbound" and the exact function name to list callers. If you only know part of the name, run search_graph with a name_pattern first to discover the exact symbol before tracing.

How to detect dead code with a code knowledge graph?▼

Run search_graph with max_degree=0 and exclude_entry_points=true. This returns functions with no incoming or outgoing call edges that are not entry points, which are strong dead code candidates.

Knowledge graph vs grep for codebase exploration?▼

Graph queries return precise structural results in about 500 tokens versus roughly 80K tokens for grep-based reading. Use the graph for call relationships and dependencies; use search_code or Grep only for plain text search.

Why does search_graph with HTTP_CALLS relationship return no edges?▼

search_graph filters nodes by degree rather than returning edge lists, so relationship filters can be misleading. Use query_graph with an explicit Cypher MATCH on the HTTP_CALLS edge type to see actual cross-service edges.

What are the limitations of Cypher queries against the code graph?▼

query_graph caps results at 200 rows, so it is unsuitable for counting or exhaustive scans. Use search_graph with degree filters for aggregate analysis, and paginate with offset when has_more is true.