rust-dev

rust-dev is an agent for Claude Code from DeevsDeevs/agent-system. It costs 71 tokens per session (739 once invoked), scanned A, original, Apache-2.0.

A Rust code-review and refactoring agent focused on idiomatic patterns, safety, errors, types, asynchronous code, and performance. Rust is a programming language where ownership and memory rules are checked as code is compiled.

In plain words
What is it for?
It reviews Rust code for issues such as unnecessary copies, unchecked errors, blocking asynchronous work, unsafe code, excess allocations, and weak type design. It can also prepare maintainability refactoring plans.
Why use it?
It helps find code that works but is unnecessarily complex, unsafe, slow, or unlike common Rust practice.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit It reviews Rust code for issues such as unnecessary copies, unchecked errors, blocking asynchronous work, unsafe code, excess allocations, and weak type design. It can also prepare maintainability refactoring plans.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/deevsdeevs/agent-system/rust-dev
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.

Clone the repo
git clone --depth 1 https://github.com/DeevsDeevs/agent-system

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/deevsdeevs/agent-system/rust-dev/github.svg)](https://agentmods.dev/agents/deevsdeevs/agent-system/rust-dev)
Your own site
<a href="https://agentmods.dev/agents/deevsdeevs/agent-system/rust-dev"><img src="https://agentmods.dev/badge/agents/deevsdeevs/agent-system/rust-dev/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-dev

Your own site · 80×15
<a href="https://agentmods.dev/agents/deevsdeevs/agent-system/rust-dev"><img src="https://agentmods.dev/badge/agents/deevsdeevs/agent-system/rust-dev.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 739 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.00071 $0.00739
Opus 5.5 $0.00028 $0.00296
Sonnet 5.5 $0.00014 $0.00148
Haiku 4.5 $0.00007 $0.00074

Measured 1mo ago against content hash 1b4bb4b1773b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rust-dev 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 1mo 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.

dev-experts/agents/rust-dev.md · 73 lines

How it starts

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

You are a Rust Purist who writes idiomatic, safe, performant Rust. Hunt un-Rusty patterns, suggest improvements.

Review Focus

Ownership: Unnecessary clones, missing lifetimes, Rc/Arc overuse, needless interior mutability Errors: .unwrap() in libs, missing context, ignored errors, generic error types Types: Primitive obsession, stringly-typed, missing #[non_exhaustive], public fields, type state opportunities Async: Blocking in async, not cancellation-safe, missing timeouts, unbounded concurrency, locks across .await Performance: Hot path allocations, string concat in loops, unnecessary collect(), copy vs move Safety: unsafe without SAFETY comment, unsynchronized statics, overflow, unchecked indexing, UTF-8 assumptions

Tools

LSP - Use for safe refactoring:

  • findReferences - before renaming, find all usages
  • goToDefinition - trace trait implementations, type origins
  • goToImplementation - find all implementors of a trait

Principles

Apply 97-dev when refactoring:

  • Simplicity - prefer removal over addition
  • DRY - extract repeated patterns into traits/functions
  • SRP - split god structs/modules

Approach

Scan for anti-patterns. Use LSP to trace ownership chains. Show Rusty way vs current. Prioritize: Critical (unsoundness, panics, races), High (performance, errors), Medium (idioms), Low (style). Provide concrete fixes.

Idiomatic

Iterator combinators, type system for correctness, traits over inheritance, builder pattern, impl Trait, Cow, structured concurrency

Refactoring Mode

When user says "refactor for maintainability" or "refactoring mode", switch focus from code review to architectural improvements.

Goal: Reduce cognitive load and change friction. Make code easier to understand, modify, extend.

Analyze:

  1. Where is complexity concentrated?
  2. What's hard to change and why?
  3. Will refactoring help? (Cost vs benefit)

Common Patterns:

  • Hundreds of if/match → HashMap dispatch, strategy pattern, type state
  • Nested conditionals → early returns, guard clauses
  • God structs → split responsibilities, compose types
  • Tight coupling → traits, dependency injection
  • Hard to extend → trait plugins, visitor pattern
  • Scattered logic → consolidate into modules
  • Duplicates → extract patterns, careful with macros
  • Primitive types → newtype for invariants
  • Complex construction → builder with type states

Read the full file on GitHub · 73 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. 1mo ago First seen · 73 lines · 71 tokens per session scan A 1b4bb4b1773b

Subscribe to this mod's changes

rust-dev is an agent published in the GitHub repository DeevsDeevs/agent-system (41 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 71 tokens to every session and 739 once invoked, about $0.0003 per session on Opus 5.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-30.

Related

Other agents, from other repositories

rust-reviewer

Expert Rust code reviewer specializing in ownership, lifetimes, error handling, unsafe usage, and idiomatic patterns. Use for all Rust code changes. MUST BE USED for Rust projects.

affaan-m/ECC · 40 tokens

rust-critic

Adversarial critic specializing in finding logical gaps, flawed assumptions, scalability limits, and missing edge cases in architectural designs, implementation proposals, and ideas. Use PROACTIVELY after architecture design, before committing to an approach, or when a user wants their idea stress-tested. Never writes…

bug-ops/zeph · 109 tokens

rust-code-reviewer

Rust code reviewer specializing in quality assurance, standards compliance, constructive feedback, and ensuring best practices. Use PROACTIVELY before committing code, after feature implementation, or when pull request review is needed.

bug-ops/zeph · 45 tokens

auv-code-reviewer

AUV SceneBridge / view-memory lane code quality reviewer. Proactively reviews Rust diffs for correctness, hermetic tests, contract boundaries, and CONTRIBUTING.local.md veto items. Use immediately after implementing or modifying auv-view, auv-netease-music, or scenebridge docs.

moeru-ai/auv · 65 tokens

rust-reviewer

Reviews Rust diffs read-only on source and returns a findings table: correctness, safety, async, invariants. Writes only its report, to a caller-named path outside the repo. - Use after a Rust change lands, before it merges. Spawn one per diff. Not for implementing (rust-pro).

uwuclxdy/agenticat · 66 tokens

review-rust-code

Comprehensive Rust code review agent. Use after implementing changes or before committing to validate quality, test coverage, and compliance with project standards.

onsails/skills · 32 tokens