zhanghandong avatar

Rust Trait Explorer

When you're working in a Rust codebase and need to answer "what implements this trait?" or "what traits does this type implement?", this skill uses LSP operations to map those relationships. It triggers on `/trait-impl` and related phrases, then runs goToImplementation for traits or grep patterns for types. The output includes tables of implementors with locations, trait hierarchies, and even coverage checks showing which required methods each implementation provides. Honest take: this is basically automating the manual clicking you'd do in your editor, but having it all formatted in one place with hierarchy trees and blanket impl analysis makes understanding polymorphic designs much faster than tab surfing.

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

Install

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

Installs into .claude/skills of the current project.

Files

Rust Trait Explorer

Discover trait implementations and understand polymorphic designs.

Usage

/rust-trait-explorer <TraitName|StructName>

Examples:

  • /rust-trait-explorer Handler - Find all implementors of Handler trait
  • /rust-trait-explorer MyStruct - Find all traits implemented by MyStruct

LSP Operations

Go to Implementation

Find all implementations of a trait.

LSP(
  operation: "goToImplementation",
  filePath: "src/traits.rs",
  line: 10,
  character: 11
)

Use when:

  • Trait name is known
  • Want to find all implementors
  • Understanding polymorphic code

Workflow

Find Trait Implementors

User: "Who implements the Handler trait?"
    │
    ▼
[1] Find trait definition
    LSP(goToDefinition) or workspaceSymbol
    │
    ▼
[2] Get implementations
    LSP(goToImplementation)
    │
    ▼
[3] For each impl, get details
    LSP(documentSymbol) for methods
    │
    ▼
[4] Generate implementation map

Find Traits for a Type

Sponsors

Details

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

More from zhanghandong/rust-skills

All 34

Recommended

More Rust
1zhanghandong avatarrust-code-navigatorzhanghandong/rust-skillsrust code navigator728skills.sh installs
2zhanghandong avatarrust-symbol-analyzerzhanghandong/rust-skillsrust symbol analyzer702skills.sh installs
3zhanghandong avatarrust-call-graphzhanghandong/rust-skillsrust call graph699skills.sh installs
4zhanghandong avatarrust-dailyzhanghandong/rust-skillsrust daily635skills.sh installs
5googleworkspace avatarrecipe-transfer-file-ownershipgoogleworkspace/cliTransfer ownership of Google Drive files from one user to another.582skills.sh installs
6mohitmishra786 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