clean-rust

clean-rust is a skill for Claude Code from uwuclxdy/agenticat. It costs 29 tokens per session (2,667 once invoked), scanned A, original, MIT.

A set of conventions for writing, reviewing, and refactoring Rust 2024 code. Rust is a programming language that emphasizes memory safety, and Rust 2024 is its language edition.

In plain words
What is it for?
Use it for Rust APIs, `Result`-based errors, async programs, threads and shared data, serialization, `unsafe` blocks, foreign-function interfaces, and Clippy checks. Clippy is Rust's code-linting tool.
Why use it?
It helps prevent common Rust mistakes in error handling, asynchronous code, concurrency, public interfaces, and unsafe code.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

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

Made for: Claude Code.

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 clean-rust

README.md
[![agentmods](https://agentmods.dev/badge/skills/uwuclxdy/agenticat/clean-rust.svg)](https://agentmods.dev/skills/uwuclxdy/agenticat/clean-rust)
Your own site
<a href="https://agentmods.dev/skills/uwuclxdy/agenticat/clean-rust"><img src="https://agentmods.dev/badge/skills/uwuclxdy/agenticat/clean-rust.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,667 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.1 $0.00029 $0.02667
Opus 5 $0.00015 $0.01333
Sonnet 5 $0.00006 $0.00533
Haiku 4.5 $0.00003 $0.00267

Measured 6d ago against content hash 9890fba05688, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

clean-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 6d 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/clean-rust/SKILL.md · 141 lines

How it starts

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

Clean Rust

Rust-specific conventions for writing, reviewing, and refactoring. The core rules below always apply. Load the one reference file matching the task's domain; don't load them all.

If the clean-code skill is installed, its language-agnostic principles (function size, naming hygiene, comment discipline) still apply. Where generic advice conflicts with Rust idiom, this skill wins. Classic examples: "prefer exceptions over error codes" maps to Result, never panics; "replace switch with polymorphism" maps to exhaustive match, which in Rust is a feature, not a smell.

Task touches File
Error types, propagation helpers, failure semantics, retries references/error-handling.md
async/await, tokio, select!, channels, spawned child processes references/async.md
Threads, atomics, lock ordering, drop order references/concurrency.md
Process-global mutable state (env vars, global overrides) across threads references/edition-2024.md
Public API shape, builders, newtypes, typestate, serde references/api-design.md
Any unsafe block, FFI, raw pointers, exported symbols references/unsafe.md
Writing tests or debugging test infrastructure references/testing.md
Hot paths, allocations, string building, hasher choice references/performance.md
Benchmarks, criterion, #[bench] references/performance.md
Secret files on disk, keys and tokens at rest references/security.md
Logging, tracing spans, log levels references/observability.md
Edition 2024 migration or 2024-specific behavior changes references/edition-2024.md

Errors

  • Result + ? everywhere; no .unwrap()/.expect() outside tests and one-time init of hand-audited literals (LazyLock<Regex> on a fixed pattern). The rare justified expect carries a message naming the invariant that makes it safe.
  • No sentinel returns (-1, "") for failure. Option<T> for absence that isn't an error.
  • thiserror for library errors (callers can match), anyhow/eyre at the application boundary. Never Box<dyn Error> or String as a library error type.
  • Bind a Result once with match/if let/let-else, never .is_ok() followed by separate access or a downstream .unwrap().
  • Pick one failure semantics per operation: best-effort (warn per item, Ok(()) at end) or fail-fast (propagate first error). Never warn-per-item and then fail at the end; that surprises exit-code consumers.

Read the full file on GitHub · 141 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. 6d ago First seen · 141 lines · 29 tokens per session scan A 9890fba05688

Subscribe to this mod's changes

clean-rust is a skill published in the GitHub repository uwuclxdy/agenticat (5 stars, last pushed today), licensed MIT. It adds 29 tokens to every session and 2,667 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

azure-storage-blob-rust

Azure Blob Storage library for Rust. Upload, download, and manage blobs and containers. Triggers: "blob storage rust", "BlobClient rust", "upload blob rust", "download blob rust", "storage container rust", "BlobServiceClient rust".

microsoft/skills · 57 tokens

azure-keyvault-certificates-rust

Azure Key Vault Certificates library for Rust. Create, manage, and use X.509 certificates including self-signed and CA-issued. Triggers: "keyvault certificates rust", "CertificateClient rust", "create certificate rust", "self-signed certificate rust", "X.509 rust".

microsoft/skills · 65 tokens

azure-cosmos-rust

Azure Cosmos DB library for Rust (NoSQL API). Document CRUD, containers, and globally distributed data. Triggers: "cosmos db rust", "CosmosClient rust", "document crud rust", "NoSQL rust", "partition key rust".

microsoft/skills · 56 tokens

azure-eventhub-rust

Azure Event Hubs library for Rust. Send and receive events for streaming data ingestion and batch processing. Triggers: "event hubs rust", "ProducerClient rust", "ConsumerClient rust", "send event rust", "streaming rust", "eventhub rust".

microsoft/skills · 58 tokens

azure-identity-rust

Azure Identity library for Rust. Microsoft Entra ID authentication for all Azure SDK clients. Triggers: "azure identity rust", "DeveloperToolsCredential", "authentication rust", "managed identity rust", "credential rust", "Entra ID rust".

microsoft/skills · 54 tokens

azure-keyvault-keys-rust

Azure Key Vault Keys library for Rust. Create, manage, and use cryptographic keys including RSA, EC, and HSM-protected keys. Triggers: "keyvault keys rust", "KeyClient rust", "create key rust", "encrypt rust", "wrap key rust", "sign rust".

microsoft/skills · 68 tokens