๐ŸŽฏ

rust-trait-explorer

๐ŸŽฏSkill

from goooice/rust-skills

VibeIndex|
What it does

Explores Rust trait implementations, revealing which types implement specific traits and trait details across a project.

๐Ÿ“ฆ

Part of

goooice/rust-skills(35 items)

rust-trait-explorer

Installation

Add MarketplaceAdd marketplace to Claude Code
/plugin marketplace add ZhangHanDong/rust-skills
Install PluginInstall plugin from marketplace
/plugin install rust-skills@rust-skills
Quick InstallInstall with npx
npx skills add ZhangHanDong/rust-skills
git cloneClone repository
git clone https://github.com/ZhangHanDong/rust-skills.git
๐Ÿ“– Extracted from docs: goooice/rust-skills
4Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

"Explore Rust trait implementations using LSP. Triggers on: /trait-impl, find implementations, who implements, trait ๅฎž็Žฐ, ่ฐๅฎž็Žฐไบ†, ๅฎž็Žฐไบ†ๅ“ชไบ›trait"

Overview

# Rust Trait Explorer

Discover trait implementations and understand polymorphic designs.

Usage

```

/rust-trait-explorer

```

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

```

User: "What traits does MyStruct implement?"

โ”‚

โ–ผ

[1] Find struct definition

โ”‚

โ–ผ

[2] Search for "impl * for MyStruct"

Grep pattern matching

โ”‚

โ–ผ

[3] Get trait details for each

โ”‚

โ–ผ

[4] Generate trait list

```

Output Format

Trait Implementors

```

Implementations of `Handler`

Trait defined at: src/traits.rs:15

โ€‹```rust

pub trait Handler {

fn handle(&self, request: Request) -> Response;

fn name(&self) -> &str;

}

โ€‹```

Implementors (4)

| Type | Location | Notes |

|------|----------|-------|

| AuthHandler | src/handlers/auth.rs:20 | Handles authentication |

| ApiHandler | src/handlers/api.rs:15 | REST API endpoints |

| WebSocketHandler | src/handlers/ws.rs:10 | WebSocket connections |

| MockHandler | tests/mocks.rs:5 | Test mock |

Implementation Details

#### AuthHandler

โ€‹```rust

impl Handler for AuthHandler {

fn handle(&self, request: Request) -> Response {

// Authentication logic

}

fn name(&self) -> &str {

"auth"

}

}

โ€‹```

#### ApiHandler

โ€‹```rust

impl Handler for ApiHandler {

fn handle(&self, request: Request) -> Response {

// API routing logic

}

fn name(&self) -> &str {

"api"

}

}

โ€‹```

```

Traits for a Type

```

Traits implemented by `User`

Struct defined at: src/models/user.rs:10

Standard Library Traits

| Trait | Derived/Manual | Notes |

|-------|----------------|-------|

| Debug | #[derive] | Auto-generated |

| Clone | #[derive] | Auto-generated |

| Default | manual | Custom defaults |

| Display | manual | User-friendly output |

Serde Traits

| Trait | Location |

|-------|----------|

| Serialize | #[derive] |

| Deserialize | #[derive] |

Project Traits

| Trait | Location | Methods |

|-------|----------|---------|

| Entity | src/db/entity.rs:30 | id(), created_at() |

| Validatable | src/validation.rs:15 | validate() |

Implementation Hierarchy

โ€‹```

User

โ”œโ”€โ”€ derive

โ”‚ โ”œโ”€โ”€ Debug

โ”‚ โ”œโ”€โ”€ Clone

โ”‚ โ”œโ”€โ”€ Serialize

โ”‚ โ””โ”€โ”€ Deserialize

โ””โ”€โ”€ impl

โ”œโ”€โ”€ Default (src/models/user.rs:50)

โ”œโ”€โ”€ Display (src/models/user.rs:60)

โ”œโ”€โ”€ Entity (src/models/user.rs:70)

