actionbook avatar

Rust Call Graph

Visualizes Rust function call graphs in both directions using LSP call hierarchy for impact analysis.

skills.sh installs
3.5K
GitHub stars
1.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers callers, callees, or both directions, with traversal depth set by --depth N (default 3)
  • Includes prepareCallHierarchy, incomingCalls, and outgoingCalls LSP operations, plus tree, box, flat, and Mermaid output styles
  • Adds analysis notes on entry points, leaf functions, hot paths, and high fan-out or fan-in functions
  • Designed for Rust codebases where tracing who calls a function, or what it calls, needs to be done without grep

Install

$ npx -y skills add actionbook/rust-skills --skill rust-call-graph -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Rust Call Graph

Visualize function call relationships using LSP call hierarchy.

Usage

/rust-call-graph <function_name> [--depth N] [--direction in|out|both]

Options:

  • --depth N: How many levels to traverse (default: 3)
  • --direction: in (callers), out (callees), both

Examples:

  • /rust-call-graph process_request - Show both callers and callees
  • /rust-call-graph handle_error --direction in - Show only callers
  • /rust-call-graph main --direction out --depth 5 - Deep callee analysis

LSP Operations

1. Prepare Call Hierarchy

Get the call hierarchy item for a function.

LSP(
  operation: "prepareCallHierarchy",
  filePath: "src/handler.rs",
  line: 45,
  character: 8
)

2. Incoming Calls (Who calls this?)

LSP(
  operation: "incomingCalls",
  filePath: "src/handler.rs",
  line: 45,
  character: 8
)

3. Outgoing Calls (What does this call?)

LSP(
  operation: "outgoingCalls",
  filePath: "src/handler.rs",
  line: 45,
  character: 8
)

Workflow

Details

Repository
github.com/actionbook/rust-skills
Categories
Rust, Code Review & Quality, Debugging
First seen
May 16, 2026

More from actionbook/rust-skills

All 38

Similar to Rust Call Graph

More Rust