rust-call-graph — Claude Code skill: Rust call graphs
Builds a Rust function call graph through LSP: who calls a function and what it calls. Useful when reading unfamiliar code or checking what a change will touch.
npx skills add actionbook/rust-skills --skill rust-call-graph -a claude-codeWhat rust-call-graph does
The skill maps relationships between Rust functions using LSP call hierarchy. You pass a function name, it locates the definition, prepares the hierarchy and expands it to the depth you ask for. Output comes as a tree, a box diagram, a flat list or Mermaid you can drop into docs.
Direction is set with --direction in for callers, out for callees, both for the full picture. Traversal depth is --depth N, default 3 levels. Once the graph is drawn, the skill adds a short read: entry points, leaf functions, the hot path, and spots worth a second look such as a function with unusually high fan-out.
It runs on the LSP tool, so a Rust language server has to be running against an open project — without indexing there is no call hierarchy to walk. Dynamic dispatch shows up as a marker in the tree rather than a concrete implementation. The skill reads files and globs for symbols; it does not edit your code.
What it helps with
- find every call site of a function before changing its signature
- trace the execution path from
maindown to a handler - spot overloaded functions by their fan-out
- export a call graph to Mermaid for docs
- get oriented in an unfamiliar Rust codebase through its call tree
Example prompts for the agent
- /rust-call-graph process_request
- /rust-call-graph handle_error --direction in
- /rust-call-graph main --direction out --depth 5
How to install rust-call-graph
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-call-graph -a claude-code2Manually: put the files in place
~/.claude/skills/rust-call-graph/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/rust-call-graph/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-call-graph -a codex2Manually: put the files in place
.agents/skills/rust-call-graph/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-call-graph -a cursor2Manually: put the files in place
.cursor/skills/rust-call-graph/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install actionbook/rust-skills rust-call-graph2Manually: put the files in place
.github/skills/rust-call-graph/SKILL.md1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-call-graph -a gemini-cli2Platform CLI
gemini skills install https://github.com/actionbook/rust-skills --path skills/rust-call-graphManually: put the files in place
.devin/skills/rust-call-graph/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-call-graph -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about rust-call-graph
How do I install rust-call-graph in Claude?
Run npx skills add actionbook/rust-skills --skill rust-call-graph -a claude-code. The skill lands in ~/.claude/skills/rust-call-graph/SKILL.md.
What does rust-call-graph do?
It draws a Rust function call graph from LSP call hierarchy: callers, callees, expansion to a chosen depth, plus a short analysis of the structure.
What does it need to work?
A running Rust language server and an open project, since the hierarchy comes from LSP. Dynamic dispatch appears as a marker in the tree instead of a concrete implementation.