rust-code-style

A set of coding conventions for writing and refactoring Rust in the Wassette repository, including error handling, shared state, tests, and code checks.

In plain words
What is it for?
Use it when adding or changing Rust files, writing tests, handling errors, managing dependencies, or running the repository's formatting and linting commands.
Why use it?
It gives contributors consistent rules for readable code and catches formatting, lint, and unused-dependency problems before changes are committed.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/microsoft/wassette/rust-code-style
Any agent
npx skills add microsoft/wassette --skill rust-code-style
Clone the repo
git clone --depth 1 https://github.com/microsoft/wassette

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 414 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00068 $0.00414
Opus 5 $0.00034 $0.00207
Sonnet 5 $0.00014 $0.00083
Haiku 4.5 $0.00007 $0.00041

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

Security

Grade B, and why

rust-code-style scanned grade B with 1 finding 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 2d 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

Write code that passes `cargo clippy` without warnings.
.agents/skills/rust-code-style/SKILL.md · 44 lines

What it actually says

rust-code-style skill

Apply Wassette's Rust conventions when writing or refactoring .rs files.

Best practices

  • Single responsibility: each function and struct has one clear purpose.
  • DRY: extract shared logic into reusable functions or modules.
  • Descriptive naming: name functions, variables, and types for readability.
  • Unit tests: cover every public function and its edge cases.
  • Keep it simple: prefer straightforward solutions over clever complexity.
  • Dependencies: manage them carefully in Cargo.toml; avoid unnecessary ones that bloat the project.
  • Error handling: use anyhow to add context and stack traces.
  • Traits and generics: use traits for shared behavior and generics for reusable, type-safe, extensible APIs.
  • Thread safety: use stdlib primitives like Arc and Mutex for shared state.
  • Performance: choose appropriate data types, e.g. &str over String when possible.

Formatting and linting

Always run before committing:

cargo +nightly fmt          # Format (nightly toolchain required)
cargo clippy --workspace    # Lint; resolve every warning
cargo machete               # Check for unused dependencies

Write code that passes cargo clippy without warnings.

Every .rs file must start with the Microsoft copyright header. See the copyright-headers skill for the exact format and the automated script.

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. 2d ago First seen · 44 lines · 68 tokens per session scan B fb296fabc6b0

Subscribe to this mod's changes

rust-code-style is a skill published in the GitHub repository microsoft/wassette (938 stars, last pushed 4d ago), licensed MIT. It adds 68 tokens to every session and 414 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

Multi-Sig & Account Permissions

Manage TRON multi-sig permissions — configure keys, thresholds, and co-signed proposals.

BofAI/skills · 26 tokens

traverse-ops

Start or resume the standard Traverse operating model when the user says TRAVERSE OPS, asks to start Traverse ops/dev work, asks for the ready-ticket worker, PR finisher, or backlog gardener, or wants Codex to pick ready Project 1 work and run the Traverse coordination process.

traverse-framework/traverse · 63 tokens

speckit-constitution

Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.

traverse-framework/traverse · 27 tokens

frontmcp-authorities

Use when implementing authorization and access control for FrontMCP tools, resources, prompts, or skills, deciding who may invoke what. Covers the RBAC, ABAC, and ReBAC models and when to choose each; JWT claims mapping per identity provider (Auth0, Keycloak, Okta, Cognito, Frontegg); reusable named authority…

agentfront/frontmcp · 165 tokens

tao-list-capabilities

Answer what the TAO Skill Bank plugin can do by generating the response from packaged application, data, model, AutoML, and platform manifests. Use when the user asks "what can TAO Skill Bank do", "list TAO models", "which TAO workflows are available", or "what supports AutoML".

NVIDIA-TAO/tao-skill-bank · 70 tokens

cis-aws-foundations-2.14

Ensure IAM policies that allow full ":" administrative privileges are not attached.

CyberStrikeus/CyberStrike · 24 tokens