/rust-skills:rust-stablefrom rust-skills
Implements and explains stable Rust language semantics including ownership, borrowing, lifetimes, traits, generics, pattern matching, closures, error propagation, and Edition differences. Verifies toolchain and MSRV before providing version-sensitive code.
Ships in rust-skills. 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.
Read when SKILL.md points to them.
Use this skill for language semantics: ownership, borrowing, lifetimes, traits, generics, pattern matching, error propagation, and Edition differences. First verify the project's actual toolchain and Minimum Supported Rust Version (MSRV).
For standard-library API selection (which collection, which smart pointer, which string type, which I/O trait), use rust-stdlib. For concrete pattern examples ("how do I write X"), use rust-by-example.
rustc --version --verbose and cargo --version.rust-version field in rust-toolchain.toml, rust-toolchain, and Cargo.toml.Current Offline Baseline: Rust 1.97.1 (released July 16, 2026). This is a dated repository baseline and does not update automatically.
struct, enum, pattern matching, traits, generics, and associated types.Option, Result error propagation, and custom errors (the language mechanism).Fn/FnMut/FnOnce), attribute syntax, format strings (the language mechanism).pub/pub(crate)/pub(super).unsafe extern, RPIT capture, match ergonomics).| User Intent | Preferred Skill |
|---|---|
| "Which std collection / smart pointer / string type should I use?" | rust-stdlib |
| "How do I write X in Rust?" (concrete pattern) | rust-by-example |
| API design (naming, traits, future-proofing, ~100 C-* rules) | rust-api-design |
| Project layout, module trees, workspace structure | rust-workspace, rust-module-layout |
| Cargo.toml dependencies, features, profiles, publishing | rust-cargo-build |
| Dependency governance, supply chain, cargo-deny | rust-dependencies |
| Semver, breaking-change classification, publish workflow | rust-semver |
| Java Maven/Gradle project migration and component replacement | rust-java-migration |
| Java-to-Rust source-test parity, Rust obligations, and migration test audit | rust-java-migration-testing |
| Threads, locks, atomics, channels, Tokio | rust-concurrency |
| Unit tests, integration tests, doctests, coverage | rust-testing |
| Raw pointers, memory layout, FFI, Miri | rust-unsafe-ffi |
| UniFFI-generated Kotlin, Swift, Python, Ruby, or WASM bindings | rust-uniffi-building |
| macro_rules, derive, procedural macros | rust-macros |
| Command contracts, standard streams, exit codes, CLI | rust-cli |
| Server-side HTTP APIs, handlers, middleware | rust-web |
| SQL/ORMs, schemas, migrations, transactions, pools | rust-database |
| Web authentication, authorization, sessions, tokens | rust-web-security |
| Bare-metal firmware, no_std drivers, hardware validation | rust-embedded |
| Risk, correctness, API and safety review | rust-code-review |
| rustfmt, Clippy, Edition migration, lint policy | rust-style-clippy |
Do not replace the complete workflow of domain-specific skills with this skill.
cargo fmt --check, cargo check (with all targets/features), and relevant tests.&T / &mut T; clone only when ownership transfer is required or independent lifetimes are needed.unsafe as a bypass for borrowing checks first prove that safe abstractions cannot express the requirement.since confirm it.Run validation gates from lowest to highest risk:
cargo fmt --all --check
cargo check --all-targets --all-features
cargo test --all-targets --all-features
cargo clippy --all-targets --all-features -- -D warnings
If the project does not support --all-features or contains platform-specific targets, record reasons and use a defined feature/target matrix. For unsafe code, add cargo miri test; for MSRV issues, repeat cargo check and tests on the declared minimum toolchain.
rust-stdlib (its references/ covers collections, smart-pointers, string-types, iterators, I/O, interior-mutability, combinators, std-concurrency, process-and-fs, std-module-index)rust-by-example (its references/ covers conversions, flow-control, closures, modules, generics-traits, error-handling, attributes, unsafe, procedural-macros-overview, inline-asm, migrating-from-other-languages)rust-api-design; Cargo manifest → rust-cargo-build; dependency governance → rust-dependenciesexamples/ownership-patterns.md)examples/collections-patterns.md)examples/trait-design-patterns.md)examples/error-handling-patterns.md)examples/golden-basic/: Minimal golden examples compiled by repository CI.cargo check, omitting tests, examples, benchmarks, or feature combinations.clone, wrapping in Arc<Mutex<_>>, or invoking unsafe solely to avoid borrowing errors..await calls in async code.This skill provides local knowledge, examples, and validation workflows only. It does not collect, store, or transmit user data. Access to official documentation must comply with the user's network access requirements prior to accessing public resources.
agents/openai.yaml (opens in a new tab)examples/collections-patterns.md (opens in a new tab)examples/error-handling-patterns.md (opens in a new tab)examples/golden-basic/Cargo.toml (opens in a new tab)examples/golden-basic/src/lib.rs (opens in a new tab)examples/ownership-patterns.md (opens in a new tab)examples/quickstart-workflows.md (opens in a new tab)examples/trait-design-patterns.md (opens in a new tab)references/conversions.md (opens in a new tab)references/errors.md (opens in a new tab)references/fmt.md (opens in a new tab)references/fs.md (opens in a new tab)references/hashmap.md (opens in a new tab)references/interior-mutability.md (opens in a new tab)references/io.md (opens in a new tab)references/iterators.md (opens in a new tab)references/ownership-lifetimes.md (opens in a new tab)references/path.md (opens in a new tab)references/patterns.md (opens in a new tab)references/release-current.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
29 skills in this plugin
/rust-api-designDesign Rust library APIs that follow the Rust API Guidelines — naming (C-CASE, C-CONV, C-GETTER), interop traits (C-COMMON-TRAITS, C-CONVERT, C-ITER, C-SERDE), predictability (C-INTUITIVE, C-CONST), flexibility (C-GENERIC, C-NEWTYPE, C-EXT), type safety (C-BOOL, C-NONZERO, C-WRAPPER, C-STR), dependability (C-PANIC, C-UNWRAP), debuggability (C-DEBUG), and future-proofing (C-SEALED, C-STRUCT-FIELD, C-NON-EXHAUSTIVE). Use when users design a public crate API, choose between generics/concrete/newtype, decide trait bounds, hide implementation, avoid breakage, or ask "what is idiomatic Rust API design"; hand semver and publish workflow to rust-semver, lint config to rust-style-clippy, and in-crate layout to rust-module-layout./rust-by-exampleShow Rust patterns through short compilable examples — type conversions (From/Into/TryFrom/as/Deref), flow control (if let/while let/match/loop), functions and closures (Fn/FnMut/FnOnce, captures), modules (mod/use/pub/super/self), generics and traits (bounds/associated types/trait objects), error handling (?/Result/thiserror/anyhow), attributes (derive/cfg/inline/allow), unsafe (raw pointers/unions/ABI), procedural macros (derive/attribute/function-like), and inline asm. Use when users ask "how do I write X in Rust", need a concrete pattern with copy-pasteable code, or are migrating from Java/Python/Go/C++ and want the Rust equivalent; hand architecture decisions to rust-api-design/rust-workspace, std API selection to rust-stdlib, and async runtime to rust-concurrency.Generated from the plugin's indexed repository (full-stack-skills/rust-skills) — no native marketplace selected
npx claudepluginhub p/full-stack-skills-rust-skillsOther plugins' skills for the same job