agentleFS
kabudukabudu/engineering-agent-skills/skills/rust-review/SKILL.md

rust-review

Skill3 starsChanged 13 days agoMITView on GitHub

Review Rust code or diffs for correctness, soundness, API compatibility, and maintainability. Use for review or audit requests; produce evidence-backed findings without rewriting code unless requested.

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use python-review and tdd.

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.
  • kingsidharthSkill

    python-review

    Also in 3 projects that use this

  • GoogleSkill

    tdd

    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

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read references/risk-checks.md before assessing unsafe/FFI, concurrency, custom trait contracts, or public API evolution.

    line 24

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Rust review

Review the requested file, crate, or diff and the surrounding contracts it affects. Follow repository instructions and the requested review format. This skill is independently usable; no companion skill is required.

Establish scope and evidence

Inspect relevant callers, tests, Cargo manifests, toolchain/MSRV, supported features, and CI commands. Identify actual consumers and compatibility commitments; a lib.rs alone does not establish a published API. For a diff, attribute findings to changes or their consequences; keep unrelated pre-existing issues separate.

Run applicable repository checks when available. Otherwise start with cargo fmt --check, cargo clippy --all-targets, and relevant tests. Respect supported feature combinations and targets; do not assume --all-features is valid. Keep review-only work read-only except normal build/test artifacts. Do not apply formatting, fix code, change lint configuration, post reviews, or create commits without authorisation for those actions. Summarise relevant diagnostics and distinguish pre-existing failures from regressions.

Review in risk order

  1. Correctness: reachable bad-input paths, overflow/truncation, state transitions, error propagation, resource cleanup, and externally visible behaviour.
  2. Soundness: pointer/reference invariants, unsafe boundaries, foreign ABI, aliasing, lifetime, thread access, and unwind behaviour. A safety comment supports review; its presence or absence does not establish soundness.
  3. Concurrency: lock order, guards across suspension, blocking executor work, cancellation, bounded work, and shutdown ownership. Evaluate the actual runtime and invariants rather than banning particular types.
  4. API contracts: compatibility, ownership, visibility, standard trait laws, feature behaviour, and errors callers can act on. Verify equality, hashing, and ordering agree semantically; custom ordering can agree with derived equality.
  5. Maintainability: avoidable complexity, misleading documentation, and missing behavioural coverage with a credible consequence. Keep style preferences non-blocking and respect established conventions.

Read references/risk-checks.md before assessing unsafe/FFI, concurrency, custom trait contracts, or public API evolution. Ordinary reviews need not load it. Verify uncertain language rules or source citations against primary documentation; do not invent guideline identifiers.

Report actionable findings

Each finding needs a precise location, triggering condition, concrete consequence, and smallest useful remedy. Include a short code change when it clarifies the remedy; do not force a patch where reasoning is clearer. Group repeated instances of the same failure mode. If an assumption determines validity, verify it or state the uncertainty instead of presenting it as fact.

Severity follows impact and reachability: demonstrated soundness defects, data loss, security failures, and contract-breaking behaviour outrank idiom or naming. An invariant-protected panic, intentional shared ownership, public data struct, or documented poison-recovery policy is not automatically a defect. Do not infer undefined behaviour from a style violation or classify a truncating cast as a panic.

Do not invent findings, fill a quota, or require a praise section. For clean code, say no actionable findings were found and state meaningful coverage limits. Follow the host's severity/location format when provided; otherwise use a concise list ordered by risk. End with checks actually run and material gaps. Cite a named rule only when verified and useful; evidence of the failure takes priority over guideline compliance.

Attribution

Adapted from Morgan Linton's BeautifulRust; see NOTICE.md for provenance and LICENSE for the retained MIT notice.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.