PluginBench
Skill
Fail
Audit score 45

rust-deps-visualizer

actionbook/rust-skills

Visualize Rust project dependencies as ASCII art trees with optional feature flags.

What is rust-deps-visualizer?

Generates ASCII art visualizations of your Rust project's dependency tree using cargo metadata and cargo tree. Use this when you need to understand dependency relationships, check for bloat, or explore feature flags in your Rust project.

  • Parse Cargo.toml and generate ASCII tree visualization of dependencies
  • Support depth limiting (default 3 levels) to control tree size
  • Display feature flags for each dependency when requested
  • Categorize dependencies by type (Runtime, Serialization, Development)
  • Show optional size visualization with total crate sizes
  • Handle multi-language triggers including Chinese (依赖图, 依赖可视化, 显示依赖)

How to install rust-deps-visualizer

npx skills add https://github.com/actionbook/rust-skills --skill rust-deps-visualizer
Prerequisites
  • Rust toolchain installed with cargo
  • Cargo.toml file in the project root
  • cargo metadata and cargo tree commands available
Claude Code
Cursor
Windsurf
Cline

How to use rust-deps-visualizer

  1. 1.Run `/rust-deps-visualizer` to generate a default tree (depth 3)
  2. 2.Add `--depth N` to limit visualization depth (e.g., `--depth 2` for shallow view)
  3. 3.Add `--features` flag to show feature flags for each dependency
  4. 4.Review the ASCII tree output to identify dependencies and relationships
  5. 5.Use categorized output to understand runtime vs dev vs build dependencies

Use cases

Good for
  • Understand the full dependency tree of a Rust project before adding new crates
  • Identify heavy dependencies and potential bloat in your project
  • Explore which features are enabled for transitive dependencies
  • Visualize workspace dependencies and their relationships
  • Check dependency categories to understand project structure
Who it's for
  • Rust developers optimizing project dependencies
  • Maintainers reviewing crate bloat and dependency health
  • Teams evaluating third-party crate impact
  • Developers learning Rust ecosystem structure

rust-deps-visualizer FAQ

What's the default depth limit?

The default depth is 3 levels. Use `--depth N` to customize (e.g., `--depth 1` for direct dependencies only).

Can I see feature flags?

Yes, add the `--features` flag to display enabled features for each dependency.

Does it show transitive dependencies?

Yes, cargo tree includes all transitive dependencies up to the specified depth limit.

Can it show dependency sizes?

Yes, the skill supports optional size visualization showing crate sizes in MB/KB with a total.

What if I don't have a Cargo.toml?

The skill checks for Cargo.toml in the current directory and will fail gracefully if not found.

Full instructions (SKILL.md)

Source of truth, from actionbook/rust-skills.


name: rust-deps-visualizer description: "Visualize Rust project dependencies as ASCII art. Triggers on: /deps-viz, dependency graph, show dependencies, visualize deps, 依赖图, 依赖可视化, 显示依赖" argument-hint: "[--depth N] [--features]" allowed-tools: ["Bash", "Read", "Glob"]

Rust Dependencies Visualizer

Generate ASCII art visualizations of your Rust project's dependency tree.

Usage

/rust-deps-visualizer [--depth N] [--features]

Options:

  • --depth N: Limit tree depth (default: 3)
  • --features: Show feature flags

Output Format

Simple Tree (Default)

my-project v0.1.0
├── tokio v1.49.0
│   ├── pin-project-lite v0.2.x
│   └── bytes v1.x
├── serde v1.0.x
│   └── serde_derive v1.0.x
└── anyhow v1.x

Feature-Aware Tree

my-project v0.1.0
├── tokio v1.49.0 [rt, rt-multi-thread, macros, fs, io-util]
│   ├── pin-project-lite v0.2.x
│   └── bytes v1.x
├── serde v1.0.x [derive]
│   └── serde_derive v1.0.x (proc-macro)
└── anyhow v1.x [std]

Implementation

Step 1: Parse Cargo.toml for direct dependencies

cargo metadata --format-version=1 --no-deps 2>/dev/null

Step 2: Get full dependency tree

cargo tree --depth=${DEPTH:-3} ${FEATURES:+--features} 2>/dev/null

Step 3: Format as ASCII art tree

Use these box-drawing characters:

  • ├── for middle items
  • └── for last items
  • │ for continuation lines

Visual Enhancements

Dependency Categories

my-project v0.1.0
│
├─[Runtime]─────────────────────
│ ├── tokio v1.49.0
│ └── async-trait v0.1.x
│
├─[Serialization]───────────────
│ ├── serde v1.0.x
│ └── serde_json v1.x
│
└─[Development]─────────────────
  ├── criterion v0.5.x
  └── proptest v1.x

Size Visualization (Optional)

my-project v0.1.0
├── tokio v1.49.0        ████████████ 2.1 MB
├── serde v1.0.x         ███████ 1.2 MB
├── regex v1.x           █████ 890 KB
└── anyhow v1.x          ██ 120 KB
                         ─────────────────
                         Total: 4.3 MB

Workflow

  1. Check for Cargo.toml in current directory
  2. Run cargo tree with specified options
  3. Parse output and generate ASCII visualization
  4. Optionally categorize by purpose (runtime, dev, build)

Related Skills

WhenSee
Crate selection advicem11-ecosystem
Workspace managementm11-ecosystem
Feature flag decisionsm11-ecosystem