/rust-skills:rust-webfrom rust-skills
Designs, implements, tests, and operates production Rust HTTP services using axum and Actix Web. Covers routing, extractors, state, error mapping, middleware, timeouts, observability, graceful shutdown, and database boundaries.
Ships in rust-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Deliver server-side HTTP APIs based on HTTP contracts and runtime lifecycles. The framework handles transport adaptation; domain logic and data access remain independently testable without embedding all backend issues into handlers.
Before modification, verify from OpenAPI specs, existing routes, clients, tests, configuration, and run environments:
Response fields from existing client libraries constitute compatibility constraints. When contracts are missing, declare minimal assumptions first.
rustc --version --verbose
cargo metadata --format-version 1
cargo tree -e features
cargo test --all-targets
Verify service entry points, router composition, state management, error types, middleware ordering, shutdown signals, and testing tools. Adhere strictly to Cargo.lock versions and official documentation; do not mix axum/Tower APIs based on memory rather than versioned specifications.
Recommended call flow:
HTTP request
-> router / extractor / transport validation
-> application service / use case
-> repository or outbound HTTP port
-> domain result/error
-> centralized HTTP response mapping
Refer to Service Boundaries when determining specific layering or adapter requirements.
.await operations across lock-held states; prefer delegating shared mutable state to dedicated services or storage mechanisms.unwrap()/expect() for handling failures in requests, network access, database queries, or serialization; instead, convert unexpressible preconditions into type-level checks and centralized validation that avoids duplication across multiple handlers.Define a single mapping from application errors to HTTP responses:
404, 409, and 403;Each error response must include a stable machine code and request/tracing identifiers for correlation. Full error chains enter controlled logging; responses should not expose SQL queries, tokens, file paths, or backtraces. Avoid mapping all errors to 500 or hiding failures by returning 200.
Review the Tower middleware layer in accordance with actual call order:
Middleware ordering, timeout configurations, and graceful shutdown strategies are documented in Middleware and Lifecycle.
Send/Sync, cancellation safety, and lock scopes to $rust-concurrency.This skill can integrate with services requiring databases or outbound HTTP clients but focuses solely on the server-side boundary:
$rust-database.$rust-web-security; this skill only consumes principal identities and authorization outcomes from verified sources.Ensure coverage of:
Detailed test matrices are provided in HTTP Service Testing. Test organization, coverage targets, CI gate policies, and performance baselines fall under the purview of rust-testing.
cargo fmt --all -- --check
cargo check --all-targets
cargo test --all-targets
cargo clippy --all-targets -- -D warnings
Add OpenAPI/schema compatibility checks, integration environment tests, and security scans per project. Do not silently skip failing dependency-based tests to claim overall pass status.
cargo fmt, cargo check, cargo test, and clippy pass successfully;| Primary Issue | Assigned Responsibility |
|---|---|
| Schema definitions, migrations, transactions, connection pools, SQL/ORM modeling | rust-database |
| Authentication, authorization, sessions/tokens, CORS/CSRF policies, SSRF protection | rust-web-security |
| Tokio tasks, locks, channels, cancellation safety, graceful shutdown implementation | rust-concurrency |
| Test layering strategies, coverage targets, attribute tests, performance baselines | rust-testing |
| Ownership semantics, serde type contracts, generic error design patterns | rust-stable |
| Features, workspace configurations, build scripts, release pipelines | rust-cargo-build |
| Unsafe network libraries, C ABI interfaces, raw buffer handling | rust-unsafe-ffi |
examples/golden-handler/: Offline compilation and verification of transport boundary behavior and error mapping logic.agents/openai.yaml (opens in a new tab)examples/examples.md (opens in a new tab)examples/golden-handler/Cargo.toml (opens in a new tab)examples/golden-handler/src/lib.rs (opens in a new tab)references/middleware-and-lifecycle.md (opens in a new tab)references/service-boundaries.md (opens in a new tab)references/testing.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
29 skills in this plugin
/rust-api-designDesign Rust library APIs that follow the Rust API Guidelines — naming (C-CASE, C-CONV, C-GETTER), interop traits (C-COMMON-TRAITS, C-CONVERT, C-ITER, C-SERDE), predictability (C-INTUITIVE, C-CONST), flexibility (C-GENERIC, C-NEWTYPE, C-EXT), type safety (C-BOOL, C-NONZERO, C-WRAPPER, C-STR), dependability (C-PANIC, C-UNWRAP), debuggability (C-DEBUG), and future-proofing (C-SEALED, C-STRUCT-FIELD, C-NON-EXHAUSTIVE). Use when users design a public crate API, choose between generics/concrete/newtype, decide trait bounds, hide implementation, avoid breakage, or ask "what is idiomatic Rust API design"; hand semver and publish workflow to rust-semver, lint config to rust-style-clippy, and in-crate layout to rust-module-layout./rust-by-exampleShow Rust patterns through short compilable examples — type conversions (From/Into/TryFrom/as/Deref), flow control (if let/while let/match/loop), functions and closures (Fn/FnMut/FnOnce, captures), modules (mod/use/pub/super/self), generics and traits (bounds/associated types/trait objects), error handling (?/Result/thiserror/anyhow), attributes (derive/cfg/inline/allow), unsafe (raw pointers/unions/ABI), procedural macros (derive/attribute/function-like), and inline asm. Use when users ask "how do I write X in Rust", need a concrete pattern with copy-pasteable code, or are migrating from Java/Python/Go/C++ and want the Rust equivalent; hand architecture decisions to rust-api-design/rust-workspace, std API selection to rust-stdlib, and async runtime to rust-concurrency.Generated from the plugin's indexed repository (full-stack-skills/rust-skills) — no native marketplace selected
npx claudepluginhub p/full-stack-skills-rust-skillsOther plugins' skills for the same job