agentleFS
arcasilesgrouparcasilesgroup/ai-engineering/skills/ai-codegraph/SKILL.md

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

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
  1. Very specific:

    If not running: codegraph serve --mcp &

    line 46
  2. Very specific:

    If not indexed: codegraph init

    line 52
  3. Distinctive:

    Call paths (calls, imports, extends, implements)

    line 60
  4. Distinctive:

    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

    line 90
  5. Very specific:

    Do NOT use for literal text search (grep is faster)

    line 96
  6. Very specific:

    Do NOT use for file discovery (find/glob is faster)

    line 97
  7. Distinctive:

    Do NOT use CodeGraph AND grep for the same question — pick one

    line 98
  8. Distinctive:

    DO remember: CodeGraph leaves 82% more context resident after multi-turn sessions (vendor data: 67k vs 18k tokens after 3 turns).

    line 99

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

QuestionToolWhy
"How does X work?"codegraph_exploreFollows call chains across files
"What calls function Y?"codegraph_exploreGraph traversal, follows polymorphism
"If I change this interface, what breaks?"codegraph_exploreBlast radius via edge traversal
"What does this module depend on?"codegraph_exploreImport edges in the graph
"Find all TODOs"grepLiteral text search, faster
"Where is X defined?"findSimple path lookup
"Find all files importing X"grepLiteral text match
"Show me the test for this function"find + grepConvention-based lookup

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

Steps

  1. Check availability — is CodeGraph installed?
    which codegraph && codegraph --version
    If missing: npm i -g @colbymchenry/codegraph
  2. Check daemon — is the daemon running?
    test -S .codegraph/daemon.sock && echo "running" || echo "not running"
    If not running: codegraph serve --mcp &
  3. Check index — is the project indexed?
    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:

SurfaceConfig fileKey
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.jsonservers.codegraph
Copilot CLI~/.copilot/mcp-config.jsonmcpServers.codegraph
opencode~/.config/opencode/opencode.jsoncmcp.servers.codegraph
OMPImport from ~/.claude.json or add manually—
Pipi-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 (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

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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.