AI NewsDev toolsAnnouncement

BeautifulRust teaches coding agents to write idiomatic Rust

BeautifulRust is an MIT-licensed agent skill that teaches coding agents to write idiomatic, robust Rust. The author measured 29 of 30 checks passed with it against 24 of 30 without.

AI News

Editorial2 min read

LinkedInX
GitHub social card for the morganlinton/BeautifulRust repository

Image: GitHub

Why it mattersA Rust reviewer catches the same pattern faults on every first draft. BeautifulRust moves those catches to the agent that wrote the draft.

A coding agent writing Rust usually gets the code to compile. A Rust reviewer then flags patterns the agent missed on first read. The fields that should be private are public. Error modes have no documentation. A doc example calls unwrap where a safer form belongs. BeautifulRust is a new agent skill that closes that gap. Morgan Linton released it on 23 October 2026. Two days later the MIT-licensed repository had 312 stars.

What the skill does

BeautifulRust is an Agent Skill called rust-best-practices. It teaches a coding agent to write idiomatic, robust, maintainable Rust. The author pulls guidance from five published sources:

  • Google's Rust Style Guide
  • the official Rust API Guidelines
  • Effective Rust by David Drysdale
  • Rust Design Patterns
  • Microsoft's Pragmatic Rust Guidelines

The skill loads for any task that touches Rust files, cargo, crates, the borrow checker, clippy, or a .rs file.

The coverage runs twelve areas. Three concern code shape: ownership and borrowing, types and API design, everyday idioms. Three concern safety: errors and panics, unsafe code and FFI, concurrency and async. Three concern code around the code: documentation, testing, performance. The rest are a mindset note, a pre-handback checklist, and crates and dependencies.

What the author measured

The author ran three tasks: a library, a CLI, and a module refactor. The skill passed 29 of 30 checks against 24 of 30 without it. The author says the skill costs about one third more tokens per task. Both numbers are the author's own, run on the author's own task set.

A worked example

The author shows what changes on a semver-parsing library. Without the skill, the agent writes a Version struct with public fields. With the skill, the fields are private and the type exposes accessor methods. The error type gains an # Errors section in its doc comment. A doc example that called .unwrap() becomes a form that returns the error. The code without the skill compiles. The code with it reads like a crate another Rust writer would merge.

For a team using a coding agent on Rust

A coding agent gives a team a Rust diff that builds every time. Review time comes from a reader having to spot the pattern breaks on each one: a public field that should be private, an undocumented error, a doc example that would panic in production. BeautifulRust moves those catches to the first draft the agent writes. The cost is about one third more tokens per task.

The skill works with Claude Code, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI and claude.ai. The repository has 21 forks and an MIT licence. The sources it cites carry their own licences: Google's guide under CC BY 3.0, the Rust project materials under MIT or Apache-2.0, Effective Rust under CC BY-NC-ND 4.0.

Source

Primary source: morganlinton/BeautifulRust on GitHub.

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project