No slash command · from fuse-rust
Provides the 2026 Rust web-backend stack: axum 0.8 routing, extractors, shared state, tower-http middleware, error-to-response mapping, and sqlx compile-time-checked database access.
Ships in fuse-rust. 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.
It also names the honest alternatives — sea-orm for an ActiveRecord-style ORM, diesel for a mature but synchronous alternative needing spawn_blocking — and structured observability via tracing.
Out of scope: raw async/concurrency primitives (channels, locks, task spawning) belong to rust-async-concurrency; cross-domain crate selection belongs to rust-ecosystem-crates.
Before building the service, spawn in parallel:
After building, run fuse-ai-pilot:sniper.
| Layer | Crate | Why |
|---|---|---|
| Runtime | tokio | De-facto async runtime; everything targets it |
| HTTP framework | axum 0.8.x | Tower-based, extractor ergonomics, minimal magic |
| Middleware | tower / tower-http | Composable layers (trace, cors, timeout, compression) |
| Database | sqlx 0.9 | Async, query! compile-time-checked SQL, no DSL; Postgres/MySQL/SQLite |
| Observability | tracing + tracing-subscriber | Structured, async-aware spans and logs |
Honest alternatives: sea-orm (ActiveRecord-style ORM, higher-level than sqlx), diesel 2.x (mature, synchronous — needs spawn_blocking or a sync pool in async apps). Prefer sqlx for the standard stack; reach for these only when their model fits.
/{id}, not /:id — /*rest became /{*rest}. The old matchit syntax will not compile.IntoResponse — never .unwrap() in a handler. Map domain errors to a status + body via one app error type.State<T>, wrapped once — put the pool/config in an Arc-friendly struct; extract it with State, do not use globals.sqlx::query! needs DATABASE_URL at compile time — or a committed .sqlx/ offline cache (cargo sqlx prepare). Plan this before CI.#[async_trait] on axum extractors — 0.8 uses RPITIT; custom FromRequestParts impls must drop the macro.| Topic | Reference | When to Consult |
|---|---|---|
| Architecture | architecture.md | Router, extractors, State, tower middleware layout |
| Error handling | error-handling.md | App error type + IntoResponse |
| Database | database.md | sqlx pool, query!, migrations, alternatives |
| Observability | observability.md | tracing spans, subscriber, request logging |
| Template | When to Use |
|---|---|
| rest-service.md | Complete minimal REST service (router + state + handlers + errors + tracing) |
let app = Router::new()
.route("/users", get(list).post(create))
.route("/users/{id}", get(show)) // NOT /:id
.with_state(state);
→ See architecture.md
let user = sqlx::query_as!(User, "SELECT id, name FROM users WHERE id = $1", id)
.fetch_optional(&pool)
.await?;
→ See database.md
IntoResponse.tower-http.query!/query_as!./:id route syntax (0.7 and earlier only)..unwrap() in handlers — return a typed error.#[async_trait] removal (fetched 2026-07-05)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub fusengine/claude-plugins --plugin fuse-rust7 skills in this plugin
/rust-async-concurrencyUse when writing async Rust — spawning tasks, sharing state across tasks/threads, choosing channels vs mutexes, or hitting Send-bound errors with async traits. Not for HTTP service structure (rust-web-backend) or sync-only ownership (rust-core-language)./rust-core-languageUse when writing or reviewing idiomatic Rust — edition 2024 ownership/borrowing design, or fixing LLM pitfalls (clone tax, unwrap infestation, indexed loops). Not for error-type design (rust-error-handling) or SOLID layout (solid-rust)./rust-ecosystem-cratesUse when choosing crates for a Rust project — serialization, CLI, async runtime, web, database, HTTP client, error handling, observability. Not for API usage details of an already-chosen crate./rust-error-handlingUse when designing Rust error handling — thiserror vs anyhow, typed error enums,Other plugins' skills for the same job