zhanghandong avatar

Rust Symbol Analyzer

When you need to understand a Rust codebase quickly, this skill pulls symbol hierarchies using LSP and organizes them by type. You can analyze the whole project or drill into specific files, filtering for structs, traits, functions, or modules. The output is surprisingly readable: nested module trees, tables of symbols with their locations and metadata, even complexity metrics to spot refactoring candidates. It's basically running documentSymbol and workspaceSymbol operations under the hood, then formatting the results into something you'd actually want to look at. Most useful when joining a new project or auditing what's where before a big refactor.

skills.sh installs
702
GitHub stars
1.3K
last updated
Jul 14, 2026

Install

$ npx -y skills add zhanghandong/rust-skills --skill rust-symbol-analyzer --agent claude-code

Installs into .claude/skills of the current project.

Files

Rust Symbol Analyzer

Analyze project structure by examining symbols across your Rust codebase.

Usage

/rust-symbol-analyzer [file.rs] [--type struct|trait|fn|mod]

Examples:

  • /rust-symbol-analyzer - Analyze entire project
  • /rust-symbol-analyzer src/lib.rs - Analyze single file
  • /rust-symbol-analyzer --type trait - List all traits in project

LSP Operations

1. Document Symbols (Single File)

Get all symbols in a file with their hierarchy.

LSP(
  operation: "documentSymbol",
  filePath: "src/lib.rs",
  line: 1,
  character: 1
)

Returns: Nested structure of modules, structs, functions, etc.

2. Workspace Symbols (Entire Project)

Search for symbols across the workspace.

LSP(
  operation: "workspaceSymbol",
  filePath: "src/lib.rs",
  line: 1,
  character: 1
)

Note: Query is implicit in the operation context.

Workflow

User: "What's the structure of this project?"
    │
    ▼
[1] Find all Rust files
    Glob("**/*.rs")
    │
    ▼
[2] Get symbols from each key file
    LSP(documentSymbol) for lib.rs, main.rs
    │
    ▼
[3] Categorize by type
    │
    ▼
[4] Generate structure visualization

Sponsors

Details

Repository
github.com/zhanghandong/rust-skills
Category
Rust

More from zhanghandong/rust-skills

All 34

Recommended

More Rust
1zhanghandong avatarrust-call-graphzhanghandong/rust-skillsrust call graph699skills.sh installs
2zhanghandong avatarrust-dailyzhanghandong/rust-skillsrust daily635skills.sh installs
3googleworkspace avatarrecipe-transfer-file-ownershipgoogleworkspace/cliTransfer ownership of Google Drive files from one user to another.582skills.sh installs
4mohitmishra786 avatarwasm-emscriptenmohitmishra786/low-level-dev-skillsWebAssembly with Emscripten skill for C/C++ to WASM compilation. Use when compiling C/C++ to WebAssembly with emcc, configuring EXPORTED_FUNCTIONS, understandin559skills.sh installs
5longbridge avatarlongbridge-ownershiplongbridge/skillsShare structure and shareholder query — total shares, circulating shares, restricted shares, top-10 shareholders (circulating and total), major institutional ho494skills.sh installs
6dchuk avatarcalling-rust-from-tauri-frontenddchuk/claude-code-tauri-skillsGuides the user through calling Rust backend functions from the Tauri frontend using the invoke function, defining commands with the361skills.sh installs