rust-symbol-analyzer — Claude Code skill: map a Rust project
An LSP-based skill that maps a Rust codebase: modules, structs, traits, functions. Useful when you open an unfamiliar crate and need the layout fast.
npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a claude-codeWhat rust-symbol-analyzer does
The skill globs **/*.rs, pulls symbols through LSP and sorts them by kind. A single file goes through documentSymbol, which returns the hierarchy of modules, structs, fields and methods. Whole-project queries use workspaceSymbol across the workspace.
Output comes as tables: structs with fields and derives, traits with methods and implementors, functions with visibility and an async flag, enums with variants. There is also a complexity pass — files with many functions and lines get flagged as hotspots, which is your cue to look at refactoring. Internal dependencies are listed too: what a file imports and who imports it.
Arguments follow [file.rs] [--type struct|trait|fn|mod]. With none, the whole project is analysed. The skill talks to LSP, so rust-analyzer has to be running in your editor — otherwise no symbols come back. Only LSP, Read and Glob are allowed, so it reads code and never writes.
What it helps with
- see the module tree of an unfamiliar crate
- list every trait in the project with its implementors
- find structs together with their fields and derives
- spot high-complexity files before refactoring
- trace which modules depend on a given file
Example prompts for the agent
- /rust-symbol-analyzer
- /rust-symbol-analyzer src/lib.rs
- /rust-symbol-analyzer --type trait
How to install rust-symbol-analyzer
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a claude-code2Manually: put the files in place
~/.claude/skills/rust-symbol-analyzer/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/rust-symbol-analyzer/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a codex2Manually: put the files in place
.agents/skills/rust-symbol-analyzer/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a cursor2Manually: put the files in place
.cursor/skills/rust-symbol-analyzer/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install actionbook/rust-skills rust-symbol-analyzer2Manually: put the files in place
.github/skills/rust-symbol-analyzer/SKILL.md1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a gemini-cli2Platform CLI
gemini skills install https://github.com/actionbook/rust-skills --path skills/rust-symbol-analyzerManually: put the files in place
.devin/skills/rust-symbol-analyzer/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about rust-symbol-analyzer
How do I install rust-symbol-analyzer in Claude?
Run npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a claude-code. The skill lands in ~/.claude/skills/rust-symbol-analyzer/SKILL.md.
What does rust-symbol-analyzer do?
It reads LSP symbols to describe a Rust project: modules, structs, traits, functions and enums. One file gives you a hierarchy, the whole project gives you tables by symbol type.
What does the skill need to run?
A working Rust LSP server, usually rust-analyzer. The skill calls documentSymbol and workspaceSymbol, and without the server those return nothing.