- Home
- Skills
- Zhanghandong
- Rust Skills
- Rust Symbol Analyzer
rust-symbol-analyzer_skill
- Shell
565
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill zhanghandong/rust-skills --skill rust-symbol-analyzer- SKILL.md5.1 KB
Overview
This skill analyzes a Rust codebase by collecting and categorizing LSP symbols to reveal project structure, types, and hotspots. It summarizes modules, structs, traits, enums, functions, and methods and produces per-file hierarchies and cross-file dependency hints. Use it to quickly map the code surface and identify complexity or public API elements.
How this skill works
The analyzer finds Rust source files (glob **/*.rs) and queries the language server with documentSymbol for file-level hierarchies and workspaceSymbol for project-wide listings. It merges results, groups symbols by type, and extracts locations, signatures, derives, and basic metrics (lines, counts). Outputs include a tree-style module map, tables of symbols by type, single-file hierarchies, complexity hotspots, and simple dependency summaries.
When to use it
- When you need a quick overview of a new or unfamiliar Rust project
- To list all structs, traits, functions, or modules across the workspace
- Before refactoring to identify high-complexity files and hotspots
- To extract public API surfaces or find all async functions
- When building documentation or onboarding guides for a codebase
Best practices
- Run workspaceSymbol to get comprehensive cross-file results and documentSymbol for detailed file hierarchies
- Filter by type (struct, trait, fn, mod) to focus output and reduce noise
- Combine symbol results with basic metrics (lines, function counts) to prioritize refactors
- Use file paths and symbol ranges to jump directly to definitions in your editor
- Run periodically to track structural changes during major refactors
Example use cases
- Generate a module tree and tables of structs, enums, and traits for a code review
- List all trait definitions and their implementors to assess interface coverage
- Find all async functions across the workspace to audit runtime behavior
- Inspect a single file’s symbol hierarchy to understand relationships and method signatures
- Identify files with many functions or large structs as refactor candidates
FAQ
Provide the file path when invoking the analyzer; it will call documentSymbol for that file and return the local hierarchy and metrics.
Can it find all implementations of a trait?
It lists traits and can surface likely implementors by collecting type and impl symbols across the workspace, but full semantic resolution depends on the language server.