/rust:rust-modulesfrom rust
Use for any Rust module work: planning, creating, splitting, moving, discussing, or reviewing modules and files: mod declarations, pub use facades, crate structure, mod.rs cleanup, type co-location, and naming. Pair with rust-quality for code patterns inside modules.
Ships in rust. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Rules for file organization. For code quality within modules, see rust-quality. Do not load rust-review unless reviewing a diff.
gate-probes routes to this skill for Rust module layout changes. Run gate-probes first for universal scope and reviewability checks before applying module layout rules.
No mod.rs. Use the modern sibling pattern:
src/
├── lib.rs
├── billing.rs ← declares `mod invoice;`
└── billing/
└── invoice.rs
Internal trees can nest freely. Public API must be flat. Re-export in the parent:
// billing.rs
mod invoice;
pub use invoice::{Invoice, InvoiceState};
Callers write use crate::billing::Invoice, not use crate::billing::invoice::Invoice.
Tightly coupled types share a file. Invoice, InvoiceState, InvoiceError all belong in invoice.rs — not split across models.rs, enums.rs, errors.rs.
Module already provides namespace context. Don't repeat it:
billing::Invoice not billing::BillingInvoiceconfig::Source not config::ConfigSourceIf an existing codebase uses mod.rs, match that pattern when editing. Only modernize on explicit refactor requests — not drive-by fixes.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub shearerbeard/agent-skills --plugin rust6 skills in this plugin
/rust-asyncUse when writing, reviewing, or designing async and explicitly
multithreaded Rust code — "async function", "tokio", "spawn a
task", "Send+Sync", "Send + Sync", "multithreaded", "blocking
the executor", "tokio::spawn", "spawn_blocking", "async/await",
"async Rust". Contains cooperative scheduling rules, Send +
'static bounds, spawn_blocking vs rayon vs dedicated threads,
std::sync::Mutex vs tokio::sync::Mutex, async Drop patterns,
and channel/stream guidance. Pair with rust-design for type
modeling and rust-quality for anti-pattern prevention.
/rust-designUse when writing, designing, or reviewing Rust types and domain
models — "design a Rust type", "model this in Rust", "Rust ADT",
"state machine", "make illegal states unrepresentable",
"constrained type", "typestate", "newtype design", "sketch type
signatures", "write a Rust struct", "review these Rust types".
Also use when authoring `.rs` files that introduce a new struct
or enum, or when deciding a public API shape.
Contains ADT-first workflow, constrained type patterns, railway-
oriented programming, match semantics, 6-step clone avoidance,
and ownership restructuring. Pair with rust-quality for anti-pattern
prevention and rust-review for gate-level review.
/rust-qualityUse for any Rust work: writing, planning, reviewing, or editing `.rs` files,
Cargo.toml, or clippy fixes. Self-correct against LLM-specific failure modes
the model tends to repeat: clone escapes to satisfy the borrow checker,
speculative fallbacks for failure modes that don't exist, god modules,
verbose match chains, and weak error modeling. Provides concrete reference
patterns (transpose, Arc::clone, newtypes, parse-don't-validate, sealed
traits) and routes type modeling to rust-design. For formal reviews, use rust-review;
it applies these rules as a gate checklist.
/rust-reviewUse for Rust reviews: .rs diffs, PRs with Rust changes, Cargo.toml changes,
and clippy/pre-commit checks. Run gate-probes first for universal checks, then
these Rust-specific probes. Always load before presenting Rust code review
findings to the user.
/typed-holesUse when the user says "typed holes", "todo!() skeleton", "type
skeleton", "compile the type surface", "skeleton commit", "design
panel", "golden frame", "whole-frame snapshot", "pre-failing test",
"write the tests first from the spec", "byte-identical refactor", or
asks how to start a Rust feature, module, or rewrite before writing
any behavior. Also use when planning how to split Rust work across
cards, issues, or delegated executors. Contains the two-layer
practice: Layer 1 lays the full Rust type surface with todo!() bodies
that must pass cargo check and clippy as their own commit, gated by a
two-reviewer design panel; Layer 2 writes whole-frame golden tests
from the spec so they fail on arrival. Also covers the #[expect]
marker convention, the type-to-business-rule map, the coverage
manifest, fill order, and the known limits of both signals. Pair with
rust-design for the type modeling itself, rust-quality for
anti-patterns in the filled bodies, and gate-probes at each gate.