rust-coding-standards

rust-coding-standards is a skill for Claude Code, Codex from williamzujkowski/standards. It costs 50 tokens per session (2,362 once invoked), scanned A, original, MIT.

A guide to Rust practices covering ownership, borrowing, lifetimes, traits, error handling, asynchronous code, and testing. Rust is a programming language designed to prevent many memory and concurrency errors while compiling code.

In plain words
What is it for?
Use it when designing, implementing, or reviewing Rust systems, concurrent programs, asynchronous services, and their tests.
Why use it?
It helps developers work within Rust's rules so code is safer and resource handling is explicit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing, implementing, or reviewing Rust systems, concurrent programs, asynchronous services, and their tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/williamzujkowski/standards/rust
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 williamzujkowski/standards --skill rust
Clone the repo
git clone --depth 1 https://github.com/williamzujkowski/standards

Made for: Claude Code, Codex.

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-coding-standards

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/williamzujkowski/standards/rust"><img src="https://agentmods.dev/badge/skills/williamzujkowski/standards/rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,362 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.00050 $0.02362
Opus 5.5 $0.00020 $0.00945
Sonnet 5.5 $0.00010 $0.00472
Haiku 4.5 $0.00005 $0.00236

Measured yesterday against content hash 0ca3dc16ff23, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-30, from the pricing page.

Security

Grade A, and why

rust-coding-standards 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/setup-rust-project.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/coding-standards/rust/SKILL.md · 416 lines

How it starts

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

Rust Coding Standards

Purpose: Master Rust's ownership system, type safety, and zero-cost abstractions for building safe, concurrent, and performant systems.

Level 1: Quick Reference

Core Principles

  • Ownership: Each value has exactly one owner
  • Borrowing: References allow multiple readers XOR one writer
  • Zero-cost abstractions: High-level code compiles to optimal machine code
  • Explicit over implicit: No hidden allocations or control flow

Ownership & Borrowing Cheat Sheet

// Ownership transfer (move)
let s1 = String::from("hello");
let s2 = s1; // s1 is now invalid

// Immutable borrow (multiple allowed)
let s = String::from("hello");
let r1 = &s;
let r2 = &s;
println!("{} and {}", r1, r2); // OK

// Mutable borrow (exclusive)
let mut s = String::from("hello");
let r1 = &mut s;
r1.push_str(" world");

// Copy types (stack-only)
let x = 5;
let y = x; // x is still valid (i32 implements Copy)

Result & Option

// Option: value may be absent
let name = find_user(42).map(|u| u.name).unwrap_or("Anonymous".into());

// Early return with ?
fn process() -> Result<(), Error> {
    let config = parse_config("app.toml")?;
    Ok(())
}

Essential Checklist

  • cargo clippy -- -D warnings
  • cargo fmt -- --check
  • cargo test
  • cargo doc --no-deps
  • cargo audit
  • Document all unsafe blocks

Memory Safety Rules

  1. No data races: Compiler enforces at compile time
  2. No null pointers: Use Option<T> instead
  3. No dangling pointers: Borrow checker prevents
  4. No use-after-free: Ownership system prevents
  5. No buffer overflows: Bounds checking

Level 2: Implementation Guide

Ownership System

The Three Rules
  1. Each value has a variable that's its owner
  2. There can only be one owner at a time
  3. When the owner goes out of scope, the value is dropped
fn takes_ownership(s: String) {
    println!("{}", s);
} // s dropped here

fn main() {
    let s = String::from("hello");
    takes_ownership(s); // s moved
    // println!("{}", s); // Error: value borrowed after move
}

// Return ownership
fn gives_ownership() -> String {
    String::from("hello")
}

Read the full file on GitHub · 416 lines

Files

What ships with it

10 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. yesterday First seen · 416 lines · 50 tokens per session scan A 0ca3dc16ff23

Subscribe to this mod's changes

rust-coding-standards is a skill published in the GitHub repository williamzujkowski/standards (18 stars, last pushed 1mo ago), licensed MIT. It adds 50 tokens to every session and 2,362 once invoked, about $0.0002 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-09-29.

Related

Other skills, from other repositories

rust-systems-programming

Complete guide for Rust systems programming including ownership, borrowing, concurrency, async programming, unsafe code, and performance optimization.

manutej/luxor-claude-marketplace · 28 tokens

rust-docs

Comprehensive Rust 1.97.0 reference covering all language features: ownership, borrowing, lifetimes, types, variables, control flow, functions, closures, structs, enums, traits, generics, error handling, collections, strings, concurrency, async/await, modules, packages, macros, attributes, smart pointers, unsafe Rust…

pledgeandgrow/pledge-skills · 130 tokens

toolchains-rust-core

Core Rust toolchain conventions — ownership/borrowing patterns, error handling, async with tokio, and idiomatic project structure for the rust-engineer agent.

bobmatnyc/claude-mpm-agents · 37 tokens

hotpath_init

Configure hotpath profiling in a Rust project. Adds the hotpath dependency with feature-gated setup, instruments main with hotpath::main, functions with measure/measureall, and wraps channels, mutexes, rwlocks, streams, futures, reqwest clients, axum routers and byte-level I/O with hotpath macros. Use when the user…

pawurb/hotpath-rs · 88 tokens

rust-expert

Expert-level Rust development with ownership, lifetimes, async, error handling, and production-grade patterns. Use when the user mentions systems programming, memory safety, concurrency, or Cargo, or when the task involves Ownership and Borrowing, Type System, Async Programming, or Web Development.

personamanagmentlayer/pcl · 60 tokens

tauri-expert

Expert in Tauri framework, Rust backend, web frontend integration, and lightweight desktop applications. Use when the user mentions desktop, Rust, web, cross platform, or performance, or when the task involves Tauri Architecture, Tauri vs Electron, Core Components, or Security Features.

personamanagmentlayer/pcl · 61 tokens