codebase-memory

Query a persistent knowledge graph for codebase structure, symbols, and dependencies.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/samline/forms --skill codebase-memory-samline
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-memory
Source: https://github.com/samline/forms/tree/main/.agents/skills/codebase-memory
Command: npx skills add https://github.com/samline/forms --skill codebase-memory-samline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Answering questions about a large codebase by reading files and grepping is slow and error-prone. This Skill routes every codebase question through the codebase-memory-mcp knowledge graph, which indexes symbols, routes, call relationships, and architecture so answers come from a structured source of truth instead of raw file scans. ## Core Features & Use Cases - Symbol and code search: Find functions, classes, routes, variables, and components with BM25, pattern, or semantic search via search_graph and search_code. - Dependency and impact tracing: Trace callers, callees, data flow, and cross-service paths with trace_path, or run arbitrary Cypher queries with query_graph for multi-hop analysis. - Architecture and indexing: Get high-level architecture overviews, check index status, index repositories, detect changes, and manage Architecture Decision Records. - Use Case: When asked "who calls the validate function and what breaks if it changes", consult the graph with search_graph and trace_path instead of grepping the workspace. ## Quick Start Ask the agent to find where a function is defined and trace its callers using the codebase memory graph before reading any files.

Frequently Asked Questions about codebase-memory

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

FAQPage Schema
How do I find where a function is defined in a large codebase?▼

Use search_graph with BM25, pattern, or semantic mode to locate functions, classes, routes, and variables by name. Follow up with get_code_snippet to read the exact source of the matched symbol without scanning files.

How to trace function callers and dependencies in a repository?▼

Use trace_path with the appropriate mode to follow callers, callees, data flow, or cross-service paths from a given symbol. For multi-hop patterns or aggregations, use query_graph with Cypher queries.

What should I do if the project is not indexed in the knowledge graph?▼

Check index_status or list_projects first. If the project is missing or incomplete, run index_repository once before answering any codebase questions, since the graph is the primary source of truth.

When should I fall back to reading files instead of the graph?▼

Only as a last resort, such as reading exact content of a file without indexed symbols or a recently created file not yet indexed. If the information is durable, ingest it back into the graph with ingest_traces.

Can the knowledge graph answer architecture-level questions?▼

Yes. Use get_architecture for high-level overviews of packages, services, and clusters, and get_graph_schema to inspect available node labels and edge types before writing Cypher queries.