- Home
- Skills
- Zhanghandong
- Rust Skills
- Rust Code Navigator
rust-code-navigator_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-code-navigator- SKILL.md3.2 KB
Overview
This skill navigates Rust codebases using the Language Server Protocol to locate definitions, references, and type/documentation hover info. It provides file locations, code context, and quick summaries so you can jump to the right code spot without leaving the chat. It supports explicit location hints (file:line) and workspace-wide symbol searches.
How this skill works
The skill issues LSP requests such as workspaceSymbol, goToDefinition, findReferences, and hover to discover symbols and their usages. It resolves ambiguous results by listing candidates and asking for clarification, then reads surrounding source to produce a concise snippet and path. Error cases (missing LSP server, symbol not found) are detected and actionable suggestions are returned.
When to use it
- Locate where a function, struct, trait, or constant is defined.
- Find all places a symbol is used before refactoring.
- Inspect the inferred type or documentation for a symbol via hover.
- Jump from a specific file:line context to the canonical definition.
Best practices
- Provide a symbol name and, when possible, the file:line context to disambiguate results.
- Start with workspaceSymbol if a plain name returns multiple candidates.
- Use findReferences before mass renames or API changes to estimate impact.
- Ensure rust-analyzer (or another LSP) is running in the workspace for reliable results.
Example use cases
- /rust-code-navigator parse_config — jump to the parse_config function definition and show surrounding code.
- /rust-code-navigator MyStruct in src/lib.rs:42 — resolve which MyStruct is referenced at that location.
- Find all references to Config to see where configuration is constructed and consumed.
- Hover on a variable to reveal its inferred type and documentation comments.
- Search workspace symbols for all public structs when exploring project API surface.
FAQ
I will report the error and suggest starting rust-analyzer or installing it via rustup so LSP operations can run.
I got multiple symbol matches — how do I pick the right one?
I list candidates with file paths and contexts; provide the file:line or index for the desired entry and I will navigate to that definition.