Skip to content
Skills Library
Programming · Analysis

ai-codegraph

/ai-codegraph

Semantic code intelligence via MCP: call chains, blast radius, cross-file symbol relationships. Uses CodeGraph (colbymchenry/codegraph) — a local-first Rust server that builds a SQLite knowledge graph from tree-sitter ASTs. One tool: codegraph_explore. Use when the question involves "how does X work", "what calls Y", "if I change X what breaks", or cross-file dependency analysis. Not for literal text search — use find/grep for that. Not for file discovery — use glob. Trigger for "codegraph", "code graph", "call chain", "blast radius", "what depends on", "impact analysis".

Licence
Apache-2.0
Last repository change
06.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 06.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Semantic code intelligence via MCP: call chains, blast radius, cross-file symbol relationships. Uses CodeGraph (colbymchenry/codegraph) — a local-first Rust server that builds a SQLite knowledge graph from tree-sitter ASTs. One tool: codegraph_explore. Use when the question involves "how does X work", "what calls Y", "if I change X what breaks", or cross-file dependency analysis. Not for literal text search — use find/grep for that. Not for file discovery — use glob. Trigger for "codegraph", "code graph", "call chain", "blast radius", "what depends on", "impact analysis".

Triggers from the description

how does X workwhat calls Yif I change X what breakscodegraphcode graphcall chainblast radiuswhat depends on
Original author description

Semantic code intelligence via MCP: call chains, blast radius, cross-file symbol relationships. Uses CodeGraph (colbymchenry/codegraph) — a local-first Rust server that builds a SQLite knowledge graph from tree-sitter ASTs. One tool: codegraph_explore. Use when the question involves "how does X work", "what calls Y", "if I change X what breaks", or cross-file dependency analysis. Not for literal text search — use find/grep for that. Not for file discovery — use glob. Trigger for "codegraph", "code graph", "call chain", "blast radius", "what depends on", "impact analysis".

How it works

  1. What it produces
  2. When to use CodeGraph vs find/grep
  3. Steps
  4. Per-surface MCP configuration
  5. Lifecycle
  6. Anti-patterns
  7. Source
Original SKILL.md headings · 104 lines, 557 words
SKILL.md preview
---
name: ai-codegraph
description: >-
  Semantic code intelligence via MCP: call chains, blast radius, cross-file symbol
  relationships. Uses CodeGraph (colbymchenry/codegraph) — a local-first Rust server
  that builds a SQLite knowledge graph from tree-sitter ASTs. One tool: codegraph_explore.
  Use when the question involves "how does X work", "what calls Y", "if I change X what
  breaks", or cross-file dependency analysis. Not for literal text search — use find/grep
  for that. Not for file discovery — use glob. Trigger for "codegraph", "code graph",
  "call chain", "blast radius", "what depends on", "impact analysis".
license: Apache-2.0
---

# ai-codegraph — semantic code intelligence via MCP

## What it produces

Nothing written. This skill reads the code graph and returns structured answers:
verbatim source grouped by file, call paths (including dynamic dispatch), and blast
radius summaries. The agent uses these to answer graph questions without grepping
every file.

## When to use CodeGraph vs find/grep

| Question | Tool | Why |
|----------|------|-----|
| "How does X work?" | `codegraph_explore` | Follows call chains across files |
| "What calls function Y?" | `codegraph_explore` | Graph traversal, follows polymorphism |
| "If I change this interface, what breaks?" | `codegraph_explore` | Blast radius via edge traversal |
| "What does this module depend on?" | `codegraph_explore` | Import edges in the graph |
| "Find all TODOs" | `grep` | Literal text search, faster |
| "Where is X defined?" | `find` | Simple path lookup |
| "Find all files importing X" | `grep` | Literal text match |
| "Show me the test for this function" | `find` + `grep` | Convention-based lookup |

**Rule of thumb:** graph questions → CodeGraph. Text questions → find/grep.

## Steps

1. **Check availability** — is CodeGraph installed?
   ```bash
   which codegraph && codegraph --version
   ```
   If missing: `npm i -g @colbymchenry/codegraph`

