rust-skills

rust-skills is a skill for Claude Code from martineserios/thebrana. It costs 23 tokens per session (3,960 once invoked), scanned A, original, MIT.

A reference guide containing rules for writing idiomatic, efficient Rust code. Rust is a programming language that emphasizes memory safety and explicit control over program behavior.

In plain words
What is it for?
Use it when writing, reviewing, refactoring, or optimizing Rust functions, modules, libraries, and public interfaces.
Why use it?
It helps developers and coding agents make consistent decisions about ownership, errors, asynchronous code, APIs, performance, and other common Rust concerns.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Part of the brana plugin — 56 skills, 4 commands, 14 agents, 13 hooks shipped together

Good fit Use it when writing, reviewing, refactoring, or optimizing Rust functions, modules, libraries, and public interfaces.

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

Made for: Claude Code.

Or install brana, the plugin that ships this one along with the rest of its 56 skills, 4 commands, 14 agents, 13 hooks.

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-skills

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/martineserios/thebrana/rust-skills"><img src="https://agentmods.dev/badge/skills/martineserios/thebrana/rust-skills.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,960 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.00023 $0.03960
Opus 5 $0.00012 $0.01980
Sonnet 5 $0.00005 $0.00792
Haiku 4.5 $0.00002 $0.00396

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

Security

Grade A, and why

rust-skills 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.

system/skills/rust-skills/SKILL.md · 331 lines

How it starts

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

Rust Best Practices

Comprehensive guide for writing high-quality, idiomatic, and highly optimized Rust code. Contains 179 rules across 14 categories, prioritized by impact to guide LLMs in code generation and refactoring.

When to Apply

Reference these guidelines when:

  • Writing new Rust functions, structs, or modules
  • Implementing error handling or async code
  • Designing public APIs for libraries
  • Reviewing code for ownership/borrowing issues
  • Optimizing memory usage or reducing allocations
  • Tuning performance for hot paths
  • Refactoring existing Rust code

Rule Categories by Priority

Priority Category Impact Prefix Rules
1 Ownership & Borrowing CRITICAL own- 12
2 Error Handling CRITICAL err- 12
3 Memory Optimization CRITICAL mem- 15
4 API Design HIGH api- 15
5 Async/Await HIGH async- 15
6 Compiler Optimization HIGH opt- 12
7 Naming Conventions MEDIUM name- 16
8 Type Safety MEDIUM type- 10
9 Testing MEDIUM test- 13
10 Documentation MEDIUM doc- 11
11 Performance Patterns MEDIUM perf- 11
12 Project Structure LOW proj- 11
13 Clippy & Linting LOW lint- 11
14 Anti-patterns REFERENCE anti- 15

Quick Reference

1. Ownership & Borrowing (CRITICAL)

  • \1 - Prefer &T borrowing over .clone()
  • \1 - Accept &[T] not &Vec<T>, &str not &String
  • \1 - Use Cow<'a, T> for conditional ownership
  • \1 - Use Arc<T> for thread-safe shared ownership
  • \1 - Use Rc<T> for single-threaded sharing
  • \1 - Use RefCell<T> for interior mutability (single-thread)
  • \1 - Use Mutex<T> for interior mutability (multi-thread)
  • \1 - Use RwLock<T> when reads dominate writes
  • \1 - Derive Copy for small, trivial types
  • \1 - Make Clone explicit, avoid implicit copies
  • \1 - Move large data instead of cloning
  • \1 - Rely on lifetime elision when possible

Read the full file on GitHub · 331 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 · 331 lines · 23 tokens per session scan A 17fefe234333

Subscribe to this mod's changes

rust-skills is a skill published in the GitHub repository martineserios/thebrana (3 stars, last pushed 2d ago), licensed MIT. It adds 23 tokens to every session and 3,960 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-09-03.

Related

Other skills, from other repositories

arch

Orchestrated Rust project architect — requirements to tested implementation with parallel teammates for design, coding, review, and fuzzing.

qGolem/orc · 24 tokens

rust-skills

Comprehensive Rust coding guidelines with 265 rules across 26 categories. Use when writing, reviewing, or refactoring Rust code. Covers ownership, error handling, async patterns, concurrency, unsafe code, API design, memory optimization, performance, numeric safety, conversions, serde, pattern matching, macros…

leonardomso/rust-skills · 84 tokens

typescript-rules

React/TypeScript frontend development rules including type safety, component design, state management, and error handling. Use when implementing React components, TypeScript code, or frontend features.

shinpr/claude-code-workflows · 39 tokens

cloudflare-workers-multi-lang

Multi-language Workers development with Rust, Python, and WebAssembly. Use when building Workers in languages other than JavaScript/TypeScript, or when integrating WASM modules for performance-critical code.

secondsky/claude-skills · 45 tokens

ring:adopting-lib-commons-huma-wrapper

Adopting the lib-commons/v5 shared Huma (OAS 3.1) OpenAPI wrapper + RFC 9457 problem model (commons/net/http/{openapi,problem}) in a Lerian Go service: wire openapi.New/ServeSpec + problem.Install (central >=500 scrub) on BOTH runtime and spec-gen paths, the per-rail problem.MapError flex seam, and rename-only spec…

LerianStudio/ring · 142 tokens

procoder

Work like a senior developer in a repository governed by procoder: run the commit gate before calling anything done, format and lint through the binary, and drive the spec, plan, todo, backlog, and sprint chain in .procoder/. Use this skill when the repository contains a .procoder/ directory or an AGENTS.md naming…

azrtydxb/procoder · 101 tokens