โ””โ”€โ”€ Validatable (src/models/user.rs:85)

โ€‹```

```

Trait Hierarchy Visualization

```

Trait Hierarchy

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”

โ”‚ Error โ”‚ (std)

โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”‚

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”

โ”‚ โ”‚ โ”‚

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ–ผโ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”

โ”‚ AppError โ”‚ โ”‚ ... โ”‚ โ”‚ DbError โ”‚

โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”‚ โ”‚

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”

โ”‚ AuthError โ”‚ โ”‚ QueryError โ”‚

โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

```

Analysis Features

Coverage Check

```

Trait Implementation Coverage

Trait: Handler (3 required methods)

| Implementor | handle() | name() | priority() | Complete |

|-------------|----------|--------|------------|----------|

| AuthHandler | โœ… | โœ… | โœ… | Yes |

| ApiHandler | โœ… | โœ… | โŒ default | Yes |

| MockHandler | โœ… | โœ… | โœ… | Yes |

```

Blanket Implementations

```

Blanket Implementations

The following blanket impls may apply to your types:

| Trait | Blanket Impl | Applies To |

|-------|--------------|------------|

| From | impl From for T | All types |

| Into | impl Into for T where U: From | Types with From |

| ToString | impl ToString for T | Types with Display |

```

Common Patterns

| User Says | Action |

|-----------|--------|

| "Who implements X?" | goToImplementation on trait |

| "What traits does Y impl?" | Grep for impl * for Y |

| "Show trait hierarchy" | Find super-traits recursively |

| "Is X: Send + Sync?" | Check std trait impls |

Related Skills

| When | See |

|------|-----|

| Navigate to impl | rust-code-navigator |

| Call relationships | rust-call-graph |

| Project structure | rust-symbol-analyzer |

| Safe refactoring | rust-refactor-helper |

More from this repository10

๐ŸŽฏ
m14-mental-model๐ŸŽฏSkill

Applies the M14 mental model framework to enhance decision-making and strategic thinking through structured cognitive analysis.

๐ŸŽฏ
m04-zero-cost๐ŸŽฏSkill

Guides developers in choosing zero-cost abstractions by analyzing type system constraints and performance trade-offs in Rust generics and traits.

๐ŸŽฏ
m10-performance๐ŸŽฏSkill

Optimizes code performance by identifying bottlenecks, measuring impact, and guiding strategic improvements across algorithm, data structure, and memory efficiency.

๐ŸŽฏ
meta-cognition-parallel๐ŸŽฏSkill

Performs parallel three-layer meta-cognitive analysis by forking subagents to simultaneously analyze language mechanics, design choices, and domain constraints, then synthesizing results.

๐ŸŽฏ
unsafe-checker๐ŸŽฏSkill

Identifies and reviews unsafe Rust code patterns, FFI risks, and potential memory unsafety in Rust projects.

๐ŸŽฏ
rust-skill-creator๐ŸŽฏSkill

Dynamically generates Claude skills for Rust crates, standard library modules, and documentation by extracting and processing technical details from specified URLs.

๐ŸŽฏ
coding-guidelines๐ŸŽฏSkill

Provides comprehensive Rust coding guidelines covering naming conventions, best practices, error handling, memory management, concurrency, and code style recommendations.

๐ŸŽฏ
rust-refactor-helper๐ŸŽฏSkill

Performs safe Rust refactoring by analyzing symbol references, checking conflicts, and applying changes across project files using LSP.

๐ŸŽฏ
m03-mutability๐ŸŽฏSkill

Diagnoses and guides resolution of Rust mutability and borrowing conflicts by analyzing ownership, mutation patterns, and thread-safety requirements.

๐ŸŽฏ
m05-type-driven๐ŸŽฏSkill

Explores and demonstrates type-driven development techniques in Rust, showcasing advanced type system features and pattern matching strategies.