rust

rust is a skill for Claude Code, Codex from kouroshez/coding-os. It costs 122 tokens per session (1,019 once invoked), scanned A, original, Apache-2.0.

A set of coding rules for Rust services built with Axum, covering routes, request handlers, shared state, errors, middleware, and asynchronous tests.

In plain words
What is it for?
Use it to build or modify Axum routes, handlers, request and response types, application wiring, middleware, and Tokio tests.
Why use it?
It keeps web-specific code separate from business logic and makes error handling and service changes easier to test.

Skill for Claude CodeCodex

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

Good fit Use it to build or modify Axum routes, handlers, request and response types, application wiring, middleware, and Tokio tests.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/kouroshez/coding-os/rust/github.svg)](https://agentmods.dev/skills/kouroshez/coding-os/rust)
Your own site
<a href="https://agentmods.dev/skills/kouroshez/coding-os/rust"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/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/kouroshez/coding-os/rust"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,019 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.00122 $0.01019
Opus 5 $0.00061 $0.00509
Sonnet 5 $0.00024 $0.00204
Haiku 4.5 $0.00012 $0.00102

Measured 5d ago against content hash 866383f03515, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 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.

src/templates/rust-axum/skills/rust/SKILL.md · 74 lines

How it starts

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

REQUIRED BACKGROUND: You MUST also follow the core backend-fundamentals skill (request lifecycle, layering, idempotency) and clean-code (fail-closed errors, self-documenting code, error-path tests). This skill adds ONLY Rust + Axum-specific patterns on top; api-design governs the public contract.

rust

Layer contract (matches structure.tree) — the SSOT for layering

Layer May import Never
main.rs app.rs (the router builder), tokio handler/business logic
app.rs routes::*, tower layers, AppState request-specific logic
routes/<domain>.rs (handlers) AppState, extractors, services, AppError another domain's privates, raw response bodies
error.rs (AppError) domain error types handlers, route wiring

Handlers are thin async fns returning Result<T, AppError> — they parse via an extractor, call one service method, and return the value (Axum serializes). The business logic survives a transport swap because nothing below the handler imports an Axum type.

Handlers (thin) & routing

  • A handler signature is async fn(State<Arc<AppState>>, <Extractor>) -> Result<Json<T>, AppError>. Parse/validate via the extractor → call ONE service method → return Ok(Json(..)).
  • Never hand-build the response envelope or match on errors to build JSON — ?-propagate into AppError and let its IntoResponse shape the body.
  • Routes are assembled in app.rs (Router::new().route(...).with_state(state)); one module per domain under routes/, re-exported through routes/mod.rs.

Error handling (the one shaper)

  • ONE AppError enum in error.rs implements IntoResponse — it is the ONLY place that writes an error body (RFC 9457 problem shape per docs/api-contracts/error-format.md). Map domain errors into it with thiserror + From so handlers stay ?-only.
  • Unknown/internal errors → 500 with a generic body; full detail goes to the tracing logger only — never a Debug/backtrace or DB message to the client.

Read the full file on GitHub · 74 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 74 lines · 122 tokens per session scan A 866383f03515

Subscribe to this mod's changes

rust is a skill published in the GitHub repository kouroshez/coding-os (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 122 tokens to every session and 1,019 once invoked, about $0.0006 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

rust-programming-expert

Expert-level skill for Rust programming (Rust 2024 / v1.85+). Covers memory safety, async, Axum/SQLx, CLI, and optimization in English and Indonesian.

roedyrustam/vibes-plug · 45 tokens

warp

Warp Rust web framework using filters. Covers routing, filters, rejection, WebSocket, and TLS. Use for composable, type-safe Rust APIs. USE WHEN: user mentions "warp", "rust filters", "composable rust api", asks about "warp filters", "warp rejection", "filter composition rust", "rust hyper warp", "warp websocket" DO…

claude-dev-suite/claude-dev-suite · 118 tokens

actix-web

Actix-web Rust web framework. Covers routing, extractors, middleware, state management, and WebSocket. Use for high-performance Rust APIs. USE WHEN: user mentions "actix-web", "actix", "rust web framework", "rust api", asks about "rust async web", "actix middleware", "actix extractors", "rust websocket", "high…

claude-dev-suite/claude-dev-suite · 124 tokens

axum

Axum Rust web framework by Tokio. Covers routing, handlers, extractors, middleware, and state. Use for ergonomic async Rust APIs. USE WHEN: user mentions "axum", "tokio web", "rust async api", "tower middleware", asks about "axum extractors", "axum state", "axum router", "rust websocket axum", "hyper server"…

claude-dev-suite/claude-dev-suite · 130 tokens

rocket

Rocket Rust web framework. Covers routing, fairings, guards, state, and testing. Use for type-safe, boilerplate-free Rust APIs. USE WHEN: user mentions "rocket", "rust type-safe api", "rocket guards", asks about "rocket fairings", "rocket state", "compile-time route checking", "rust web macros", "rocket testing" DO…

claude-dev-suite/claude-dev-suite · 119 tokens

rc-axum

Implements and reviews Axum 0.8+ APIs in Rust — routing, State, extractors, Tower middleware, typed errors, WebSockets, CORS, timeouts, hardening. Use when building or changing Axum backends, handlers, middleware, or WS endpoints. Do not use for SvelteKit (rc-sveltekit), the SQLx data layer alone (rc-sqlx), or Rust…

rodolfochicone/rc-project · 98 tokens