rust-pro

rust-pro is a skill for Claude Code, Codex from bugrabilge/bilge-development-kit. It costs 36 tokens per session (1,841 once invoked), scanned A, original, MIT.

A guide to writing Rust code, covering the language's rules for managing memory, handling errors, running asynchronous work, and coordinating concurrent tasks.

In plain words
What is it for?
Use it to write, review, or debug Rust modules, including code involving ownership, borrowing, lifetimes, asynchronous operations, and concurrency.
Why use it?
It helps explain and resolve Rust's strict compiler errors while keeping code safe and idiomatic.

Skill for Claude CodeCodex

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

Good fit Use it to write, review, or debug Rust modules, including code involving ownership, borrowing, lifetimes, asynchronous operations, and concurrency.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/bugrabilge/bilge-development-kit/rust-pro"><img src="https://agentmods.dev/badge/skills/bugrabilge/bilge-development-kit/rust-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,841 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.00036 $0.01841
Opus 5 $0.00018 $0.00920
Sonnet 5 $0.00007 $0.00368
Haiku 4.5 $0.00004 $0.00184

Measured 5d ago against content hash de57ccd0f42c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

rust-pro 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 5d 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/rust-pro/SKILL.md · 232 lines

How it starts

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

Rust Pro

"In Rust, the compiler is your strictest code reviewer and your most reliable safety net."

When to Use

  • Writing new Rust code or modules
  • Reviewing Rust code for idiomatic patterns
  • Debugging ownership, borrowing, or lifetime errors
  • Implementing async Rust with Tokio or async-std
  • Designing concurrent systems with Rust's guarantees
  • Choosing between Rust abstractions (trait objects vs. generics, Arc vs. Rc)

Ownership and Borrowing

Core Rules

  1. Each value has exactly one owner
  2. When the owner goes out of scope, the value is dropped
  3. You can have either one mutable reference OR any number of immutable references (not both)

When to Clone vs. Borrow

  • Borrow (&T or &mut T) by default; cloning is a last resort, not a first instinct
  • Clone when you need independent ownership (e.g., sending data to another thread)
  • Clone when the data is small and cheap to copy (small strings, numbers, small structs)
  • Use Cow<'_, T> when you sometimes need to own and sometimes need to borrow

Common Ownership Patterns

// Transfer ownership
fn process(data: Vec<u8>) { /* owns data, dropped at end */ }

// Borrow immutably
fn analyze(data: &[u8]) -> usize { data.len() }

// Borrow mutably
fn transform(data: &mut Vec<u8>) { data.push(0); }

// Return owned data
fn create() -> Vec<u8> { vec![1, 2, 3] }

Avoiding Borrow Checker Fights

  • Structure code so borrows have clear, non-overlapping scopes
  • Split structs if one field's borrow conflicts with another's mutation
  • Use indices instead of references into collections you need to mutate
  • Consider interior mutability (RefCell, Mutex) when shared mutable state is truly needed

Lifetimes

When Annotations Are Needed

  • Function signatures with references in both input and output
  • Struct definitions that hold references
  • Impl blocks for structs with lifetime parameters

Lifetime Elision Rules

  1. Each input reference gets its own lifetime parameter
  2. If there is exactly one input lifetime, it is assigned to all output lifetimes
  3. If one input is &self or &mut self, its lifetime is assigned to all outputs

Read the full file on GitHub · 232 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. 5d ago First seen · 232 lines · 36 tokens per session scan A de57ccd0f42c

Subscribe to this mod's changes

rust-pro is a skill published in the GitHub repository bugrabilge/bilge-development-kit (10 stars, last pushed 4mo ago), licensed MIT. It adds 36 tokens to every session and 1,841 once invoked, about $0.0002 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.