# rust-symbol-analyzer

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3100 installs · ★ 1545
- Author: actionbook
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/actionbook/rust-skills/tree/HEAD/skills/rust-symbol-analyzer/SKILL.md
- Updated: 2026-08-23
- HTML: https://affpapa.org/en/nevibecode/skills/rust-symbol-analyzer

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/rust-symbol-analyzer/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/rust-symbol-analyzer/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/rust-symbol-analyzer/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/rust-symbol-analyzer/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install actionbook/rust-skills rust-symbol-analyzer
```

2. **Manually: put the files in place**
- File: `.github/skills/rust-symbol-analyzer/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/actionbook/rust-skills --path skills/rust-symbol-analyzer
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/rust-symbol-analyzer/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill rust-symbol-analyzer -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/actionbook/rust-skills/tree/HEAD/skills/rust-symbol-analyzer/SKILL.md

## When to use it
- 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
- /rust-symbol-analyzer
- /rust-symbol-analyzer src/lib.rs
- /rust-symbol-analyzer --type trait

## Similar
- [rust-analyzer-lsp](https://affpapa.org/en/nevibecode/plugins/rust-analyzer-lsp.md) — plugin · ★ 44635
- [rust-refactor](https://affpapa.org/en/nevibecode/skills/rust-refactor.md) — skill · 314 installs
- [golang-gopls](https://affpapa.org/en/nevibecode/skills/golang-gopls.md) — skill · 11000 installs
- [lsp-code-analysis](https://affpapa.org/en/nevibecode/skills/lsp-code-analysis.md) — skill · 920 installs
- [rust-best-practices](https://affpapa.org/en/nevibecode/skills/rust-best-practices.md) — skill · 21100 installs
- [rust-skills](https://affpapa.org/en/nevibecode/skills/rust-skills.md) — skill · 6500 installs

From the same set: [actionbook/rust-skills](https://affpapa.org/en/nevibecode/by/actionbook/rust-skills.md) — 35 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
