rust

rust is a skill for Claude Code from nimadorostkar/Claude-Skills-collection. It costs 74 tokens per session (1,009 once invoked), scanned A, original, MIT.

A Rust coding guide for libraries, services, and command-line tools. It explains ownership, borrowing, lifetimes, traits, error handling, asynchronous code, and safe use of unsafe code.

In plain words
What is it for?
Use it to build Rust software, fix borrow-checker or lifetime problems, design errors, write Tokio-based async code, and review unsafe blocks.
Why use it?
It helps resolve compiler errors and design code that is memory-safe, predictable, and easier to maintain.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the languages plugin — 12 skills shipped together

Good fit Use it to build Rust software, fix borrow-checker or lifetime problems, design errors, write Tokio-based async code, and review unsafe blocks.

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

Made for: Claude Code.

Or install languages, the plugin that ships this one along with the rest of its 12 skills.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/rust"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,009 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00074 $0.01009
Opus 5.5 $0.00030 $0.00404
Sonnet 5.5 $0.00015 $0.00202
Haiku 4.5 $0.00007 $0.00101

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

Security

Grade A, and why

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.

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/languages/rust/SKILL.md · 110 lines

How it starts

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

Rust

Purpose

Write Rust that satisfies the borrow checker by design rather than by fighting it. Ownership is a modeling decision made before the code is written, not a compiler obstacle discovered afterward.

When to Use

  • Building Rust libraries, services, or CLI tools.
  • Resolving lifetime, borrow, or trait-bound errors.
  • Designing error types for a library versus an application.
  • Writing async Rust with Tokio.
  • Auditing or minimizing unsafe blocks.

Capabilities

  • Ownership and borrowing design: when to clone, when to borrow, when to use Rc/Arc.
  • Error modeling: thiserror for libraries, anyhow for binaries.
  • Trait design, generic bounds, and trait objects.
  • Async runtimes, Send/Sync bounds, and cancellation semantics.
  • Safe encapsulation of unsafe, with documented invariants.

Inputs

  • Crate or module source.
  • Edition and MSRV.
  • Whether the artifact is a library (stable public API) or a binary.

Outputs

  • Code that compiles with zero warnings under clippy::pedantic (or a documented allow-list).
  • Explicit error enums with #[from] conversions.
  • Tests including compile-fail tests for API misuse where warranted.

Workflow

  1. Model ownership first — Decide who owns each value and how long it lives before writing the signature.
  2. Design the error type — A library's error enum is public API. Enumerate failure modes explicitly.
  3. Implement — Start with owned values and clones. Optimize to borrows only where profiling or ergonomics justify it.
  4. Constrain generics late — Write it concrete, then generalize if a second caller appears.
  5. Gate — cargo clippy -- -D warnings, cargo fmt --check, cargo test, cargo deny check.

Best Practices

  • A clone() in non-hot-path code is not a defect. Premature borrow optimization produces unreadable lifetimes.
  • Libraries return concrete error enums; binaries use anyhow::Result and add context at each layer.
  • Never unwrap() outside tests and main. Use expect("invariant: ...") where the invariant is genuinely proven.
  • Prefer impl Trait in argument position for simple bounds; use named generics when the caller must choose the type.
  • Every unsafe block gets a // SAFETY: comment stating the invariant that makes it sound.
  • Use #[non_exhaustive] on public enums you may extend.

Read the full file on GitHub · 110 lines

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 Changed · +32 tokens per session 1067857597c2
  2. 2mo ago First seen · 110 lines · 42 tokens per session scan A bc65541b2eda

Subscribe to this mod's changes

rust is a skill published in the GitHub repository nimadorostkar/Claude-Skills-collection (41 stars, last pushed today), licensed MIT. It adds 74 tokens to every session and 1,009 once invoked, about $0.0003 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-03.

Related

rust compared with skills from other repositories

rust next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rustnimadorostkar/Claude-Skills-collectionSkill41todayMITA74Claude Code
neo-rustBenknightdark/neo-skillsSkill713d agoMITA83Claude Code, Codex
pinocchio-developmentsendaifun/skillsSkill1284mo agoApache-2.0A44Claude Code, Codex
rust-api-guidelinesqiao/rust-api-guidelines-skillSkill48mo agononeA124Claude Code, Codex
migrate-to-rustgoogle/skillsSkill25ktodayApache-2.0A166Claude Code, Codex
polarsK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA47Claude Code
rust-engineerJeffallan/claude-skillsSkill13ktodayMITA120Claude Code