2. **Check daemon** — is the daemon running?
   ```bash
   test -S .codegraph/daemon.sock && echo "running" || echo "not running"
   ```
   If not running: `codegraph serve --mcp &`

3. **Check index** — is the project indexed?
   ```bash
   codegraph status
   ```
   If not indexed: `codegraph init`

4. **Query** — use `codegraph_explore` MCP tool:
   - `query`: natural language or symbol/file names
   - `maxFiles`: default 12, increase for broad questions

5. **Interpret results** — CodeGraph returns:
   - Verbatim source grouped by file (with line numbers)
   - Call paths (calls, imports, extends, implements)
   - Blast radius summary (what depends on the queried symbol)

## Per-surface MCP configuration

CodeGraph is an MCP server, not a governance hook. Each surface reads its own config:

| Surface | Config file | Key |
|---------|------------|-----|
| Claude Code | `~/.claude.json` (global) or `.mcp.json` (project) | `mcpServers.codegraph` |
| Cursor | `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project) | `mcpServers.codegraph` |
| Copilot VS Code | `.vscode/mcp.json` (local) or user mcp.json | `servers.codegraph` |
| Copilot CLI | `~/.copilot/mcp-config.json` | `mcpServers.codegraph` |
| opencode | `~/.config/opencode/opencode.jsonc` | `mcp.servers.codegraph` |
| OMP | Import from `~/.claude.json` or add manually | — |
| Pi | `pi-codegraph-extension` or `@isac322/pi-codegraph` | — |

**Stdio launch shape** (all surfaces):
```json
{
  "type": "stdio",
  "command": "codegraph",
  "args": ["serve", "--mcp"]
}
```

## Lifecycle

Lane: light
Writes: nothing (read-only tool server)
Read by: any agent that needs graph queries
Dies: on session end
Next: none — the agent decides when to use it based on the question type

## Anti-patterns

- Do NOT use for literal text search (`grep` is faster)
- Do NOT use for file discovery (`find`/`glob` is faster)
- Do NOT use CodeGraph AND grep for the same question — pick one
- DO remember: CodeGraph leaves 82% more context resident after multi-turn sessions
  (vendor data: 67k vs 18k tokens after 3 turns). On small repos (<300 files),
  the cost may outweigh the benefit.

## Source

- Repository: https://github.com/colbymchenry/codegraph
- License: MIT
- Stars: ~71k
- Version: 1.6.0 (measured 2026-09-22)
- Integration evidence: `.codegraph/codegraph.db` in this workspace

Source: ai-engineering (own), Apache-2.0.

Versions

The database has no other skills named ai-codegraph.

Database snapshot: 13.11.2026 · package version f321f47091a1 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90codegraph
    Pre-indexed code knowledge graph (MCP, SQLite + tree-sitter) for faster, lower-token exploration of brownfield codebases. Use when starting work on a repo larger than ~500 files or when the task involves cross-file traversal — "where is X used", "what calls Y", "what breaks if I…
  • 100graph-build
    Builds or updates the code knowledge graph via tree-sitter AST and SQLite. Use when setting up the graph before search or blast-radius analysis.
  • 100codegraph
    Pre-indexed code knowledge graph for codebase exploration, symbol navigation, call chains, and change-impact analysis. Use when exploring an unfamiliar repo, tracing callers/callees, or assessing blast radius before a change — replaces grep+Read loops with one query.
  • 90codegraph
    Use when a project has a `.codegraph/` index and you need structural code intelligence — who calls a symbol, what breaks if you change it, where a symbol is defined, or how X reaches Y — instead of grep; also when enabling codegraph in a new project, or unsure which queries are…
  • 80Navigating Codebases with CodeGraph
    Query a pre-indexed knowledge graph of a codebase (symbols, call graphs, dependencies, impact) instead of scanning files with grep/glob/Read. Use when exploring an unfamiliar codebase, tracing who calls or is called by a function, assessing the blast radius of a change, finding…
  • 90codegraph-ast-grep
    Set up, update, or diagnose CodeGraph and ast-grep so coding agents can use semantic repository scope and structural syntax evidence automatically. Use when a repository needs an idempotent CodeGraph/ast-grep installation, stable tool and index migrations, MCP reconnection,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.