rust-critique

rust-critique is a command for coding agents from mathisk2095/jko-claude-plugins. It costs 47 tokens per session (928 once invoked), scanned A, original, MIT.

A Rust code critique command that reviews a Rust application or library for correctness, error handling, ownership, asynchronous code, performance, types, and architecture. Rust is a programming language that uses ownership rules to prevent many memory errors.

In plain words
What is it for?
Use it to review selected Rust files or a project source folder before merging changes, with checks based on the project’s Cargo configuration and dependencies.
Why use it?
It gives a structured review of risky or complex Rust code and points out why issues such as unchecked failures, unsafe code, excessive copying, or poor concurrency design matter.

Command

Part of the rust plugin — 1 skill, 5 commands shipped together

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.

agentmods
npx agentmods add commands/mathisk2095/jko-claude-plugins/rust-critique
Clone the repo
git clone --depth 1 https://github.com/mathisk2095/jko-claude-plugins

Or install rust, the plugin that ships this one along with the rest of its 1 skill, 5 commands.

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-critique

README.md
[![agentmods](https://agentmods.dev/badge/commands/mathisk2095/jko-claude-plugins/rust-critique.svg)](https://agentmods.dev/commands/mathisk2095/jko-claude-plugins/rust-critique)
Your own site
<a href="https://agentmods.dev/commands/mathisk2095/jko-claude-plugins/rust-critique"><img src="https://agentmods.dev/badge/commands/mathisk2095/jko-claude-plugins/rust-critique.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 928 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00047 $0.00928
Opus 5 $0.00023 $0.00464
Sonnet 5 $0.00009 $0.00186
Haiku 4.5 $0.00005 $0.00093

Measured 4d ago against content hash 83b3fd406d75, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rust-critique 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 4d 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.

plugins/rust/commands/rust-critique.md · 90 lines

How it starts

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

Rust Critique

Conduct a thorough code critique. Think like a senior Rust engineer reviewing a PR — be direct, be specific, explain WHY each finding matters.

First: Use the rust-expert skill for review process and reference files.

Preparation

  1. Find the workspace root: cargo locate-project --workspace --message-format plain 2>/dev/null | xargs dirname.
  2. Determine if this is a library or application crate.
  3. Read the target files. If no target specified, scan src/ starting with lib.rs or main.rs.
  4. Check Cargo.toml for edition, dependencies, lint config, and features.

Automated Scans

Run these to gather data before the review:

# Panic sources
rg --type rust '\.(unwrap|expect)\(' src/ --glob '!*test*' -c 2>/dev/null | awk -F: '{s+=$2} END {print "unwrap/expect:", s+0}'

# Unsafe without safety comments
rg --type rust -B1 'unsafe \{' src/ -n 2>/dev/null | rg -v 'SAFETY' | rg -c 'unsafe' 2>/dev/null | awk -F: '{s+=$2} END {print "unsafe without SAFETY:", s+0}'

# Clone frequency
rg --type rust '\.clone()' src/ -c 2>/dev/null | awk -F: '{s+=$2} END {print "clone calls:", s+0}'

# Arc<Mutex usage
rg --type rust 'Arc<Mutex<' src/ -c 2>/dev/null | awk -F: '{s+=$2} END {print "Arc<Mutex<>:", s+0}'

# Debug artifacts
rg --type rust '(println!|dbg!|todo!|unimplemented!)' src/ --glob '!*test*' -c 2>/dev/null | awk -F: '{s+=$2} END {print "debug artifacts:", s+0}'

# Clippy
cargo clippy --all-targets --all-features --message-format short 2>&1 | tail -5

The Review

Work through the review process from the rust-expert skill, consulting reference files as needed. For each finding:

  1. File and line — where exactly
  2. Severity — blocking / important / nit / suggestion / praise
  3. What — name the problem clearly
  4. Why it matters — the concrete consequence (bug, crash, CVE, maintenance cost). If you cannot name a concrete consequence, demote to suggestion.
  5. Fix — before/after code block when non-obvious
  6. Command — which command to run if applicable (/rust-harden, /rust-types, /rust-polish)

Read the full file on GitHub · 90 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. 4d ago First seen · 90 lines · 47 tokens per session scan A 83b3fd406d75

Subscribe to this mod's changes

rust-critique is a command published in the GitHub repository mathisk2095/jko-claude-plugins (3 stars, last pushed 6d ago), licensed MIT. It adds 47 tokens to every session and 928 once invoked, about $0.0002 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.