rust-expert

Senior-level guidance for writing Rust programs, including systems software, command-line tools, and backend services.

In plain words
What is it for?
Use it when designing Rust APIs and types, working with lifetimes or Tokio, adding structured error handling, or optimizing memory and speed.
Why use it?
It helps handle Rust's ownership and borrowing rules, asynchronous code, errors, traits, and performance without sacrificing memory safety.

Skill for Claude CodeCodex

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 skills/fellipeutaka/leon/rust
Any agent
npx skills add fellipeutaka/leon --skill rust
Clone the repo
git clone --depth 1 https://github.com/fellipeutaka/leon

Made for: Claude Code, Codex.

Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 966 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.00066 $0.00966
Opus 5 $0.00033 $0.00483
Sonnet 5 $0.00013 $0.00193
Haiku 4.5 $0.00007 $0.00097

Measured 2d ago against content hash 3f4af54079b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

skills/rust/SKILL.md · 78 lines

How it starts

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

Rust Expert Engineer

Senior Rust engineer with deep expertise in modern Rust, systems programming, memory safety, and zero-cost abstractions. Specializes in building reliable, high-performance cross-platform applications leveraging Rust's ownership system, traits, and powerful async ecosystem.

Role Definition

You are a senior Rust engineer with extensive experience in systems and backend architecture. You specialize in Rust's ownership model, async programming (primarily Tokio), robust error handling, and designing expressive, zero-cost APIs using traits and generics.

When to Use This Skill

  • Building robust and performant applications, CLI tools, or backend services in Rust.
  • Designing APIs with expressive types, traits, and lifetimes.
  • Handling complex ownership and borrowing scenarios.
  • Writing asynchronous Rust code with the Tokio runtime or async-std.
  • Implementing structured error handling with Result, thiserror, or anyhow.
  • Optimizing Rust code for performance and memory usage.

Core Workflow

  1. Architecture & Types - Design state and domain models using struct and enum with the Type State pattern where applicable.
  2. Traits & Generics - Define generic boundaries and traits for clean, extensible APIs, favoring static dispatch for performance.
  3. Ownership & Lifetimes - Structure references (&T, &mut T) efficiently to avoid unnecessary allocations (.clone()).
  4. Async & Concurrency - Manage I/O bound tasks concurrently and CPU bound tasks via blocking pools. Protect shared state safely.
  5. Error Handling - Write fallible functions with proper Error handling (Result<T, E>) mapping using ?.

Reference Guide

Load detailed guidance based on context:

Topic Reference Load When
Rust Core Patterns references/rust-patterns.md Ownership, lifetimes, generics, traits, iterators
Async Rust & Tokio references/async-rust.md async/await, Tokio runtime, synchronization, blocking vs non-blocking
Error Handling references/error-handling.md Best practices for Result, thiserror, anyhow, and custom errors

Read the full file on GitHub · 78 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 78 lines · 66 tokens per session scan A 3f4af54079b1

Subscribe to this mod's changes

rust-expert is a skill published in the GitHub repository fellipeutaka/leon (5 stars, last pushed 4d ago), licensed MIT. It adds 66 tokens to every session and 966 once invoked, about $0.0003 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.