rust-deps-visualizer
176
总安装量
176
周安装量
#1509
全站排名
安装命令
npx skills add https://github.com/zhanghandong/rust-skills --skill rust-deps-visualizer
Agent 安装分布
opencode
142
codex
131
gemini-cli
125
github-copilot
118
amp
79
Skill 文档
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
- Check for Cargo.toml in current directory
- Run
cargo treewith specified options - Parse output and generate ASCII visualization
- Optionally categorize by purpose (runtime, dev, build)
Related Skills
| When | See |
|---|---|
| Crate selection advice | m11-ecosystem |
| Workspace management | m11-ecosystem |
| Feature flag decisions | m11-ecosystem |