vorn: Skill for Claude Code

.claude/skills/rust-idioms/SKILL.md

rust-idioms is a skill for Claude Code from vorn-run/vorn. It costs 57 tokens per session (2,100 once invoked), scanned A, original, MIT.

A set of guidelines for writing and reviewing Rust code, including data types, errors, memory use, asynchronous work, tests, performance, and dependencies.

In plain words
What is it for?
It is for implementing or reviewing Rust in the project's native core and checking a Rust diff before a push.
Why use it?
It provides consistent rules for Rust changes and helps catch design or quality problems before code is pushed.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is vorn-run/vorn's own configuration. It tells Claude Code how to work on vorn itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything vorn configures →

Reuse

Borrowing it

Nothing to install: this file belongs to vorn-run/vorn. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/vorn-run/vorn/main/.claude/skills/rust-idioms/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/vorn-run/vorn

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/vorn-run/vorn/rust-idioms"><img src="https://agentmods.dev/badge/skills/vorn-run/vorn/rust-idioms.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,100 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.00057 $0.02100
Opus 5.5 $0.00023 $0.00840
Sonnet 5.5 $0.00011 $0.00420
Haiku 4.5 $0.00006 $0.00210

Measured 11d ago against content hash 7d9ab83f534f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rust-idioms 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 11d 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.

.claude/skills/rust-idioms/SKILL.md · 160 lines

How it starts

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

Rust idioms for Vorn

Written for the pinned toolchain (packages/core/rust-toolchain.toml) and for a terminal core where every byte a shell prints passes through this code. When a rule here and the surrounding code disagree, match the surrounding code and raise it in the PR.

Types and data

  • Model states as enums, not flags plus Options. If two fields are only valid together, they belong in one variant.
  • Newtypes for units that must not mix: byte offsets, record numbers, epochs, UTF-16 lengths, columns. struct Rseq(u64) costs nothing and makes a swapped argument a compile error.
  • Strings: take &str (or &[u8] for terminal bytes, which are not UTF-8 guaranteed), return String only when the caller needs ownership. Cow<'_, str> when a function usually returns its input unchanged.
  • Collections: Vec by default; VecDeque for rings; HashMap for lookups; BTreeMap when order matters or for deterministic output in tests and serialization. Derive Hash, Eq, PartialEq together, never by hand unless the semantics differ.
  • Conversions through From/TryFrom, not ad hoc to_x() helpers. Use TryFrom whenever the conversion can lose information (usize to u32 on the wire is the usual one).
  • Derive Debug on every public type; derive Clone, Default, Copy only when they are cheap and meaningful.

Errors

  • Library crates return Result<T, CrateError> with an error enum per crate (implement std::error::Error and Display, by hand or with thiserror if it is already in the tree). The message says what failed and with which input, in the words the TypeScript used when parity matters.
  • ? to propagate, with From impls between layers. No Box<dyn Error> in a library's public API.
  • unwrap()/expect() only for invariants the code itself establishes, with expect("why this cannot fail"). Never on input from a PTY, a file, the network or a client.
  • Panics never cross FFI.

Read the full file on GitHub · 160 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. 11d ago Changed 7d9ab83f534f
  2. 15d ago Changed · +19 lines 696b2f2b7c80
  3. 24d ago First seen · 141 lines · 57 tokens per session scan A c7d2b42114c4

Subscribe to this mod's changes

rust-idioms is a skill published in the GitHub repository vorn-run/vorn (25 stars, last pushed today), licensed MIT. It adds 57 tokens to every session and 2,100 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-05.

Related

Other skills, from other repositories

neo-rust

Use this skill when writing, refactoring, debugging, or auditing Rust code. Trigger for .rs files, Cargo projects, ownership/borrowing/lifetime issues, Result/Option error handling, unnecessary clone/performance work, unsafe code review, or modern Rust architecture.

Benknightdark/neo-skills · 58 tokens

standards

Use this agent when you need to evaluate code, architecture, or development practices against the NASAB framework principles and Rust best practices.

samibs/skillfoundry · 29 tokens

rs-reviewer

Review selected Rust code for ownership, errors, concurrency, async lifecycle, unsafe and FFI contracts, and runtime/API defects using the project's actual toolchain, features, and dependencies.

RaNDoM6913/claude-code-superkit · 40 tokens

refactoring-csharp

Rename and refactor C# symbols in a .NET solution or multi-solution monorepo with a one-shot Roslyn CLI. Use when the user asks to rename a symbol, preview impact, update references across a solution, or refactor shared projects across several solutions.

CodeAlive-AI/ai-driven-development · 60 tokens

m15-anti-pattern

Use when reviewing code for anti-patterns. Keywords: anti-pattern, common mistake, pitfall, code smell, bad practice, code review, is this an anti-pattern, better way to do this, common mistake to avoid, why is this bad, idiomatic way, beginner mistake, fighting borrow checker, clone everywhere, unwrap in production…

moeru-ai/auv · 101 tokens

resharper-clt

Use the free official JetBrains ReSharper Command Line Tools for .NET repositories. USE FOR: jb inspectcode; jb cleanupcode; stronger C# inspections, cleanup profiles, and CI-friendly JetBrains analysis. DO NOT USE FOR: replacing tests with inspection output; ad-hoc formatting-only work when the repo intentionally…

managedcode/dotnet-skills · 107 tokens