
Rust Call Graph
When you need to understand who calls a Rust function or what it calls, this skill uses LSP to build visual call hierarchies. You can trace callers (impact analysis), callees (implementation flow), or both, with configurable depth. It's especially handy when refactoring or trying to understand execution paths in unfamiliar code. The ASCII tree diagrams are clear and the bidirectional view gives you the full picture of a function's role in your codebase. One nice touch: it provides analysis like hot paths and complexity metrics after showing the graph, so you get context beyond just the visualization.
- skills.sh installs
- 699
- GitHub stars
- 1.3K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add zhanghandong/rust-skills --skill rust-call-graph --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/zhanghandong/rust-skills
- Category
- Rust
More from zhanghandong/rust-skills
All 34- Rust Router698
- Rust Learner688
- Rust Deps Visualizer684
- Rust Skill Creator670
- Domain Web648
- Meta Cognition Parallel635
- Rust Daily635
- Domain Embedded625
- Domain Cloud Native596
- Domain Fintech581
- Domain Ml573
- Domain Iot568
- M15 Anti Pattern5.6K
- Coding Guidelines1.2K
- M10 Performance895
- M07 Concurrency844
- M06 Error Handling827
- Rust Refactor Helper821
- M01 Ownership809
- M04 Zero Cost789
- M05 Type Driven786
- M02 Resource783
- M03 Mutability773
- M12 Lifecycle764