AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

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, .rs files, 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, unsafe and 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

  1. "Refactor this module" — strips clones that only silence the borrow checker, &String/&Vec<T> params, get_ getters, and bool flags, while preserving public behavior.
  2. "Design the error type for this crate" — produces a thiserror enum implementing Error + Display + Send + Sync + 'static with source() and From conversions.
  3. "Review this unsafe block" — checks for // SAFETY: comments, # Safety docs, 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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download 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.

  1. Open a terminal.
  2. Clone the repository: git clone https://github.com/morganlinton/BeautifulRust.git
  3. Create the skills directory: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r BeautifulRust/skills/rust-best-practices ~/.claude/skills/
  5. Confirm the references/ folder came along — it holds the digests the skill cites.
  6. Restart Claude Code and run /skills to verify it is listed.
  7. Open a Rust project and ask something like "make this function idiomatic". Make sure cargo, clippy, and rustfmt are installed so the verification commands can run.