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 skills add kabudu/engineering-agent-skills --skill rust-best-practicesgit clone --depth 1 https://github.com/kabudu/engineering-agent-skillsWrote 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/kabudu/engineering-agent-skills/rust-best-practices)<a href="https://agentmods.dev/skills/kabudu/engineering-agent-skills/rust-best-practices"><img src="https://agentmods.dev/badge/skills/kabudu/engineering-agent-skills/rust-best-practices/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.
<a href="https://agentmods.dev/skills/kabudu/engineering-agent-skills/rust-best-practices"><img src="https://agentmods.dev/badge/skills/kabudu/engineering-agent-skills/rust-best-practices.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00052 | $0.01242 |
| Opus 5.5 | $0.00021 | $0.00497 |
| Sonnet 5.5 | $0.00010 | $0.00248 |
| Haiku 4.5 | $0.00005 | $0.00124 |
Grade A, and why
rust-best-practices 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.
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 — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust best practices
Produce idiomatic Rust that satisfies the requested behaviour and the project's contracts. Follow repository instructions, established conventions, and supported toolchains. Keep changes scoped; do not replace working architecture or introduce dependencies solely to satisfy a preference here.
Establish the contract
Read the affected code, tests, Cargo manifests, toolchain configuration, and relevant CI commands. Identify the edition, minimum supported Rust version (MSRV), deployment targets, feature combinations, and whether the changed interface has downstream consumers. A lib.rs alone does not imply a published compatibility promise.
Before refactoring, establish observable behaviour and relevant failure semantics. Preserve public signatures, errors, output, and feature behaviour unless the request authorises changes. A panic-to-error conversion can change a public signature; explain the migration rather than assuming it is compatible. Add focused regression coverage for demonstrated bugs or fragile behaviour.
Implement with explicit contracts
- Prefer clear concrete types and direct code. Use enums or newtypes when they prevent meaningful invalid states or unit confusion; introduce traits and builders for actual variation or construction needs.
- Borrow when reading, use mutable borrows for in-place updates, and consume by value when storing or transferring ownership. Prefer
&strand slices when callers need no container-specific operations. Choose generic conversion/iterator parameters only when their flexibility earns the complexity. - Start with unique ownership. Use
Arc,Rc, locks, and interior mutability when sharing or mutation is intentional. Their presence in an API is a design question, not automatically a defect. Before cloning to resolve a borrow conflict, consider shortening the borrow, separating disjoint state, or moving withtake/replace; deliberate cheap copies are valid. - Use
Optionfor normal absence,Resultfor expected failures, and panics for violated internal invariants. Check whether external input can violate a claimed invariant. A justifiedexpectshould explain the invariant; do not mechanically replace everyunwrapor promise panic-free behaviour without evidence. - Preserve actionable error context and causal chains. Public error types should support the contracts callers need, normally
DisplayandError; requireSend,Sync, or'staticwhen the execution/API model needs them. Prefer typed errors when callers inspect failures; error erasure can be intentional. Do not add an error framework by default. - Keep visibility narrow and public APIs intentional. Implement applicable standard traits and conversion conventions; use fallible conversions when validation can fail. Keep
Eq,Ord,PartialOrd, andHashconsistent over the same semantic value. Derived implementations are fine when consistent with custom ones. - Treat public fields, trait bounds, enum variants, feature behaviour, and exposed dependency types as compatibility decisions. Follow existing API conventions; do not add sealing,
non_exhaustive, or new wrappers without considering their costs. - Bound work and resource consumption for untrusted input. Check parser sizes, allocation growth, retries, and partial-failure cleanup where relevant; safe Rust does not prevent resource exhaustion.
- Handle integer range and conversion semantics explicitly at trust boundaries. Choose checked, saturating, wrapping, or fallible operations according to the contract. A numeric
ascast can truncate; do not confuse truncation with a panic. - Prefer readable iteration and pattern matching over mechanical rewrites between loops, combinators, and
match. Avoid speculative abstraction and unmeasured optimisation. Keep externally visible ordering deterministic when the contract requires it. - Document public contracts that types cannot express: failure modes, panics, safety obligations, side effects, and meaningful ownership or complexity constraints. Examples should demonstrate realistic error handling. Follow existing documentation conventions instead of imposing a template on every private helper.
What ships with it
5 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.
- yesterday First seen · 53 lines · 52 tokens per session scan A b9890b23eae3
rust-best-practices is a skill published in the GitHub repository kabudu/engineering-agent-skills (3 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 1,242 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-10-26.
Other skills, from other repositories
rust-programming-expert
Expert-level skill for Rust programming (Rust 2024 / v1.88+). Covers memory safety, Grounded Permissions Model (R/W/O/F), async Axum 0.8/SQLx, CLI, and zero-cost optimization in English and Indonesian.
tauri-expert
Expert guide for Tauri 2.x / 2.12+ cross-platform desktop and mobile development: Rust 1.90+ MSRV, IPC Channel streaming, onpermissionrequest handlers, App-Bound domains, and Capabilities security / Panduan ahli pengembangan desktop dan mobile Tauri 2.x / 2.12+.
wasm-edge-computing-expert
Expert guide for WebAssembly (WASM) and Edge Computing. Covers WASI preview 2, Spin/Fermyon, Cloudflare Workers WASM, and high-performance browser computing / Panduan ahli untuk WebAssembly (WASM) dan Edge Computing. Mencakup WASI preview 2, Spin/Fermyon, Cloudflare Workers WASM, dan komputasi performa tinggi di…
rewrite-rustdoc
Rewrite Rust documentation comments to ensure all documentation and comments are in English, following rustdoc guidelines. Use when the user wants to clean up Rust documentation, translate Chinese comments to English, fix missing documentation, or ensure rustdoc compliance in a Rust codebase.
migrate-to-rust
Clones, analyzes, plans, and migrates legacy codebases (C++, Fortran, Java, Python, C, Shell) from a GitHub URL or local directory to a modern, high-performance, deterministic, 100% Safe Rust architecture, tracking live telemetry across every task bucket, test failure/fix cycle, and Profile-Guided Optimization (PGO)…
setup-ts-deep-modules
A TypeScript repository setup that keeps each package's internal code private behind root-level entry files. A package is a reusable unit of code, and an entry point is the file other code is meant to import.