agentleFS
seanb4tseanb4t/codegraph-go/.claude/skills/codegraph/SKILL.md

codegraph

Skill0 starsChanged 25 days agoMITView on GitHub

Use when asked where X is defined, how Y works, what calls X, or what changing X breaks in a .codegraph/ repo.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use codebase-design and grill-me.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    codebase-design

    Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

    Also in 3 projects that use this

  • GoogleSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the registered tool list looks shorter than the table above, CODEGRAPH_MCP_TOOLS is narrowing the companion set to a subset of …

    line 22
  2. Distinctive:

    Every parameter, default, and return shape deliberately absent above lives in a resource this server serves — read it on demand through …

    line 44
  3. Distinctive:

    All 8 tools are documented this way — nothing above restates a parameter, a default, a maximum, or a return shape that one of these …

    line 57

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “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

Which tool for which question

Question shapeReach for this
Where is X defined? How does Y work?codegraph_explore (MCP tool), or the codegraph explore "<query>" CLI as the shell fallback
What calls X? What does X call?codegraph_callers / codegraph_callees
What breaks if I change X's signature?codegraph_impact
I don't know the exact symbol name — fuzzy lookupcodegraph_search
Show one symbol's full detailcodegraph_node
Which files are involved?codegraph_files
Is the index current?codegraph_status

When not to reach for codegraph

With no .codegraph/ directory at the repository root, skip codegraph entirely — use grep, find, and ordinary file reads instead. Indexing is the user's decision, not something to prompt for.

If the registered tool list looks shorter than the table above, CODEGRAPH_MCP_TOOLS is narrowing the companion set to a subset of codegraph_node, codegraph_search, codegraph_callers, codegraph_callees, codegraph_impact, codegraph_files, and codegraph_status — codegraph_explore is never removable by this filter. Unsetting the variable restores the full set.

Worked examples

The 2026-08-08 misdirection incident

A user reported: "the mcp server is only showing one tool." The session's first move was wrong — it searched the instructions string and the README for an explanation, because the instructions text of the day attributed tool visibility solely to index state ("an empty tool list means this repository has no index yet"). That explanation misled the session structurally, not just factually: a missing index produces zero tools, never one, so the single cause it offered could not have produced the symptom actually observed.

The right move was a codegraph_explore call against the server's own source — internal/mcp/server.go and internal/cli/serve.go — which would have surfaced the allowlist-resolution path (ResolveCompanions, gated by CODEGRAPH_MCP_TOOLS) directly, instead of trusting a wire-contract string that was, at the time, itself wrong.

Full root cause, timeline, and evidence: .planning/debug/resolved/mcp-server-one-tool-only.md. The instructions string has since been corrected to name all three visibility mechanisms — this example is a lesson about the failure mode, not a description of current behavior.

Impact analysis before a refactor

"What breaks if I change this function's signature?" Reach for codegraph_impact (MCP), or codegraph impact <symbol> as the CLI fallback — a depth-bounded reverse blast radius over the call graph, not a manual grep for every call site. Grepping for a symbol's name finds textual matches; it does not compute what actually depends on it, and it misses call sites reached through an interface or alias. For the parameter's full semantics, read codegraph://tools/impact.

Cross-file symbol lookup across dynamic dispatch

"Where is X defined?" or "how does Y work?" sometimes has an answer that sits behind an interface implementation or a dynamic-dispatch hop — the call site names an interface method, and the implementation that actually runs lives in a different file entirely. A text search matches the call site's spelling, not the implementation it resolves to, so the hop is exactly what grep structurally cannot follow. codegraph_explore (MCP), or codegraph explore "<query>" as the CLI fallback, resolves the call graph across that hop and returns the verbatim source plus the path that reaches it.

Full reference

Every parameter, default, and return shape deliberately absent above lives in a resource this server serves — read it on demand through your MCP resource-read tool rather than trusting this file to restate it:

  • codegraph_explore → codegraph://tools/explore
  • codegraph_node → codegraph://tools/node
  • codegraph_search → codegraph://tools/search
  • codegraph_callers → codegraph://tools/callers
  • codegraph_callees → codegraph://tools/callees
  • codegraph_impact → codegraph://tools/impact
  • codegraph_files → codegraph://tools/files
  • codegraph_status → codegraph://tools/status
  • How CODEGRAPH_MCP_TOOLS narrows the companion set → codegraph://tools-filter
  • Preconditions for tool registration based on index presence → codegraph://index-state

All 8 tools are documented this way — nothing above restates a parameter, a default, a maximum, or a return shape that one of these resources already owns.

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.