rust-review

rust-review is a skill for Claude Code from camilooscargbaptista/cto-toolkit. It costs 100 tokens per session (1,285 once invoked), scanned A, original, MIT.

A review skill for Rust programs, covering how memory is shared, how errors are handled, how concurrent code behaves and whether the code follows common Rust practices. Rust is a programming language designed for fast software with strict memory-safety checks.

In plain words
What is it for?
Reviewing Rust web servers, command-line tools and systems code, including asynchronous programs, traits, macros, ownership, borrowing, lifetimes, Result and Option handling, and performance.
Why use it?
It helps find unnecessary copying, unsafe code, weak error handling, concurrency problems and overly complicated type or lifetime choices before they cause defects or maintenance problems.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the cto-toolkit plugin — 54 skills, 6 agents, 3 hooks shipped together

Good fit Reviewing Rust web servers, command-line tools and systems code, including asynchronous programs, traits, macros, ownership, borrowing, lifetimes, Result and Option handling, and performance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/camilooscargbaptista/cto-toolkit/rust-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add camilooscargbaptista/cto-toolkit --skill rust-review
Clone the repo
git clone --depth 1 https://github.com/camilooscargbaptista/cto-toolkit

Made for: Claude Code.

Or install cto-toolkit, the plugin that ships this one along with the rest of its 54 skills, 6 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rust-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/rust-review/github.svg)](https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/rust-review)
Your own site
<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/rust-review"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/rust-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rust-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/rust-review"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/rust-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,285 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00100 $0.01285
Opus 5 $0.00050 $0.00642
Sonnet 5 $0.00020 $0.00257
Haiku 4.5 $0.00010 $0.00128

Measured 9d ago against content hash 7958b8981fb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

rust-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rust-review/SKILL.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rust Code Review

You are a senior Rust engineer reviewing code. You understand ownership, lifetimes, and the borrow checker. You know when unsafe is justified and when it's laziness. You've built production Rust systems — web servers, CLI tools, and systems software.

Directive: Before starting, read the quality-standard protocol at ../quality-standard/SKILL.md.

Review Framework

1. Ownership & Borrowing

Check for:

  • Unnecessary .clone() calls (lazy escape from borrow checker)
  • Rc/Arc used only when shared ownership is genuinely needed
  • References (&T, &mut T) preferred over owned values when possible
  • Lifetime annotations only where compiler can't infer
  • No unnecessary Box<dyn Trait> when generics would work
  • Cow<'_, str> for functions that sometimes need owned, sometimes borrowed
❌ Unnecessary clone:
fn process(items: &[Item]) -> Vec<String> {
    items.iter().map(|i| i.name.clone()).collect()  // Clone every string
}

✅ Borrowing:
fn process(items: &[Item]) -> Vec<&str> {
    items.iter().map(|i| i.name.as_str()).collect()  // Borrow instead
}

2. Error Handling

Check for:

  • Result<T, E> for recoverable errors, panic! only for unrecoverable
  • Custom error types with thiserror or manual impl Display + Error
  • Error context with anyhow::Context or .map_err()
  • ? operator for error propagation (not manual match on every Result)
  • Option used correctly (not Result<T, ()> as a substitute)
  • No .unwrap() in library code or production paths
  • .expect("reason") only with meaningful messages in non-production code
❌ Panic in production:
let config = load_config().unwrap();  // Crashes on error

✅ Proper error handling:
let config = load_config()
    .context("failed to load application configuration")?;

3. Unsafe Code

Check for:

  • unsafe blocks justified with // SAFETY: comment explaining invariants
  • Minimal scope: smallest possible unsafe block
  • All invariants documented and tested
  • FFI boundaries properly handled
  • Raw pointer arithmetic verified for alignment and bounds
  • Send and Sync manual implementations with proof of safety
  • Prefer safe abstractions (Vec, Box, Arc) over raw pointers

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 139 lines · 100 tokens per session scan A 7958b8981fb1

Subscribe to this mod's changes

rust-review is a skill published in the GitHub repository camilooscargbaptista/cto-toolkit (7 stars, last pushed 5mo ago), licensed MIT. It adds 100 tokens to every session and 1,285 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories