rust

rust is a skill for Claude Code from sorah/config. It costs 56 tokens per session (593 once invoked), scanned A, original, MIT.

Rust coding guidance for writing and reviewing Rust programs, including projects using Cargo, crates, and Rust modules.

In plain words
What is it for?
Use it when adding or reviewing Rust code inside a crate or library.
Why use it?
It provides consistent rules for imports, paths, methods, associated functions, and trait implementations without relying on unexplained shorthand.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the sorah-guides plugin — 15 skills, 3 commands, 1 agent shipped together

Good fit Use it when adding or reviewing Rust code inside a crate or library.

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

Made for: Claude Code.

Or install sorah-guides, the plugin that ships this one along with the rest of its 15 skills, 3 commands, 1 agent.

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/sorah/config/rust/github.svg)](https://agentmods.dev/skills/sorah/config/rust)
Your own site
<a href="https://agentmods.dev/skills/sorah/config/rust"><img src="https://agentmods.dev/badge/skills/sorah/config/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/sorah/config/rust"><img src="https://agentmods.dev/badge/skills/sorah/config/rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 593 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.00056 $0.00593
Opus 5.5 $0.00022 $0.00237
Sonnet 5.5 $0.00011 $0.00119
Haiku 4.5 $0.00006 $0.00059

Measured yesterday against content hash 9f8951c82c35, 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 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.

claude/marketplace/plugins/sorah-guides/skills/rust/SKILL.md · 46 lines

How it starts

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

Rust Conventions

Coding conventions and best practices for Rust projects. Project-specific conventions (CLAUDE.md, style guides) always take priority over this guidance.

Coding Guidelines

Import (use) Statements

Default: Don't use use unless explicitly requested by humans

  • Global use statements at the top of files are discouraged (except in mod.rs and lib.rs)
  • Avoid use for structs and enums - ALWAYS prefer full paths (e.g., std::collections::HashMap instead of use std::collections::HashMap)
  • use is allowed for frequently used modules within the same crate (e.g., use crate::error::Error)
  • When importing traits, place the use statement in the most specific scope where they're needed

Using crate:: reference

  • Always use crate:: for referencing items within the same crate, even in the same module (e.g., crate::utils::helper_function())

Methods and Associated Functions

Prefer methods, associated functions, and trait impls over bare fn.

  • Behavior that reads or mutates a type's data is a method on that type, rather than a free fn foo(x: &Type)
  • Constructors and conversions are associated functions (Type::new, Type::from_env) or From/TryFrom/FromStr impls
  • A helper used only by one type's methods is a private associated function in that impl
  • Free functions fit where no type owns the operation: subcommand entry points (cmd::<name>::run(args)), functions a framework or attribute refers to by path (axum handlers, #[serde(default = "...")]), and small stateless utilities

Adding Functionality to Other Types

For a type that cannot take an inherent impl, such as an external crate's struct, one or two functions using it can stay free functions. Beyond that, prefer in order:

  1. A trait: a std or crate-provided one when it fits (From, Display, ...), otherwise a local extension trait (e.g., trait ClientExt implemented for reqwest::Client)
  2. A wrapper struct with methods, when a trait does not fit (e.g., a Cache owning a rusqlite::Connection whose schema it manages)
  3. Free functions taking the type, only when wrapping has a concrete performance cost

Read the full file on GitHub · 46 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. yesterday First seen · 46 lines · 56 tokens per session scan A 9f8951c82c35

Subscribe to this mod's changes

rust is a skill published in the GitHub repository sorah/config (31 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 593 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-17.