rust

rust is a skill for Claude Code, Codex from andresquirogadev/skillsense. It costs 0 tokens per session (542 once invoked), scanned A, original, MIT.

A set of conventions for writing Rust, a programming language that checks memory use and many errors while compiling. It covers ownership, error handling, types, traits, and concurrency.

In plain words
What is it for?
Use it when building or reviewing Rust applications and libraries, particularly code involving errors, shared data, generic types, threads, or API design.
Why use it?
It helps keep Rust code safe and understandable by avoiding unsafe shortcuts and choosing suitable ways to pass data, report errors, and share values.

Skill for Claude CodeCodex

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

Good fit Use it when building or reviewing Rust applications and libraries, particularly code involving errors, shared data, generic types, threads, or API design.

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

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 rust

README.md
[![agentmods](https://agentmods.dev/badge/skills/andresquirogadev/skillsense/rust.svg)](https://agentmods.dev/skills/andresquirogadev/skillsense/rust)
Your own site
<a href="https://agentmods.dev/skills/andresquirogadev/skillsense/rust"><img src="https://agentmods.dev/badge/skills/andresquirogadev/skillsense/rust.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 542 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.00000 $0.00542
Opus 5 $0.00000 $0.00271
Sonnet 5 $0.00000 $0.00108
Haiku 4.5 $0.00000 $0.00054

Measured 7d ago against content hash d99bf97151f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 7d 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.

packages/catalog/skills/rust/SKILL.md · 51 lines

How it starts

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

Rust Skill

You are working on a Rust project. Apply these conventions.

Ownership & Borrowing

  • Prefer passing references (&T / &mut T) over moving values unless ownership transfer is intended.
  • Use Clone explicitly when you do want a copy — the compiler will tell you when it's needed.
  • Use Cow<'_, str> for functions that may return either borrowed or owned string data.
  • Use Arc<T> for shared ownership across threads; Rc<T> for single-threaded shared ownership.

Error Handling

  • Use Result<T, E> for recoverable errors; use ? to propagate errors up the call stack.
  • Define domain-specific error types with thiserror:
    #[derive(Debug, thiserror::Error)]
    pub enum AppError {
        #[error("database error: {0}")]
        Database(#[from] sqlx::Error),
    }
    
  • Use anyhow::Result in application code where detailed error types aren't needed.
  • Never use .unwrap() in library or production code — use .expect("descriptive message") during prototyping only.

Types & Traits

  • Use impl Trait in function arguments for ergonomic generics: fn process(items: impl Iterator<Item = u32>).
  • Implement Display for user-facing types and Debug for all types (use #[derive(Debug)]).
  • Use From / Into for cheap conversions; TryFrom / TryInto for fallible ones.
  • Use Default trait and #[derive(Default)] where sensible.

Async (Tokio)

  • Use tokio::main macro for the async entry point.
  • Use tokio::spawn for fire-and-forget tasks; collect handles to join or detect panics.
  • Use tokio::select! for racing multiple async futures.
  • Use tokio::sync::Mutex (async-aware) instead of std::sync::Mutex in async contexts.

Performance

  • Avoid unnecessary heap allocations in hot paths — consider SmallVec or stack arrays.
  • Use iterators instead of manual loops — the optimizer handles them well.
  • Profile with cargo flamegraph or perf before micro-optimizing.

Clippy & Formatting

  • Always run cargo clippy --all-targets -- -D warnings in CI.
  • Always run cargo fmt --check in CI.
  • Run cargo test with RUST_BACKTRACE=1 to get full backtraces on failures.

Read the full file on GitHub · 51 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. 7d ago First seen · 51 lines · 0 tokens per session scan A d99bf97151f0

Subscribe to this mod's changes

rust is a skill published in the GitHub repository andresquirogadev/skillsense (2 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 542 tokens. 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.