programming-with-rust

programming-with-rust is a skill for Claude Code, Codex from booklib-ai/booklib. It costs 108 tokens per session (3,157 once invoked), scanned A, original, MIT.

A guide for writing and reviewing Rust, a programming language that checks how data is owned and shared. It covers concepts such as borrowing, lifetimes, error handling, reusable types, pattern matching, concurrency, and macros.

In plain words
What is it for?
Use it when creating Rust code, reviewing existing Rust code, or learning how Rust handles memory, errors, reusable code, and parallel work.
Why use it?
It helps developers avoid common Rust mistakes and write code that follows the language's safety rules and established practices.

Skill for Claude CodeCodex

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

Good fit Use it when creating Rust code, reviewing existing Rust code, or learning how Rust handles memory, errors, reusable code, and parallel work.

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

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 programming-with-rust

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/booklib-ai/booklib/programming-with-rust"><img src="https://agentmods.dev/badge/skills/booklib-ai/booklib/programming-with-rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,157 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.00108 $0.03157
Opus 5.5 $0.00043 $0.01263
Sonnet 5.5 $0.00022 $0.00631
Haiku 4.5 $0.00011 $0.00316

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

Security

Grade A, and why

programming-with-rust 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/review.py), 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/programming-with-rust/SKILL.md · 210 lines

How it starts

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

Programming with Rust Skill

Apply the practices from Donis Marshall's "Programming with Rust" to review existing code and write new Rust. This skill operates in two modes: Review Mode (analyze code for violations of Rust idioms) and Write Mode (produce safe, idiomatic Rust from scratch).

Reference Files

  • ref-01-fundamentals.md — Ch 1-3: Rust model, tooling, variables, primitives, references
  • ref-02-types-strings.md — Ch 4-5: String vs &str, formatting, Display/Debug traits
  • ref-03-control-collections.md — Ch 6-7: Control flow, iterators, arrays, Vec, HashMap
  • ref-04-ownership-lifetimes.md — Ch 8-10: Ownership, move semantics, borrowing, lifetimes
  • ref-05-functions-errors.md — Ch 11-12: Functions, Result, Option, panics, custom errors
  • ref-06-structs-generics.md — Ch 13-14: Structs, impl blocks, generics, bounds
  • ref-07-patterns-closures.md — Ch 15-16: Pattern matching, closures, Fn/FnMut/FnOnce
  • ref-08-traits.md — Ch 17: Trait definition, dispatch, supertraits, associated types
  • ref-09-concurrency.md — Ch 18-19: Threads, channels, Mutex, RwLock, atomics
  • ref-10-advanced.md — Ch 20-23: Memory, interior mutability, macros, FFI, modules

How to Use This Skill

Before responding, read the reference files relevant to the code's topic. For ownership/borrowing issues read ref-04. For error handling read ref-05. For a full review, read all files.


Mode 1: Code Review

When the user asks you to review Rust code, follow this process:

Step 1: Read Relevant References

Identify which chapters apply. If unsure, read all reference files.

Step 2: Analyze the Code

CRITICAL: First assess whether the code is already idiomatic. If the code correctly uses patterns like Arc<Mutex<T>> for shared state, .expect("reason") for mutex locks, &str parameters, custom error types with Display + Error + From, iterator adapters like .find().cloned(), or proper Result/? propagation — acknowledge these as correct and do not manufacture problems. The goal is accurate assessment, not finding something to criticize.

Read the full file on GitHub · 210 lines

Files

What ships with it

7 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. 1mo ago First seen · 210 lines · 108 tokens per session scan A f08037db4132

Subscribe to this mod's changes

programming-with-rust is a skill published in the GitHub repository booklib-ai/booklib (39 stars, last pushed 6mo ago), licensed MIT. It adds 108 tokens to every session and 3,157 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-30.

Related

Other skills, from other repositories

standards

Use this agent when you need to evaluate code, architecture, or development practices against the NASAB framework principles and Rust best practices.

samibs/skillfoundry · 29 tokens

rust-pro

Master Rust 1.75+ with modern async patterns, advanced type system features, and production-ready systems programming. Expert in the latest Rust ecosystem including Tokio, axum, and cutting-edge crates. Use PROACTIVELY for Rust development, performance optimization, or systems programming.

hoangatg/ai-agent-toolkit · 59 tokens

rust-crate-ci

Load before editing any Rust crate in this repo (currently runners/swarm-sandbox-runner). Covers the mandatory local validation gate, common rustfmt/clippy pitfalls, and Windows-specific Rust correctness patterns that CI enforces but are hard to catch locally without a Windows toolchain.

ZaxbyHub/opencode-swarm · 60 tokens

rust-idioms

Rust idioms: ownership and borrow checker patterns, error handling with thiserror/anyhow, Tokio async concurrency, lifetime management, and Clippy pedantic compliance. Use when writing, optimizing, or reviewing Rust crates.

irahardianto/awesome-agv · 49 tokens

axum-idioms

Axum (0.8+) web framework patterns: type-safe extractors, Tower middleware, route routing, and graceful shutdown. Use when implementing HTTP APIs or web services in Rust. Pair with rust-idioms.

irahardianto/awesome-agv · 50 tokens

rust-engineer

Acquire expert Rust developer specialisation in rust systems programming, memory safety, and zero-cost abstractions. Masters ownership patterns, async programming, and performance optimisation for mission-critical applications.

sammcj/agentic-coding · 39 tokens