ai-codegraph
Skill65 starsChanged 2 months agoApache-2.0View on GitHub
Uses local CodeGraph MCP for symbol relationships, call chains, and blast radius. Trigger: "how does X work", "what calls Y", "what depends on", or "what breaks if changed". Not for text search (rg) or file discovery (glob).
- Installs packages
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- a11y-auditSkill
- ai-adversarial-loopSkill
- ai-agents-mdSkill
- ai-architectSkill
- ai-audit-codeSkill
- ai-audit-designSkill
- ai-audit-docsSkill
- ai-brainstormSkill
- ai-config-to-projectSkill
- ai-debugSkill
- ai-design-md-plannerSkill
- ai-exploreSkill
- ai-git-cleanupSkill
- ai-issue-reportSkill
- ai-noteSkill
- ai-orchestratorSkill
- ai-prototypeSkill
- ai-prSkill
- ai-read-docsSkill
- ai-researchSkill
- ai-review-uiSkill
- ai-securitySkill
- ai-stress-testSkill
- ai-test-plannerSkill
- ai-triageSkill
- ai-verifySkill
- ai-visual-recapSkill
- ai-writeSkill
- ai-writing-behaviorSkill
- build-checkSkill
- code-auditSkill
- design-checkSkill
- feature-verifySkill
- full-reviewSkill
- perf-auditSkill
- review-routerSkill
- second-opinionSkill
- security-auditSkill
- spec-extractSkill
- verify-featureSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 46
If not running: codegraph serve --mcp &
- Very specific: line 52
If not indexed: codegraph init
- Distinctive: line 60
Call paths (calls, imports, extends, implements)
- Distinctive: line 90
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
- Very specific: line 96
Do NOT use for literal text search (grep is faster)
- Very specific: line 97
Do NOT use for file discovery (find/glob is faster)
- Distinctive: line 98
Do NOT use CodeGraph AND grep for the same question — pick one
- Distinctive: line 99
DO remember: CodeGraph leaves 82% more context resident after multi-turn sessions (vendor data: 67k vs 18k tokens after 3 turns).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- Check availability — is CodeGraph installed?
If missing:which codegraph && codegraph --versionnpm i -g @colbymchenry/codegraph - Check daemon — is the daemon running?
If not running:test -S .codegraph/daemon.sock && echo "running" || echo "not running"codegraph serve --mcp & - Check index — is the project indexed?
If not indexed:codegraph statuscodegraph init - Query — use
codegraph_exploreMCP tool:query: natural language or symbol/file namesmaxFiles: default 12, increase for broad questions
- 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):
{
"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 (
grepis faster) - Do NOT use for file discovery (
find/globis 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.dbin this workspace
Source: ai-engineering (own), Apache-2.0.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

