actionbook avatar

Rust Trait Explorer

If you've ever stared at a Rust trait wondering which types actually implement it, or looked at a struct trying to remember what traits it derives, this is for you. It uses LSP operations to map trait implementations in both directions: find all implementors of a trait, or find all traits a type implements. The output is thorough, showing standard library traits, project traits, derived versus manual implementations, and even trait hierarchies with ASCII diagrams. It's genuinely useful for understanding polymorphic code in larger Rust codebases where the trait system gets complex. Works with multilingual triggers too, which is a nice touch for international teams.

skills.sh installs
3.4K
GitHub stars
1.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add actionbook/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/actionbook/rust-skills
Category
Rust
First seen
May 16, 2026

More from actionbook/rust-skills

All 38

Recommended

More Rust
1actionbook avatarrust-call-graphactionbook/rust-skillsVisualize Rust function call graphs using LSP. Triggers on: /call-graph, call hierarchy, who calls, what calls, 调用图, 调用关系, 谁调用了, 调用了谁3.4Kskills.sh installs
2actionbook avatarrust-symbol-analyzeractionbook/rust-skillsAnalyze Rust project structure using LSP symbols. Triggers on: /symbols, project structure, list structs, list traits, list functions, 符号分析, 项目结构, 列出所有, 有哪些stru3.4Kskills.sh installs
3actionbook avatarrust-dailyactionbook/rust-skillsCRITICAL: Use for Rust news and daily/weekly/monthly reports. Triggers on: rust news, rust daily, rust weekly, TWIR, rust blog, Rust 日报, Rust 周报, Rust 新闻, Rust 3.2Kskills.sh installs
4marimo-team avatarwasm-compatibilitymarimo-team/skillsCheck if a marimo notebook is compatible with WebAssembly (WASM) and report any issues.3.1Kskills.sh installs
5hubspot avatarteam-ownershiphubspot/agent-cli-skillsAssign and reassign CRM record ownership, audit who-owns-what across object types, and handle rep transitions. Built on `bulk-operations`.1.8Kskills.sh installs
6subsy avatarralph-tui-create-beads-rustsubsy/ralph-tuiConvert PRDs to beads for ralph-tui execution using beads-rust (br CLI). Creates an epic with child beads for each user story. Use when you have a PRD and want 1Kskills.sh installs