Rust Best Practices
A condensed rulebook from five major Rust guides that makes Claude write, review, and refactor idiomatic, robust Rust.
Dev & CodingIntermediate★ 1,386⑂ 63AI score 9/10Last updated: Oct 28, 2026
What it does
- Triggers automatically on any mention of Rust, cargo, crates,
.rsfiles, the borrow checker, lifetimes, traits, clippy, or rustfmt — even without the words "best practices". - Synthesizes the Google Rust Style Guide, Rust API Guidelines, Effective Rust, Rust Design Patterns, and Microsoft's Pragmatic Rust Guidelines, and states which source wins when they disagree.
- Covers 13 areas: ownership and borrowing tactics, naming tables, newtypes and builders, error-type design and panic policy, async/concurrency,
unsafeand FFI, crate/feature/semver hygiene, docs, tests, and performance. - Enforces a pre-delivery loop of
cargo fmt,cargo clippy --all-targets --all-features -- -D warnings,cargo test,cargo doc, plus a final self-review checklist.
Who it's for
- Developers learning Rust or carrying C++/Java/Python habits into it.
- Library authors who must get public API shape, error types, and semver right.
- Teams wanting a consistent, citable Rust review standard.
Example uses
- "Refactor this module" — strips clones that only silence the borrow checker,
&String/&Vec<T>params,get_getters, andboolflags, while preserving public behavior. - "Design the error type for this crate" — produces a
thiserrorenum implementingError + Display + Send + Sync + 'staticwithsource()andFromconversions. - "Review this
unsafeblock" — checks for// SAFETY:comments,# Safetydocs, minimal unsafe scope, and suggests Miri runs.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/morganlinton/BeautifulRust/HEAD/skills/rust-best-practices/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the skills/rust-best-practices folder from the GitHub repo morganlinton/BeautifulRust into my ~/.claude/skills/rust-best-practices/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/morganlinton/BeautifulRust.git /tmp/BeautifulRust && mkdir -p ~/.claude/skills && cp -r /tmp/BeautifulRust/skills/rust-best-practices ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repository:
git clone https://github.com/morganlinton/BeautifulRust.git - Create the skills directory:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r BeautifulRust/skills/rust-best-practices ~/.claude/skills/ - Confirm the
references/folder came along — it holds the digests the skill cites. - Restart Claude Code and run
/skillsto verify it is listed. - Open a Rust project and ask something like "make this function idiomatic". Make sure
cargo,clippy, andrustfmtare installed so the verification commands can run.
View source on GitHub ↗License: MIT