# Rust call graph

> Rust call graph is an open-source agent skill for developer tools. Maps who calls a Rust function and what it calls, using LSP call hierarchy. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/k1-c/linear-tui/tree/main/.claude/skills/rust-call-graph
- **Repository:** https://github.com/k1-c/linear-tui
- **GitHub stars:** 21
- **License:** MIT
- **Skill name:** rust-call-graph
- **Collection:** https://github.com/k1-c/linear-tui
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill lets an agent draw call graphs for Rust functions. Given a function name, it locates the symbol, prepares a call hierarchy item through the LSP tool, and then walks incoming calls (callers), outgoing calls (callees), or both, expanding up to a configurable depth.

Results are rendered as ASCII trees or box diagrams, with an option to export a Mermaid graph for documentation. After the graph, the agent adds a short analysis covering entry points, leaf functions, a hot path, and spots with high fan-out or many call sites.

The skill relies on the LSP tool being available in the agent session, plus Read and Glob for navigating source files. It includes no scripts; the work is done through LSP queries against the Rust codebase.

## When your agent uses it

> Visualize Rust function call graphs using LSP. Triggers on: /call-graph, call hierarchy, who calls, what calls, 调用图, 调用关系, 谁调用了, 调用了谁

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/k1-c/linear-tui/tree/HEAD/.claude/skills/rust-call-graph)
- [Asks for: LSP, Read, Glob](https://github.com/k1-c/linear-tui/blob/HEAD/.claude/skills/rust-call-graph/SKILL.md)
- [License: MIT](https://github.com/k1-c/linear-tui/tree/HEAD/.claude/skills/rust-call-graph)

## Features

- **Caller tracing:** Finds which functions call a given Rust function, level by level.
- **Callee tracing:** Lists what a function calls, expanding downward to a chosen depth.
- **Adjustable depth and direction:** Accepts options to set traversal depth and limit output to callers, callees or both.
- **Multiple diagram styles:** Renders the graph as a tree, box diagram, flat list or Mermaid block.
- **Call graph analysis:** Summarizes entry points, leaf functions, hot paths and high fan-out functions.
- **Multilingual triggers:** Activates on English phrases such as who calls or call hierarchy, and on Chinese equivalents.

## Good for

- Show who calls process_request in this Rust project
- List everything handle_error calls, three levels deep
- Trace the execution path from main to a given function
- Assess the impact of changing a function by finding its callers
- Export the call graph of a module as a Mermaid diagram

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/rust-call-graph` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/rust-call-graph &&
cp -R "$tmp/.claude/skills/rust-call-graph" ~/.claude/skills/rust-call-graph &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/rust-call-graph` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/rust-call-graph` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/rust-call-graph &&
cp -R "$tmp/.claude/skills/rust-call-graph" ~/.agents/skills/rust-call-graph &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/rust-call-graph` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/rust-call-graph` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/rust-call-graph &&
cp -R "$tmp/.claude/skills/rust-call-graph" ~/.cursor/skills/rust-call-graph &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/rust-call-graph` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/k1-c/linear-tui.git --path .claude/skills/rust-call-graph
```

Or copy the folder to `~/.gemini/skills/rust-call-graph` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/rust-call-graph`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/rust-call-graph &&
cp -R "$tmp/.claude/skills/rust-call-graph" ~/.copilot/skills/rust-call-graph &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/rust-call-graph` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/k1-c/linear-tui.git
```

Then copy `linear-tui/.claude/skills/rust-call-graph` into your agent's skills folder as `rust-call-graph`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It uses the LSP tool with call hierarchy operations, along with Read and Glob for file access. It has no scripts of its own.

### How do I control the output?

Pass a function name, plus optional --depth N (default 3) and --direction in, out or both.

### Which languages does Rust call graph support?

It is written for Rust code and uses LSP call hierarchy queries against Rust source files.

### How do I install Rust call graph in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/rust-call-graph to use it in all your projects, or to .claude/skills/rust-call-graph in one project.

### Does Rust call graph run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Rust call graph?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Rust call graph?

The closest alternatives to Rust call graph are Rust symbol analyzer, Rust code navigator, Rust trait explorer, Rust refactor helper and Diagramming code.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Rust symbol analyzer](https://ai-powered.com/skills/rust-symbol-analyzer): Rust symbol analyzer is an open-source agent skill for developer tools.
- [Rust code navigator](https://ai-powered.com/skills/rust-code-navigator): Rust code navigator is an open-source agent skill for developer tools.
- [Rust trait explorer](https://ai-powered.com/skills/rust-trait-explorer): Rust trait explorer is an open-source agent skill for developer tools.
- [Rust refactor helper](https://ai-powered.com/skills/rust-refactor-helper): Rust refactor helper is an open-source agent skill for developer tools.
- [Diagramming code](https://ai-powered.com/skills/diagramming-code): Diagramming code is an open-source agent skill for developer tools.
- [Rust deps visualizer](https://ai-powered.com/skills/rust-deps-visualizer): Rust deps visualizer is an open-source agent skill for developer tools.
- [Rust learner](https://ai-powered.com/skills/rust-learner): Rust learner is an open-source agent skill for developer tools.
- [Skill flow](https://ai-powered.com/skills/skill-flow): Skill flow is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/rust-call-graph
