{"slug": "beautifulrust-agent-skills-and-a-clippy-config-that-make-ai-write-idiomatic-rust", "title": "BeautifulRust: Agent Skills and a Clippy Config That Make AI Write Idiomatic Rust", "summary": "Morgan Linton's open-source repository BeautifulRust, which bundles three Agent Skills for writing, reviewing and porting Rust plus a tested clippy lint configuration, reached about 1,200 GitHub stars and 56 forks within days of launch. The MIT-licensed repo works with Claude Code, Codex, Copilot, Cursor and Gemini CLI, and its lints flag issues including unwrap() outside tests, unsafe blocks lacking a // SAFETY: comment, and bool function parameters. The README's benchmark claims come from the maintainer's own evals and are not independently proven.", "body_md": "BeautifulRust is a small repository that tries to fix a familiar problem: coding agents write Rust that compiles but reads like translated Python. It bundles three [Agent Skills](https://explainx.ai/blog/what-are-agent-skills-complete-guide) (one to write Rust, one to review it, one to port other languages) and a clippy lint configuration, and it picked up about 1,200 GitHub stars in the days after launch. It is MIT licensed and, according to its [README](https://github.com/morganlinton/BeautifulRust?ref=explainx), works with Claude Code, Codex, Copilot, Cursor and Gemini CLI.\n\nThis post explains what is in the repo, how to install it, what the clippy rules enforce, and how much weight to give the evaluation numbers the author publishes.\n\n## TL;DR: what readers ask first\n\n| Question | Short answer | \n|---|---|\n| What is it? | Three Agent Skills plus a tested clippy config for Rust | \n| Who made it? | Morgan Linton, as an open repository (about 1.2k stars, 56 forks, 15 commits at the time of writing) | \n| License? | MIT for the repo's own text, digests and scripts; the underlying style guides keep their own licenses | \n| Does it need API keys? | No. Skills are plain instruction files your agent loads; only the optional evals make billed model calls | \n| Works with which agents? | Claude Code, Codex, Copilot, Cursor, Gemini CLI and anything that reads the Agent Skills format | \n| Are the benchmark claims proven? | No. They come from the maintainer's own evals | \n\n## What is inside BeautifulRust?\n\nThe repository has four parts, per the README.\n\n**`skills/`** holds three skill folders, each with a `SKILL.md` and an `evals/` directory. The `rust-best-practices` skill also ships a `references/` folder of paraphrased digests.\n\n**`lints/`** holds `lints.toml`, `clippy.toml` and a small `check/` crate used to confirm every lint actually fires.\n\n**`scripts/`** contains `check-skill.py` and `check-lints.sh`, which validate the skills and the lints.\n\n**`examples/`** includes a sample review report so you can see the output format before installing anything.\n\nThe guidance is a synthesis of five public sources: the Google Rust Style Guide, the Rust API Guidelines, Effective Rust by David Drysdale, Rust Design Patterns, and Microsoft's Pragmatic Rust Guidelines. The README says it bundles paraphrased digests rather than copying text, which matters because those sources carry different licenses (Effective Rust is CC BY-NC-ND, for example).\n\n## The three skills\n\n### rust-best-practices: the write-time skill\n\nThis one loads when an agent writes or changes Rust and nudges it toward idiomatic patterns. It is the always-on layer: the point is that the agent consults the digests before it produces an `unwrap()`-heavy first draft, not after.\n\n### rust-review: a prioritized report\n\nPoint it at a file, a crate or a diff and it writes a report grouped as must fix, should fix and consider. Each finding cites the rule behind it and includes a fix. That structure is the useful part: a review that names its rule is easier to argue with, and easier to turn into a lint later.\n\n### rust-port: migrating from C, C++, Python, Go or JavaScript\n\nThe porting skill ports the original tests first, then the code, and produces a `PORTING.md` documenting decisions. Test-first porting is a sound habit for any migration, and it fits the pattern we described in [GitHub Copilot's Rust migration](https://explainx.ai/blog/github-copilot-runtime-rust-migration-2026), where the hard part is proving the new code behaves like the old.\n\n## The clippy config: guardrails the agent cannot talk its way past\n\nSkills are suggestions an agent can ignore. A lint config is a gate. The `lints/` folder is a drop-in set that, per the README, flags:\n\n- `unwrap()` outside tests\n- `unsafe` blocks without a`// SAFETY:` comment\n- `#[allow]` attributes without a reason\n- `bool` function parameters\n- silent lossy `as` casts\n- missing `# Errors` and`# Panics` documentation sections\n- leftover `dbg!` and unfinished-code macros\n\nTo use it, copy `lints/clippy.toml` next to your `Cargo.toml`, paste the `[lints]` block from `lints/lints.toml` into the manifest, and run:\n\n```\ncargo clippy --all-targets --all-features -- -D warnings\n```\n\nSome lints are marked `[lib]` and can be dropped for applications, and the `allow_attributes` lints need `rust-version = \"1.81\"` or later. `scripts/check-lints.sh` runs the config against the `lints/check/` crate to verify each rule fires, which is a nice touch: a lint config nobody has tested can silently do nothing.\n\nThe combination is the real idea. The skill makes the agent less likely to write `unwrap()`; the lint makes the build fail if it does anyway. This is the same two-layer thinking behind most agent guardrails, and it echoes what we covered in [i-have-adhd](https://explainx.ai/blog/i-have-adhd-skill-action-first-ai-coding-agents-2026): a skill shapes behavior, but only a hard check enforces it.\n\n## How to install it\n\nThe README documents several routes.\n\n| Agent | Command | \n|---|---|\n| Any agent | `npx skills add morganlinton/BeautifulRust` (Node 22.20 or newer;`-g` for user-level,`-a codex` to target one agent) | \n| Claude Code (plugin) | `claude plugin install beautiful-rust --marketplace morganlinton/BeautifulRust` | \n| Claude Code (in session) | `/plugin marketplace add morganlinton/BeautifulRust` , then`/plugin install beautiful-rust@beautiful-rust` | \n| GitHub Copilot | `gh skill install morganlinton/BeautifulRust <skill-name>` (GitHub CLI 2.90 or newer), once per skill | \n| Gemini CLI | `gemini skills install https://github.com/morganlinton/BeautifulRust --path skills/<skill-name>` | \n| Codex, Cursor, others | Clone the repo and copy the `skills/rust-*` folders into`~/.agents/skills/` | \n| claude.ai | Zip each skill folder and upload it under Customize, then Skills (code execution must be on) | \n\nTwo gotchas from the README: Claude Code does not read `~/.agents/skills/`, so use the plugin route there, and you may need to restart the agent before a new skill shows up.\n\nA quick first test: install it, then ask your agent to \"review the diff on this branch with rust-review\" and compare the report to what your human reviewer would flag. If the findings are mostly things clippy would already catch, the lint config alone may be enough for you.\n\n## What do the eval numbers actually show?\n\nThe README reports results from the maintainer's own evals:\n\n| Skill | With the skill | Without | \n|---|---|---|\n| Writing | 29 of 30 assertions passed | 24 of 30 | \n| Review | 11 of 12 | 7 of 12 | \n| Porting | 22 of 22 | 19 of 22 | \n\nThe README adds that the writing skill used roughly a third more tokens.\n\nRead these carefully. They are small samples (12 to 30 assertions), graded by the same person who wrote the skills, and we have not seen an independent reproduction. A five-assertion gap on 30 can be real or noise. The direction is plausible, since a skill that tells a model the rules should improve rule-following, but this is a claim from the author, not a verified benchmark. The sensible reading is: promising, cheap to try, not proven.\n\nThe token cost is worth noting on its own. Skills load into context, and a third more tokens on a writing task adds up across a long session. If you are watching spend, our [Claude Code token efficiency guide](https://explainx.ai/blog/claude-code-token-efficiency-prompt-cache-sessions-guide-2026) covers how prompt caching changes that math.\n\n## A practical rollout plan for a team\n\nAdopting this on a shared codebase goes better in steps than in one pull request.\n\n1. **Baseline first.** Run`cargo clippy --all-targets --all-features -- -D warnings` with the new config on your main branch and record the count of failures per lint. Expect noise from`unwrap()` and missing`# Errors` sections in older code.\n2. **Scope the gate.** Enforce the lints on new and changed files only, using a CI step that diffs against the base branch. Legacy debt then stays visible without blocking every merge.\n3. **Install the skills per developer, not in CI.** Skills guide the agent while it writes. CI should only run the deterministic checks.\n4. **Review the reviewer.** For two weeks, run`rust-review` on pull requests next to your human review and note which findings the humans also raised. Keep the rules that earn their place and delete the ones that generate arguments.\n5. **Re-measure.** Count lint failures on agent-authored commits before and after the skills. That is the one number that tells you whether the skills help your codebase, and it needs no external benchmark.\n\nThis mirrors how teams roll out any style tool: start with measurement, enforce narrowly, and let the data decide which rules stay. The official [Agent Skills specification](https://agentskills.io/?ref=explainx) describes how skills are discovered and loaded, which helps when you debug why a skill did not trigger for a given prompt.\n\n## Where it fits among language-specific skill packs\n\nBeautifulRust follows a pattern we have seen before: a language or platform community packaging its house style as skills. Microsoft's [dotnet-skills repository](https://explainx.ai/blog/dotnet-skills-ai-agents-complete-guide-2026) does this for .NET, and community packs now exist for many stacks. What distinguishes BeautifulRust is the paired lint config and the test crate that proves the lints fire. Most skill packs stop at prose.\n\nIt is also a close cousin of persona-style skill collections such as [founder-skill](https://explainx.ai/blog/founder-skill-eleven-claude-skills-100-buyer-agents-cfo-board-hormozi-thiel-jobs-claims-vs-readme-2026), but aimed at a concrete, checkable engineering task rather than a simulated advisory panel. Checkable is the key word: Rust's compiler and clippy give you ground truth that most skill domains lack.\n\n## Limitations and open questions\n\n- **Self-reported evals.** See above. Run your own before you rely on the numbers.\n- **Opinionated rules.** Banning`unwrap()` outside tests and`bool` parameters is a style choice. Application code and library code differ, which is why some lints are tagged`[lib]` .\n- **Version requirements.** Node 22.20 or newer for the`npx` route, GitHub CLI 2.90 or newer for Copilot, and Rust 1.81 or newer for the`allow_attributes` lints.\n- **Maturity.** Fifteen commits and a young repository mean rules will move. Pin a commit if you need stability.\n- **Eval cost.** Running the repo's evals makes real, billed model calls.\n- **Licensing of sources.** The repo's own content is MIT, but it digests material under other licenses. If you redistribute it inside a product, read the README's source list first.\n\n## Should you install it?\n\nIf you already use an agent for Rust, yes: the clippy config alone is worth ten minutes, and the skills cost nothing to try. Install the lints first, see how many warnings your agent's last commit produces, then add the skills and check whether that number drops. That before-and-after on your own code is a better benchmark than any README table.\n\nIf you work in another language, the useful lesson transfers: pair a skill with a deterministic check, and measure the difference yourself.\n\n## Related reading\n\n*Details such as star counts, version requirements and install commands are accurate as of October 27, 2026 and may change as the repository evolves.*", "url": "https://wpnews.pro/news/beautifulrust-agent-skills-and-a-clippy-config-that-make-ai-write-idiomatic-rust", "canonical_source": "https://explainx.ai/blog/beautifulrust-agent-skills-rust-clippy-config-claude-code-codex-guide-2026?utm_source=rss&utm_medium=feed&utm_campaign=blog", "published_at": "2026-10-27 00:00:00+00:00", "updated_at": "2026-10-27 08:41:16.270321+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "artificial-intelligence"], "entities": ["BeautifulRust", "Morgan Linton", "Claude Code", "Codex", "GitHub Copilot", "Cursor", "Gemini CLI", "clippy"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/beautifulrust-agent-skills-and-a-clippy-config-that-make-ai-write-idiomatic-rust", "markdown": "https://wpnews.pro/news/beautifulrust-agent-skills-and-a-clippy-config-that-make-ai-write-idiomatic-rust.md", "text": "https://wpnews.pro/news/beautifulrust-agent-skills-and-a-clippy-config-that-make-ai-write-idiomatic-rust.txt", "jsonld": "https://wpnews.pro/news/beautifulrust-agent-skills-and-a-clippy-config-that-make-ai-write-idiomatic-rust.jsonld"}}