rust-core-language
БесплатноБез исполняемых скриптовНе проверенUse when writing or reviewing idiomatic Rust — edition 2024 ownership/borrowing design, or fixing LLM pitfalls (clone tax, unwrap infestation, indexed loops)…
от Fusengine★ 36 звёзд на GitHubОб этом скилле
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.
Rust Core Language
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.
Agent Workflow (MANDATORY)
- fuse-ai-pilot:research-expert — confirm the current stable version and any feature's stabilization release before relying on it (versions move fast).
- fuse-ai-pilot:explore-codebase — read the crate's
editioninCargo.tomland its existing ownership conventions before adding code. - After writing code, run fuse-ai-pilot:sniper and
cargo clippy.
Never state a stabilization version from memory — verify against
doc.rust-lang.org/releases.html.
Overview
| 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 |
Critical Rules
- Borrow before you own. Take
&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.- No
.unwrap()/.expect()on fallible values without a written justification. Grep for them before merge. Prefer?,match, or a documented invariant. Arc::clone(&x)overx.clone()for reference-counted handles — it makes the cheap pointer-copy explicit and distinguishes it from a deep clone.- Iterators over indexed loops. Prefer
iter()/map()/filter()/collect()tofor i in 0..len { v[i] }— no bounds-check noise, no off-by-one. - Let elision work. Do not annotate lifetimes the compiler can infer.
Verified Facts (source-checked)
- Edition 2024 stabilized in Rust 1.85.0 (2025-02-20), RFC #3501.
- Let chains (
if let A = x && let B = y && cond) stabilized in 1.88.0 (2025-06-26), edition 2024 only — depends on theif lettemporary-scope change. - Async closures (
async || { .. }) stabilized in 1.85.0. - Rust 1.97.0 (2026-07-09): v0 symbol mangling is the default; Cargo
build.warnings(CARGO_BUILD_WARNINGS=denyin CI, no build-cache invalidation); linker output is shown via thelinker_messageslint (warn by default); integerhighest_one/lowest_one/bit_width. - Rust 1.98.0 (2026-08-20):
{integer}::format_into+core::fmt::NumBuffer(std replacement foritoa);f32/f64algebraic_*methods;str::strip_circumfix,str::substr_range,String::from_utf16le/from_utf16be. - Rust 1.99.0 (2026-10-01): C-variadic function definitions stabilized;
#[my_macro] mod foo;(outlined modules inside a custom attribute/derive macro) stabilized; allow-by-defaultraw_borrows_via_referenceslint;UnsafeCellcontents guaranteed accessible withoutget. 1.99.1 (2026-10-15) fixes an x86_64 FFIboolreturn-value miscompilation. genblocks 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.
Reference Guide
Concepts
| 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 |
Templates
| Template | Load when |
|---|---|
| idiomatic-code.md | Need copy-paste examples of borrow-first signatures, iterator chains, and let chains |
Validation Checklist
- [ ]
Установить rust-core-language в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл rust-core-language?
Use when writing or reviewing idiomatic Rust — edition 2024 ownership/borrowing design, or fixing LLM pitfalls (clone tax, unwrap infestation, indexed loops). Not for error-type design (rust-error-handling) or SOLID layout (solid-rust).
Как установить скилл rust-core-language?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rust-core-language запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic