zhanghandong avatar

Rust Code Navigator

This wraps rust-analyzer's LSP operations into a conversational interface, so you can ask "where is Config defined?" or "who uses this function?" instead of clicking around. It handles go to definition, find references, hover info, and workspace symbol search with formatted output showing file locations and code context. Works with multilingual triggers including Chinese commands. The workflow is straightforward: search for a symbol, disambiguate if needed, then show results in tables or code blocks. Most useful when you're spelunking through unfamiliar Rust codebases or need to trace dependencies before refactoring. It's basically your IDE's navigation features exposed through chat, which feels slower for known targets but surprisingly handy when you're exploring or can't remember exact names.

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

Install

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

Installs into .claude/skills of the current project.

Files

Rust Code Navigator

Navigate large Rust codebases efficiently using Language Server Protocol.

Usage

/rust-code-navigator <symbol> [in file.rs:line]

Examples:

  • /rust-code-navigator parse_config - Find definition of parse_config
  • /rust-code-navigator MyStruct in src/lib.rs:42 - Navigate from specific location

LSP Operations

1. Go to Definition

Find where a symbol is defined.

LSP(
  operation: "goToDefinition",
  filePath: "src/main.rs",
  line: 25,
  character: 10
)

Use when:

  • User asks "where is X defined?"
  • User wants to understand a type/function
  • Ctrl+click equivalent

2. Find References

Find all usages of a symbol.

LSP(
  operation: "findReferences",
  filePath: "src/lib.rs",
  line: 15,
  character: 8
)

Use when:

  • User asks "who uses X?"
  • Before refactoring/renaming
  • Understanding impact of changes

3. Hover Information

Get type and documentation for a symbol.

LSP(
  operation: "hover",
  filePath: "src/main.rs",
  line: 30,
  character: 15
)

Use when:

  • User asks "what type is X?"
  • User wants documentation
  • Quick type checking

Workflow

Sponsors

Details

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

More from zhanghandong/rust-skills

All 34

Recommended

More Rust
1zhanghandong avatarrust-symbol-analyzerzhanghandong/rust-skillsrust symbol analyzer702skills.sh installs
2zhanghandong avatarrust-call-graphzhanghandong/rust-skillsrust call graph699skills.sh installs
3zhanghandong avatarrust-dailyzhanghandong/rust-skillsrust daily635skills.sh installs
4googleworkspace avatarrecipe-transfer-file-ownershipgoogleworkspace/cliTransfer ownership of Google Drive files from one user to another.582skills.sh installs
5mohitmishra786 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
6longbridge avatarlongbridge-ownershiplongbridge/skillsShare structure and shareholder query — total shares, circulating shares, restricted shares, top-10 shareholders (circulating and total), major institutional ho494skills.sh installs