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.
npx agentmods add skills/booklib-ai/booklib/rust-in-actionnpx skills add booklib-ai/booklib --skill rust-in-actiongit clone --depth 1 https://github.com/booklib-ai/booklibWrote 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.
[](https://agentmods.dev/skills/booklib-ai/booklib/rust-in-action)<a href="https://agentmods.dev/skills/booklib-ai/booklib/rust-in-action"><img src="https://agentmods.dev/badge/skills/booklib-ai/booklib/rust-in-action.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00156 | $0.05070 |
| Opus 5 | $0.00078 | $0.02535 |
| Sonnet 5 | $0.00031 | $0.01014 |
| Haiku 4.5 | $0.00016 | $0.00507 |
Grade A, and why
rust-in-action 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 351 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust in Action Skill
Apply the systems programming practices from Tim McNamara's "Rust in Action" to review existing code and write new Rust. This skill operates in two modes: Review Mode (analyze code for violations of Rust idioms and systems programming correctness) and Write Mode (produce safe, idiomatic, systems-capable Rust from scratch).
The key differentiator of this book: Rust is taught through real systems — a CPU simulator, key-value store, NTP client, raw TCP stack, and OS kernel. Practices focus on correctness at the hardware boundary, not just language syntax.
Reference Files
practices-catalog.md— Before/after examples for ownership, smart pointers, bit ops, I/O, networking, concurrency, error wrapping, and state machines
How to Use This Skill
Before responding, read practices-catalog.md for the topic at hand. For ownership/borrowing issues read the ownership section. For systems/binary data read the data section. For a full review, read all sections.
Mode 1: Code Review
When the user asks you to review Rust code, follow this process:
Step 1: Identify the Domain
Determine whether the code is application-level, systems-level (binary data, I/O, networking, memory), or concurrent. The review focus shifts accordingly.
Step 2: Analyze the Code
Critical rule: Only flag genuine issues. If a pattern is idiomatic Rust, acknowledge it as correct. Do not manufacture problems where none exist. When code is well-written, say so and offer only minor suggestions. See the "Idiomatic Patterns — Do NOT Flag as Issues" section for patterns that must never be flagged.
<core_principles> Check these areas in order of severity:
- Ownership & Borrowing (Ch 4): Unnecessary
.clone()? Value moved when a borrow would suffice? Use references where full ownership is not required. - Smart Pointer Choice (Ch 6): Is the right pointer type used?
Box<T>for heap,Rc<T>for single-thread shared,Arc<T>for multi-thread shared,RefCell<T>for interior mutability (single-thread),Mutex<T>for interior mutability (multi-thread).Cow<T>when data is usually read but occasionally mutated. - Error Handling (Ch 3, 8):
.unwrap()or.expect()where?belongs? For library code, define a custom error type that wraps downstream errors viaFromimpl. Never leak internal error types across the public API boundary. - Binary Data & Endianness (Ch 5, 7): Are integer byte representations explicit? Use
to_le_bytes()/from_le_bytes()/to_be_bytes(). Validate with checksums when writing binary formats. Useserde+bincodefor structured serialization. - Memory (Ch 6): Is
unsafeminimized? Raw pointer use must be bounded by a safe abstraction. Stack vs heap allocation: prefer stack; useBoxonly when size is unknown at compile time or you need heap lifetime. - File & I/O (Ch 7): Use
BufReader/BufWriterfor large files. HandleENOENT,EPERM,ENOSPCdistinctly — don't collapse I/O errors to strings. Usestd::fs::Pathfor type-safe path handling. - Networking (Ch 8): TCP state is implicit in OS — model explicit state machines with enums. Use trait objects (
Box<dyn Trait>) only when heterogeneous runtime dispatch is needed. Preferimpl Traitfor static dispatch. - Concurrency (Ch 10): Closures passed to threads must be
'staticor usemove. Shared mutable state needsArc<Mutex<T>>. Use channels for message passing over shared state. Thread pool patterns over spawning one thread per task. - Time (Ch 9): Don't use
std::time::SystemTimefor elapsed measurement — it can go backwards. Usestd::time::Instantfor durations. For network time, NTP requires epoch conversion (NTP epoch: 1900 vs Unix: 1970 — offset 70 years = 2_208_988_800 seconds). - Idioms: Iterator adapters over manual loops.
for item in &collectionnotfor i in 0..collection.len().if let/while letfor single-variant matching. Exhaustivematch— no silent wildcard arms. </core_principles>
What ships with it
6 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.
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.
- 4d ago First seen · 351 lines · 156 tokens per session scan A 5cad5b011436
rust-in-action is a skill published in the GitHub repository booklib-ai/booklib (38 stars, last pushed 4mo ago), licensed MIT. It adds 156 tokens to every session and 5,070 once invoked, about $0.0008 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-30.
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.
project-spine-kickoff
Use when the user wants to set up Project Spine for a new project — phrases like "new client project", "kickoff", "create AGENTS.md from scratch", "generate agent instructions for this repo", "set up project context". Runs spine init → edits brief → spine compile → reviews outputs. For stale files use…
project-spine-drift
Use when the user mentions drift, says AGENTS.md / CLAUDE.md / copilot-instructions / Cursor rules are "stale" or "out of date", asks about CI catching docs drift, or says "check if my spine is still current". Runs spine drift check, interprets each drift category, and guides resolution. For initial setup use…
project-spine
Use when the user mentions AGENTS.md, CLAUDE.md, copilot-instructions, Cursor rules, project brief, context for coding agents, agency kickoff, onboarding a new project, or asks "how do I set up Project Spine". This is the orientation skill — reach for it FIRST when the user's intent involves Project Spine, then chain…
project-spine-template
Use when the user wants to apply a bundled, user-local, or project-local template to a new project, or save the current project as a reusable template. Phrases like "use our agency starter", "save this as a template for future clients", "apply the shared saas-marketing starter".
project-spine-rationale
Use when the user wants to review, polish, or share the generated Project Spine rationale file locally. Phrases like "show the project rationale", "send the client a project summary", "review rationale.md", or "make the client-facing overview safer".