LR

leonardomso/rust-skills

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

653 stars 品質 68 トレンド 33MIT

レオナルドムソ/ラストスキルは、[[T0]からインポートされたエージェントスキル候補です。

概要

レオナルドムソ/ラストスキルは、[[T0]からインポートされたエージェントスキル候補です。

概要(AI 翻訳)

265のRustルールは、AIコーディングエージェントがより良いコードを書くために使えます。現在のRust 1.96(2024年版)です。

Claude Code、Cursor、Windsurf、Copilot、Codex、Aider、Zed、Amp、Cline、そしてスキルをサポートするほぼすべてのエージェントに対応しています。

なぜ

箱から出して、コーディングエージェントは平均のRustを書きます — 借りチェッカーを回避するためにクローンし、.unwrap()すべてを回避し、impl Traitで済むところでBox に手を伸ばします。これらのルールは、専門家のRustが実際にどのようなものかをエンコードしています:慣用的で、速く、安全です。各ルールは小さく焦点を絞っているため、エージェントは目の前のコードに関連するものだけを取り込みます。

インストール

それだけです。CLIはどのエージェントを持っているかを特定し、スキルを適切な場所にインストールします。

使い方

設置後は、代理店に確認してください:

エージェントは関連するルールを読み込み、あなたのコードに適用します。

実際にそれを見てみろ

エージェントに次のような関数を確認してもらうよう依頼します:

これらのルールを読み込むと、&strを取ることを知り、&Stringを取ること、 不要なclone()と割り当てを返し、パニックに陥る代わりにOptionを返します:

ここに何があるんだ

265のルールが26のカテゴリーに分かれています:

カテゴリ ルール 内容

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Rust Skills

265 Rust rules your AI coding agent can use to write better code. Current for Rust 1.96 (2024 edition).

Works with Claude Code, Cursor, Windsurf, Copilot, Codex, Aider, Zed, Amp, Cline, and pretty much any other agent that supports skills.

Why

Out of the box, coding agents write average Rust — they clone to dodge the borrow checker, .unwrap() everything, and reach for Box when impl Trait would do. These rules encode what expert Rust actually looks like: idiomatic, fast, and safe. Each rule is small and focused, so the agent pulls in only what’s relevant to the code in front of it.

Install

npx add-skill leonardomso/rust-skills

That’s it. The CLI figures out which agents you have and installs the skill to the right place.

How to use it

After installing, just ask your agent:

/rust-skills review this function
/rust-skills is my error handling idiomatic?
/rust-skills check for memory issues
/rust-skills is this unsafe block sound?

The agent loads the relevant rules and applies them to your code.

See it in action

Ask the agent to review a function like this:

// before
fn first_word(s: &String) -> String {
    s.clone().split_whitespace().next().unwrap().to_string()
}

With these rules loaded, it knows to take &str instead of &String, drop the needless clone() and allocation, and return an Option instead of panicking:

// after — applies own-slice-over-vec, own-borrow-over-clone, anti-unwrap-abuse
fn first_word(s: &str) -> Option {
    s.split_whitespace().next()
}

What’s in here

265 rules split into 26 categories:

Category Rules What it covers
Ownership & Borrowing 12 When to borrow vs clone, Arc/Rc, lifetimes
Error Handling 12 thiserror for libs, anyhow for apps, the ? operator
Memory 17 SmallVec, arenas, avoiding allocations, mem::take, drop order
Unsafe Code 7 SAFETY: comments, Miri, MaybeUninit, 2024-edition unsafe
API Design 17 Builder pattern, newtypes, sealed traits, FromIterator
Async 18 Tokio patterns, channels, async fn in traits, cancel safety
Concurrency 4 rayon, scoped threads, atomic ordering, thread-locals
Optimization 12 LTO, inlining, PGO, SIMD
Numeric & Arithmetic 5 Overflow handling, as vs TryFrom, float compare, NonZero
Type Safety 13 Newtypes, parse don’t validate, Deref, Display/Debug
Trait & Generics Design 6 dyn vs generic, associated types, blanket impls, object safety, orphan rule
GitHub で README 全文を見る

推奨ツール

別のキーワードを試すか、フィルタを外してください。

インストール

npx skillfish add leonardomso/rust-skills
MCP 初心者?mcpskill.org のガイドから始めましょう →