/fuse-rust:rust-core-languagefrom fuse-rust
Guides writing idiomatic Rust (edition 2024) with ownership/borrowing design, and fixes common LLM-generated pitfalls like clone tax, unwrap infestation, and indexed loops.
Ships in fuse-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.
Read when SKILL.md points to them.
It also covers correcting the recurring failure modes of machine-generated Rust: the clone tax (cloning to silence the borrow checker instead of redesigning ownership), unwrap/expect infestation, String vs &str misuse, indexed loops instead of iterators, and over-annotated lifetimes the compiler could elide.
Out of scope: error-type design (thiserror vs anyhow) belongs to rust-error-handling; async runtime questions belong to rust-async-concurrency; SOLID/file-layout rules belong to fuse-solid:solid-rust.
Idiomatic Rust for stable 1.99.1, edition 2024. This skill covers what the compiler will not catch for you: ownership design that avoids gratuitous cloning, and the recurring failure modes of machine-generated Rust.
edition in Cargo.toml
and its existing ownership conventions before adding code.cargo clippy.Never state a stabilization version from memory — verify against
doc.rust-lang.org/releases.html.
| Topic | When |
|---|---|
| Edition 2024 features | Setting up a crate, using let chains / async closures |
| Ownership & borrowing | Designing function signatures and data flow |
| LLM pitfalls | Reviewing or repairing generated Rust before merge |
&T / &str / &[T] in parameters unless the
function must keep the value. See ownership-borrowing.md..clone() needs a reason. A clone to silence a borrow-checker error is a
design smell (the "clone tax"). Redesign ownership first; clone only when a
second owner genuinely exists..unwrap() / .expect() on fallible values without a written justification.
Grep for them before merge. Prefer ?, match, or a documented invariant.Arc::clone(&x) over x.clone() for reference-counted handles — it makes the
cheap pointer-copy explicit and distinguishes it from a deep clone.iter()/map()/filter()/collect() to
for i in 0..len { v[i] } — no bounds-check noise, no off-by-one.if let A = x && let B = y && cond) stabilized in 1.88.0
(2025-06-26), edition 2024 only — depends on the if let temporary-scope change.async || { .. }) stabilized in 1.85.0.build.warnings
(CARGO_BUILD_WARNINGS=deny in CI, no build-cache invalidation); linker output is shown
via the linker_messages lint (warn by default); integer highest_one/lowest_one/bit_width.{integer}::format_into + core::fmt::NumBuffer (std
replacement for itoa); f32/f64 algebraic_* methods; str::strip_circumfix,
str::substr_range, String::from_utf16le/from_utf16be.#[my_macro] mod foo;
(outlined modules inside a custom attribute/derive macro) stabilized; allow-by-default
raw_borrows_via_references lint; UnsafeCell contents guaranteed accessible without get.
1.99.1 (2026-10-15) fixes an x86_64 FFI bool return-value miscompilation.gen blocks are UNSTABLE — feature gate #![feature(gen_blocks)], tracking
issue rust-lang/rust#117078, RFC #3513. Do NOT use on stable; the returned
iterators are not yet fused and the syntax may still change.| Topic | Reference | Load when |
|---|---|---|
| Edition 2024 | edition-2024.md | Configuring edition, using let chains / async closures, checking feature stability |
| Ownership & borrowing | ownership-borrowing.md | Choosing owned vs borrowed params, designing lifetimes, sharing with Rc/Arc |
| LLM pitfalls | llm-pitfalls.md | Reviewing generated Rust for clone tax, unwrap infestation, String/&str, indexed loops |
| Template | Load when |
|---|---|
| idiomatic-code.md | Need copy-paste examples of borrow-first signatures, iterator chains, and let chains |
Cargo.toml declares edition = "2024" if edition-2024 features are used.clone() added purely to satisfy the borrow checker.unwrap()/.expect() has a justifying comment or is provably infalliblecargo clippy clean, sniper passedWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub fusengine/claude-plugins --plugin fuse-rust7 skills in this plugin
/rust-async-concurrencyUse when writing async Rust — spawning tasks, sharing state across tasks/threads, choosing channels vs mutexes, or hitting Send-bound errors with async traits. Not for HTTP service structure (rust-web-backend) or sync-only ownership (rust-core-language)./rust-ecosystem-cratesUse when choosing crates for a Rust project — serialization, CLI, async runtime, web, database, HTTP client, error handling, observability. Not for API usage details of an already-chosen crate./rust-error-handlingUse when designing Rust error handling — thiserror vs anyhow, typed error enums,Other plugins' skills for the same job