rust-review
Skill5 starsChanged 11 days agoBSD-3-ClauseView on GitHub
Use when reviewing Rust code that someone else wrote (a diff, a pull request, a file, or a crate) and writing a prioritized review report, with each finding at its location, the rule it breaks, and the smallest fix as code. Not for writing or fixing the code, or for a review of one area that one skill owns, such as unsafe or async code; load that skill.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- XGENT-ai/skillstheir own version, first seen Nov 8, 2026
- inference-gateway/skillstheir own version, first seen Nov 5, 2026
- kabudu/engineering-agent-skillstheir own version, first seen Nov 1, 2026
- fedemelo/agent-configtheir own version, first seen Nov 1, 2026
- tuan3w/herdr-mobiletheir own version, first seen Nov 1, 2026
- morganlinton/BeautifulRusttheir own version, first seen Nov 1, 2026
Used with
Projects with it also use python-review, rust-best-practices and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
kingsidharthSkillpython-review
Also in 3 projects that use this
MicrosoftSkillrust-best-practices
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.
Also in 4 projects that use this
GoogleSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- cloudflare/workerd★ 9.1ksame name
- fallow-rs/fallow★ 5.3ksame name
- morganlinton/BeautifulRust★ 1.8ksame name
- tuan3w/herdr-mobile★ 29same name
- fedemelo/agent-config★ 4same name
- jscott3201/yet-more-skills★ 4same name
- inference-gateway/skills★ 3same name
- kabudu/engineering-agent-skills★ 3same name
- BenSchZA/skills★ 1same name
- hdprajwal/agent-skills★ 1same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cargo-workflowsSkill
- ffi-error-progress-cancelSkill
- memory-modelSkill
- rust-android-buildSkill
- rust-async-internalsSkill
- rust-borrow-semanticsSkill
- rust-callback-boundsSkill
- rust-cliSkill
- rust-code-styleSkill
- rust-compiler-errorsSkill
- rust-copy-on-writeSkill
- rust-crate-architectureSkill
- rust-crate-releaseSkill
- rust-databaseSkill
- rust-debuggingSkill
- rust-disciplineSkill
- rust-embedded-no-stdSkill
- rust-event-loop-stateSkill
- rust-hot-pathSkill
- rust-ios-buildSkill
- rust-iterator-implSkill
- rust-jniSkill
- rust-lintsSkill
- rust-macrosSkill
- rust-native-linkingSkill
- rust-networkingSkill
- rust-observabilitySkill
- rust-panic-safetySkill
- rust-pattern-semanticsSkill
- rust-performanceSkill
- rust-pin-projectionSkill
- rust-portSkill
- rust-sanitizers-miriSkill
- rust-securitySkill
- rust-send-syncSkill
- rust-serdeSkill
- rust-swift-ffiSkill
- rust-tddSkill
- rust-test-toolsSkill
- rust-type-erasureSkill
- rust-unsafeSkill
- rust-varianceSkill
- rust-wasmSkill
- uniffi-boundarySkill
- uniffi-packaging-versioningSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
When the code is trusted, or after approval, run these from the workspace root:
- Very specific: line 46
Do not run cargo fmt without --check: it rewrites the code under review.
- Distinctive: line 49
If a tool cannot run (no toolchain, no network for a dependency, no approval), say so in the report and review by reading.
- Distinctive: line 116
Keep it in proportion: five to ten findings for one file.
- Distinctive: line 118
When code looks deliberate (a comment explains it, or a test pins it), name the trade-off under Consider instead of calling it a defect.
- Distinctive: line 119
Consider instead of calling it a defect.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Rust Review
A review reports what to change and why; the author decides what to fix. Do not edit the code under review unless the request asks for a fix. This skill holds the method and the report. The rules live in the skills that own them: the table in Where to look names the owner of each area, and the check to run when that skill is not installed.
Scope
- Read what the request names. For a diff, read the changed lines and the code they can
break: callers of a changed signature, invariants of a changed type, and tests of a changed
behavior.
git diff --stat <base>...HEADlists the files;git diff <base>...HEADshows the lines. Do not review unchanged code that the diff cannot affect. - Decide library or application. A crate that other crates use (a
lib.rs,publishnot set tofalse, or a path dependency of another crate) gets the API rules in full. An application gets the simpler rules: concrete types, one error type with context, no speculative generics. Say which one you assumed in the report. - Read the edition and the MSRV (
edition,rust-versioninCargo.toml). Do not propose an API or a syntax that is newer than the MSRV. - Respect the framework. A framework convention wins over generic advice: system parameters
by value in Bevy, a framework prelude glob, an attribute macro that generates
pubitems. At most, report it under Consider.
Run the tools first
cargo clippy and cargo test run code from the reviewed tree: build scripts, procedural
macros, and the tests themselves. Before you run them on code from someone you do not trust, such
as a pull request from outside the team, read build.rs, the proc-macro crates, and the changed
tests, and get the user's approval. Run them in a sandbox with no secrets and no network. Without
that approval, review by reading, and say so in the report.
When the code is trusted, or after approval, run these from the workspace root:
cargo fmt --all -- --check
cargo clippy --locked --workspace --all-targets -- -D warnings
cargo test --locked --workspace- Do not run
cargo fmtwithout--check: it rewrites the code under review. - Report each command and its result. Group clippy output by lint, with the lines; do not paste it raw. A lint that the project allows on purpose, with a reason, is not a finding.
- If a tool cannot run (no toolchain, no network for a dependency, no approval), say so in the report and review by reading.
Where to look
Work through the areas in this order. The first four are where real defects live.
| Area | Look for | Owner of the rule | Check without the owner |
| Soundness | unsafe with no // SAFETY: comment, transmute, unsafe impl Send or Sync, a safe function that can cause undefined behavior | rust-unsafe | clippy::undocumented_unsafe_blocks; cargo +nightly miri test on the tests that reach the code |
| Threads and tasks | A value that is not Send across a thread or an .await, a lock guard held across .await, a select! branch that is not cancel-safe | rust-send-sync, rust-async-internals | clippy::await_holding_lock; a compile-time fn assert_send<T: Send>() {} call |
| Atomics and globals | Ordering::Relaxed that publishes data, static mut | memory-model | MIRIFLAGS="-Zmiri-many-seeds=0..16" cargo +nightly miri test |
| Reachable panics | unwrap, expect, indexing, or an as cast on input from outside; a panic that can cross extern "C" | rust-panic-safety | clippy::unwrap_used, clippy::indexing_slicing, clippy::cast_possible_truncation |
| Drop and borrow points | A guard alive through a match, a temporary that drops early or late | rust-borrow-semantics | clippy::significant_drop_in_scrutinee; a try_lock().is_ok() assertion in a test |
| Errors | String, (), or Box<dyn Error> as a library's error type, anyhow::Error in a public signature, map_err(|_| ...) that drops the cause | rust-code-style | a thiserror enum with #[from] for each cause |
| API shape | &String or &Vec<T> parameters, a bool parameter, Rc<RefCell<_>> in a pub signature, get_ getters, conversions named against their cost, missing standard traits | rust-discipline and its API conventions reference | clippy::ptr_arg, clippy::fn_params_excessive_bools, clippy::wrong_self_convention, missing_debug_implementations |
| Published compatibility | A new variant on an exhaustive pub enum, a new field on a public struct, a removed item | rust-crate-release | cargo semver-checks --baseline-rev <base> |
| Wire formats | A changed Serialize or Deserialize on stored or sent data | rust-serde | a test that decodes a recorded old payload with serde_json::from_str |
| Lints and suppressions | #[allow] with no reason, #![deny(warnings)] in source | rust-lints | clippy::allow_attributes_without_reason |
| Tests | A bug fix with no regression test, a test that restates a constant | rust-tdd | the test count in cargo test output before and after the change |
| Ports | A rewrite that must keep another implementation's output | rust-port | the recorded comparison in its PORTING.md |
| Speed and size | A performance claim | rust-performance | a profile or cargo bench numbers; without them, the claim is not a finding |
For a full API pass on a library, read the review checklist reference of the rust-discipline
skill when it is installed; otherwise run clippy::pedantic once and use the API shape row above.
Severity
| Section | What belongs there |
| Must fix | Undefined behavior or unsoundness, a data race, a panic or a hang that outside input can reach, data loss, a security hole, a breaking change to a published API |
| Should fix | Code that works but breaks a rule at a real cost: an error that loses its cause, an API that is hard to use correctly, a bug fix without a test |
| Consider | Style, naming, and polish; a deliberate choice that has a cost worth naming |
A Must fix needs evidence: a failing test, a tool line, or the input that triggers it. Without evidence, put it under Should fix and mark it "not verified".
The report
# Review: <what was reviewed>
<One paragraph: what the code does, library or application, the verdict, and the one thing to
fix first. List the commands that ran and their results, or say that none could run.>
## Must fix
### 1. <Short title> (`src/file.rs:42`)
Rule: <owner skill, and the rule code where one exists: C-GETTER, clippy::ptr_arg, E0502>
Problem: <what goes wrong, and for which input or caller>
Fix:
<the smallest change, as a code block of the lines that change>
## Should fix
### 2. ...
## Consider
### 3. ...
## Already good
- <two to four specific things the code does well>- Give every finding a location (
file:line, or "whole crate" for a missing test suite) and a rule that a reader can look up. - Show the fix as code, kept to the lines that change. Do not rewrite whole functions.
- Group repeats: one finding for "four
unwrap()calls on parsed input", with all the lines. - Keep it in proportion: five to ten findings for one file. Do not bury a Must fix under style notes, and do not pad the list.
- When code looks deliberate (a comment explains it, or a test pins it), name the trade-off under Consider instead of calling it a defect.
- "Already good" is required. It tells the author what to keep, and it shows that the reviewer read the code.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

