# AI use cases for Beautiful Rust (morganlinton/BeautifulRust)

Repo: [morganlinton/BeautifulRust](https://github.com/morganlinton/BeautifulRust) | Use cases: 3 | Page: https://dedupedai.com/use-cases/morganlinton-beautifulrust/

Beautiful Rust is three Agent Skills and a clippy lints config that teach coding agents to write, review, port and enforce idiomatic Rust: rust-best-practices, rust-review and rust-port. The guidance is distilled from the Google Rust Style Guide, the Rust API Guidelines, Effective Rust, Rust Design Patterns and Microsoft's Pragmatic Rust Guidelines, and works with Claude Code, Codex, Copilot, Cursor and Gemini CLI.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Make your coding agent write idiomatic Rust by default: https://dedupedai.com/use-cases/morganlinton-beautifulrust/make-your-coding-agent-write-idiomatic-rust/
- Port a Python, Go or C module to Rust with the tests ported first: https://dedupedai.com/use-cases/morganlinton-beautifulrust/port-a-python-or-go-module-to-rust-with-tests-first/
- Review a Rust PR and enforce the rules in CI with clippy: https://dedupedai.com/use-cases/morganlinton-beautifulrust/enforce-rust-rules-in-ci-with-the-clippy-lints/

## How to make your coding agent write idiomatic Rust by default with Beautiful Rust

Repo: [morganlinton/BeautifulRust](https://github.com/morganlinton/BeautifulRust) | Difficulty: Beginner | Time: 10 minutes | Basis: From the README

Install the three skills so every agent edit to Rust follows established style and API guidelines.

**Who it is for:** A developer whose agent writes Rust that compiles but uses public fields, unwrap() and missing error docs.

**The problem:** Agent-written Rust often works but is not code you would accept in review.

**The outcome:** Agent changes that keep fields private, document failure modes and use safe doc examples.

### Steps

1. Run `npx skills add morganlinton/BeautifulRust` (add -g to install for your user)
2. Or in Claude Code run `claude plugin install beautiful-rust --marketplace morganlinton/BeautifulRust`
3. Ask the agent for a Rust change; rust-best-practices loads on its own
4. Check the result for private fields, `# Errors` docs and no unwrap() in doc examples

### Prompt to paste into your agent

```text
Install morganlinton/BeautifulRust and implement <feature> in this crate following rust-best-practices. Keep fields private, document every error, and run cargo fmt, clippy and tests before handing back.
```

### Caveat

This card is written from the morganlinton/BeautifulRust README, not from a test run by Deduped. Before you start, make sure you have a Rust project and stable Rust. Check the repo for newer instructions before you rely on these steps.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/morganlinton-beautifulrust/make-your-coding-agent-write-idiomatic-rust/

## How to port a Python, Go or C module to Rust with the tests ported first with Beautiful Rust

Repo: [morganlinton/BeautifulRust](https://github.com/morganlinton/BeautifulRust) | Difficulty: Advanced | Time: half a day | Basis: From the README

Use rust-port to move code to Rust while proving the behavior matches.

**Who it is for:** A team rewriting a slow Python or Go module in Rust who cannot afford behavior changes.

**The problem:** Rewrites drift from the original because nobody checks that both versions behave the same.

**The outcome:** An idiomatic Rust port whose ported tests pass against the same cases as the original.

### Steps

1. Install the skills; review and port lean on rust-best-practices, so install all three
2. Point the agent at the source module in C, C++, Python, Go or JavaScript
3. Let rust-port port the original tests first
4. Have it port the code until `cargo test` and clippy pass
5. Compare outputs of the old and new versions on real inputs

### Prompt to paste into your agent

```text
Use the rust-port skill from morganlinton/BeautifulRust to port <module> from <language> to Rust. Port the tests first, then the code, and do not finish until cargo test and clippy pass.
```

### Caveat

This card is written from the morganlinton/BeautifulRust README, not from a test run by Deduped. Before you start, make sure you have a Rust project and stable Rust. Check the repo for newer instructions before you rely on these steps.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/morganlinton-beautifulrust/port-a-python-or-go-module-to-rust-with-tests-first/

## How to review a Rust PR and enforce the rules in CI with clippy with Beautiful Rust

Repo: [morganlinton/BeautifulRust](https://github.com/morganlinton/BeautifulRust) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Run rust-review on a diff, then add the drop-in clippy config so the same rules hold in CI.

**Who it is for:** A maintainer who wants agent reviews that cite rules and a CI gate that keeps them.

**The problem:** Style guidance in reviews slips back in a week later without a machine check.

**The outcome:** A prioritized review report with a fix per finding, and CI that fails on the machine-checkable rules.

### Steps

1. Ask the agent to run rust-review on a file, crate or diff; it runs cargo fmt and clippy and cites the rule each finding breaks
2. Copy lints/clippy.toml next to your Cargo.toml and paste the [lints] block from lints/lints.toml into it
3. Run `cargo clippy --all-targets --all-features -- -D warnings`
4. Add that command to CI so violations fail the build

### Prompt to paste into your agent

```text
Run the rust-review skill from morganlinton/BeautifulRust on <PR or diff>, then add its lints/clippy.toml and [lints] block to this crate and make `cargo clippy --all-targets --all-features -- -D warnings` pass.
```

### Caveat

This card is written from the morganlinton/BeautifulRust README, not from a test run by Deduped. Before you start, make sure you have a Rust project and stable Rust. Check the repo for newer instructions before you rely on these steps.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/morganlinton-beautifulrust/enforce-rust-rules-in-ci-with-the-clippy-lints/
