rust-expert

rust-expert is a skill for Claude Code from Miaoge-Ge/coding-agent-skills. It costs 93 tokens per session (1,143 once invoked), scanned A, original, MIT.

Guidance for writing and reviewing Rust code, a programming language with strict rules for how data is owned, shared, and accessed. It covers borrowing, lifetimes, traits, asynchronous code, errors, smart pointers, and unsafe code.

In plain words
What is it for?
Use it for Rust development, refactoring, API and trait design, asynchronous code, compiler errors, error types, smart pointers, or reviewing unsafe code.
Why use it?
It helps solve borrow-checker, move, lifetime, and thread-safety errors by addressing the underlying data design. It also encourages deliberate choices about cloning, shared state, and error handling.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rust-expert plugin — 1 skill shipped together

Good fit Use it for Rust development, refactoring, API and trait design, asynchronous code, compiler errors, error types, smart pointers, or reviewing unsafe code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/miaoge-ge/coding-agent-skills/rust-expert
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 Miaoge-Ge/coding-agent-skills --skill rust-expert
Clone the repo
git clone --depth 1 https://github.com/Miaoge-Ge/coding-agent-skills

Made for: Claude Code.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/rust-expert"><img src="https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/rust-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,143 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.00093 $0.01143
Opus 5.5 $0.00037 $0.00457
Sonnet 5.5 $0.00019 $0.00229
Haiku 4.5 $0.00009 $0.00114

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

Security

Grade A, and why

rust-expert 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 3mo 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-expert/skills/rust-expert/SKILL.md · 88 lines

How it starts

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

Rust Expert

Fight the design, not the borrow checker — a borrow error is usually a real aliasing/lifetime problem. Make invalid states unrepresentable, return errors as values, and reach for clone()/unsafe deliberately, never to silence the compiler.

When to Use

  • Writing or refactoring Rust.
  • Borrow-checker, lifetime, move/clone, or Send/Sync errors.
  • Designing traits, generics, error types, or APIs.
  • Async (tokio), iterators, smart pointers, or vetting unsafe.

When NOT to Use

  • Other languages → the relevant language skill.
  • High-level system architecture → software-architect.

Core Principles

1. Ownership & borrowing by design

  • Borrow (&T/&mut T) over cloning; clone() is a real cost you choose, not an error silencer.
  • The rule: many &T xor one &mut T. When it fights you, restructure: narrow scopes, split borrows, index-based access, or interior mutability (Cell/RefCell single-thread, Mutex/RwLock multi-thread).
  • Params take &str/&[T]/impl AsRef<_>; store owned String/Vec<T>. Return owned data or borrow tied to an input lifetime.

2. Errors are values

  • Return Result<T, E>; propagate with ?. Avoid unwrap()/expect() outside tests, main, or provably-infallible spots (and then expect() with a reason).
  • Libraries: typed errors with thiserror (impl std::error::Error, use #[from]). Apps: anyhow::Result with .context("…").
  • Option for absence, Result for failure. Don't panic on recoverable conditions.

3. Model with the type system

  • Enums to make illegal states unrepresentable; newtype pattern for domain values and to add trait impls.
  • Generics + trait bounds by default; dyn Trait (boxed) for heterogeneous collections, plugin points, or smaller code size. Derive Debug/Clone/PartialEq where sensible; impl From for conversions so ? composes.

4. Async & concurrency

  • Pick one runtime (usually tokio). Never block the executor — use async I/O; offload CPU/blocking work to spawn_blocking or a thread pool.
  • Share state with Arc<Mutex<T>>/Arc<RwLock<T>>; hold locks for the shortest possible scope and never across .await. Move ownership across tasks via channels.

Read the full file on GitHub · 88 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. 3mo ago First seen · 88 lines · 93 tokens per session scan A 1c9f91f930a9

Subscribe to this mod's changes

rust-expert is a skill published in the GitHub repository Miaoge-Ge/coding-agent-skills (7 stars, last pushed 6mo ago), licensed MIT. It adds 93 tokens to every session and 1,143 once invoked, about $0.0004 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-31.

Related

rust-expert compared with skills from other repositories

rust-expert next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rust-expertMiaoge-Ge/coding-agent-skillsSkill76mo agoMITA93Claude Code
rust-programming-expertroedyrustam/vibes-plugSkill1315d agoMITA58Cursor
tauri-expertroedyrustam/vibes-plugSkill1315d agoMITA44Cursor
wasm-edge-computing-expertroedyrustam/vibes-plugSkill1315d agoMITA47Cursor
Agent Browser AutomationPramodDutta/qaskillsSkill25329d agoMITA37Claude Code, Codex
fastapikok-o/contextos-agentsSkill1022d agoApache-2.0A21Claude Code, Codex
typescriptkok-o/contextos-agentsSkill1022d agoApache-2.0A20Claude Code, Codex