← All finds

Find No. 025 · Nov 1, 2026 · 2 min read

A Rust skill backfires on Bevy

BeautifulRust's benchmark logs a regression: on a Bevy task, Claude scored 7/10 with the skills against 10/10 without. Its `Regen` component got private fields, getters and a panicking constructor. The task wanted plain data.

morganlinton/BeautifulRust
Screenshot of BeautifulRust

BeautifulRust is a set of three Agent Skills and a clippy config that push coding agents toward idiomatic Rust. The skills cover writing, reviewing, and porting. The problem is familiar: an agent asked for a small library returns code that compiles but has public fields, no # Errors docs, and unwrap() in its doc examples. The repo says the skills change that, and it ships a lints config to enforce what a machine can check.

How it works

The three skills are rust-best-practices, rust-review, and rust-port. The writing skill is a SKILL.md of about 500 lines, distilled from five sources: the Google Rust Style Guide, the Rust API Guidelines, Effective Rust, Rust Design Patterns, and Microsoft's Pragmatic Rust Guidelines. A digest of each is bundled so the agent can read the original reasoning. Where the sources disagree, the skill picks a side and says why.

The review skill runs cargo fmt, clippy, and the tests when a toolchain is available. It writes a report in three tiers: must fix, should fix, and consider. Each finding cites a file:line, the rule it breaks, and a fix.

The port skill ports the original tests first, then designs a Rust API instead of transliterating the old one. Each port comes with a PORTING.md listing every deliberate difference.

There is also a Bevy reference. It names conventions to leave alone, such as system parameters taken by value, and lists ECS bugs that compile cleanly.

The lints/ folder is a [lints] block plus a clippy.toml. It flags unwrap() outside tests, unsafe blocks without a // SAFETY: comment, bool parameters, and lossy as casts, among others. A script runs clippy on a crate with one deliberate violation per lint, so a lint that stops firing fails the check.

Try it

npx skills add morganlinton/BeautifulRust

For Claude Code, the README also gives a plugin route:

claude plugin install beautiful-rust --marketplace morganlinton/BeautifulRust

For the lints, copy lints/clippy.toml next to your Cargo.toml, paste in the [lints] block from lints/lints.toml, then run cargo clippy --all-targets --all-features -- -D warnings. The README lists separate install steps for Copilot, Gemini CLI, Codex, Cursor, and claude.ai.

Worth knowing

The repo includes a cross-agent benchmark, and it is the README's own. Across eight tasks, one run per configuration, Claude scored 72 of 85 assertions without the skills and 80 with them. Codex went from 53 to 76. A Claude model did the grading, though the labels were blind.

The benchmark also reports a regression. On a Bevy feature task, Claude scored 7 of 10 with the skills against 10 of 10 without. The README says the Bevy reference's wording was partly to blame and was changed after that run.

Codex's refactor task improved least, from 4 of 12 to 6 of 12. The skills also cost tokens. The benchmark puts it at about 26% more per task for Claude and 84% more input tokens for Codex.

Some lints need rust-version 1.81 or later. Others are marked for libraries only, and Bevy crates need four extra allows. Teams that review a lot of agent-written Rust, or port code into it, are the ones who should look.