Production Rust API patterns for Axum: typed extractors, shared state, Tower middleware, error mapping, and graceful shutdown.
- CCM score
- 59 of 100
- skills.sh installs
- 517
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers routing, extractors, shared state, structured errors, middleware, tracing, graceful shutdown, and testing for Rust HTTP services
- Includes examples for typed
Path,Query, andJsonextraction,AppErrormapping viaIntoResponse, andtower-httplayers for tracing, timeouts, and CORS - Enforces non-blocking handlers and isolates the HTTP stack behind an optional feature so library consumers avoid the web dependencies
- Designed for teams building Rust HTTP services that need supervised shutdown with systemd or launchd and router tests without sockets
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill axum -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Axum (Rust) - Production Web APIs
Overview
Axum is a Rust web framework built on Hyper and Tower. Use it for type-safe request handling with composable middleware, structured errors, and excellent testability.
Quick Start
Minimal server
✅ Correct: typed handler + JSON response
use axum::{routing::get, Json, Router};
use serde::Serialize;
use std::net::SocketAddr;
#[derive(Serialize)]
struct Health {
status: &'static str,
}
async fn health() -> Json<Health> {
Json(Health { status: "ok" })
}
#[tokio::main]
async fn main() {
let app = Router::new().route("/health", get(health));
let addr: SocketAddr = "0.0.0.0:3000".parse().unwrap();
let listener = tokio::net::TcpListener::bind(addr).await.unwrap();
axum::serve(listener, app).await.unwrap();
}
❌ Wrong: block the async runtime
async fn handler() {
std::thread::sleep(std::time::Duration::from_secs(1)); // blocks executor
}
Core Concepts
Router + handlers
Handlers are async functions that return something implementing IntoResponse.
✅ Correct: route nesting
use axum::{routing::get, Router};
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Categories
- Rust, Backend & APIs
- First seen
- Jun 3, 2026
Questions
Where does the axum skill rank among Rust skills on Claude Marketplaces?
The axum skill is in the Rust category on Claude Marketplaces and ranks in the top 100 on the Rust category page. It is listed alongside fix-errors, rust-best-practices, rust-async-patterns, rust-testing and rust-patterns, and it covers Axum routers, extractors, state, middleware, error handling, tracing, graceful shutdown and testing.
What does the axum skill help an agent build?
The axum skill gives patterns for production Rust HTTP APIs built on Axum. It covers typed handlers and extractors, shared AppState, structured error handling with IntoResponse, Tower middleware such as tracing, timeouts and CORS, graceful shutdown, and testing routers without sockets.
How do I install the axum skill?
Run npx -y skills add bobmatnyc/claude-mpm-skills --skill axum -y inside your project. After that, the agent can apply Axum patterns such as typed extractors, Tower layers and graceful shutdown when you build a Rust web service.
More from bobmatnyc/claude-mpm-skills
All 154- Hono Core511
- Zustand506
- Asyncio503
- Typescript Core496
- Bug Fix490
- Mypy487
- Celery484
- Threat Modeling484
- Wordpress Block Editor Fse484
- Supabase Backend Platform482
- Local Llm Ops478
- Web Performance Optimization476
- Golang Testing Strategies466
- Wordpress Advanced Architecture463
- Hono Rpc462
- Sveltekit462
- Golang Http Frameworks460
- Digitalocean Management459
- Flask459
- Hono Middleware454
- Golang Cli Cobra Viper446
- Wordpress Plugin Fundamentals444
- Dependency Audit442
- Digitalocean Compute441
Similar to Axum
More Rustdomain-webactionbook/rust-skills3.6K installsRust web-service guide that maps domain constraints to axum, actix, tower, and shared-state patterns.
rust-async-patternswshobson/agents22.5K installsProduction async Rust patterns for Tokio, covering tasks, channels, streams, and error handling.
express-productionbobmatnyc/claude-mpm-skills528 installsProduction-ready Express.js guidance covering middleware order, error handling, security hardening, testing, and PM2 deployment.
hono-corebobmatnyc/claude-mpm-skills511 installsUltrafast multi-runtime web framework covering routing, context, handlers, and responses on Web Standards.
rust-prosickn33/agentic-awesome-skills458 installsExpert Rust guidance for async services, type-system design, unsafe review, and performance work on Rust 1.75+.