Rust Type Driven
Type-driven design expert covering newtype pattern, type state, PhantomData, marker traits, builder pattern, compile-time validation, sealed traits, and zero-sized types (ZST).
Install
npx skills add huiali/rust-skills --skill rust-type-drivengit clone --depth 1 https://github.com/huiali/rust-skills.git /tmp/rust-skills
mkdir -p ~/.claude/skills
cp -r /tmp/rust-skills/.codex/skills/rust-type-driven ~/.claude/skills/rust-type-drivenPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
## Solution Patterns
### Pattern 1: Newtype Pattern
```rust
// ❌ Primitive types can be confused
fn process_user(id: u64) { ... }
fn process_order(id: u64) { ... }
// Easy to mix up:
process_order(user_id); // Compiles but wrong!
// ✅ Type-safe newtypes
struct UserId(u64);
struct OrderId(u64);
fn process_user(id: UserId) { ... }
fn process_order(id: OrderId) { ... }
// Compiler prevents:
// process_order(user_id); // Compile error!
```
**When to use:**
- Domain-specific identifiers
- Values with different semantics but same representation
- Adding type-level validation
### Pattern 2: Type State PatternDetails
- Skill name
rust-type-driven- Repository
- huiali/rust-skills
- Path
.codex/skills/rust-type-driven/SKILL.md- License
- MIT
- Repo updated
- 9 February 2026
FAQ
What does the Rust Type Driven skill do?
Type-driven design expert covering newtype pattern, type state, PhantomData, marker traits, builder pattern, compile-time validation, sealed traits, and zero-sized types (ZST).
How do I install the Rust Type Driven skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add huiali/rust-skills --skill rust-type-driven. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Rust Type Driven popular?
It lives in huiali/rust-skills, which has 49 GitHub stars and 7 forks.
Related skills
Rust Actor
49huiali/rust-skills
Actor model expert covering message passing, state isolation, supervision trees, deadlock prevention, fault tolerance, Actix framework, and Erlang-style concurrency patterns.
Rust Anti Pattern
49huiali/rust-skills
Rust anti-patterns and common mistakes expert. Handles code review issues with clone abuse, unwrap in production, String misuse, index loops, and refactoring guidance.
Rust Async
49huiali/rust-skills
Advanced async patterns expert. Handles Stream processing, backpressure control, select/join operations, cancellation, Future trait implementation, and async runtime optimization.
Rust Unsafe
49huiali/rust-skills
Unsafe code and FFI expert covering raw pointers (*mut, *const), FFI patterns, transmute, union, #[repr(C)], SAFETY comments, soundness rules, and undefined behavior prevention.
Rust Skill Index
49huiali/rust-skills
Rust 技能索引。提供所有技能的快速导航和查询入口。触发词:skill, index, 技能, 索引, 目录--- # Rust 技能索引 > **当前共 38 个技能**,完整内容请参见根目录 `SKILL.md`
Rust Web
49huiali/rust-skills
Rust web development expert covering HTTP frameworks (axum, actix), REST API design, handler patterns, state management, middleware, database integration, and domain-driven architecture.
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.