ryan-nguyen-01/maestro/axum-knowledge-patch

Claude Code and agent skill by ryan-nguyen-01/maestro

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Axum changes since training cutoff (latest: 0.8.5) — {param} path syntax, no async_trait, OptionalFromRequestParts, Utf8Bytes WS, HTTP/2 WebSockets, NoContent. Load before working with Axum.

Install

npx vskill@latest install ryan-nguyen-01/maestro/axum-knowledge-patch

SKILL.md

The same SKILL.md was published earlier as ryan-nguyen-01/maestro/axum-knowledge-patch.

Axum Knowledge Patch

Covers Axum 0.8.0–0.8.5 (2025-01-01 through 2025-09-28). Claude Opus 4.6 knows Axum through 0.7.x. It is unaware of the 0.8 breaking changes and features below.

Index

TopicReferenceKey features
Routing & handlersreferences/routing-and-handlers.mdPath syntax /{param}, reset_fallback, method_not_allowed_fallback, CONNECT, Sync requirement
Extractorsreferences/extractors.mdNo #[async_trait], OptionalFromRequestParts, Option<Json<T>>, Option<Multipart>
WebSockets & responsesreferences/websockets-and-responses.mdUtf8Bytes/Bytes messages, HTTP/2 WS, NoContent, SSE binary, ResponseAxumBodyLayer

0.7 → 0.8 Migration — Breaking Changes

What changedBefore (0.7)After (0.8)
Path params/:id, /*path/{id}, /{*path} (old syntax panics)
Extractor traits#[async_trait] impl FromRequestPartsNative async fn (remove #[async_trait])
Option<T> extractionSwallows all errors as NoneRequires OptionalFromRequestParts; invalid → rejection
WS message typesString / Vec<u8>Utf8Bytes / Bytes
WebSocket::closeMethod on socketRemoved — send Message::Close explicitly
HTTP/2 WebSocketsNot supportedUse any(ws_handler) instead of get(ws_handler)
Handler trait boundsSendSend + Sync
Host extractoraxum::extract::HostMoved to axum-extra
Serve::tcp_nodelayMethod on ServeRemoved — use serve::ListenerExt

Path Parameter Syntax (0.8.0)

The most common migration issue. Old colon/star syntax panics at runtime.

rust
// Before (0.7)
Router::new().route("/users/:id/files/*path", get(handler));
// After (0.8)
Router::new().route("/users/{id}/files/{*path}", get(handler));

Escape literal braces with {{ / }}.

See references/routing-and-handlers.md for details.

Extractor Trait Migration (0.8.0)

Remove #[async_trait] from custom FromRequestParts / FromRequest impls — Axum 0.8 uses native async fn in traits (RPITIT):

rust
// Before (0.7)
#[async_trait]
impl<S> FromRequestParts<S> for MyExtractor where S: Send + Sync {
type Rejection = StatusCode;
async fn from_request_parts(parts: &mut Parts, state: &S) -> Result<Self, Self::Rejection> {
todo!()
}
}
// After (0.8) — remove #[async_trait], signature unchanged
impl<S> FromRequestParts<S> for MyExtractor where S: Send + Sync {
type Rejection = StatusCode;
async fn from_request_parts(parts: &mut Parts, state: &S) -> Result<Self, Self::Rejection> {
todo!()
}
}

See references/extractors.md for OptionalFromRequestParts and optional extractors.

Optional Extractors (0.8.0–0.8.5)

Option<T> extraction changed: T must implement OptionalFromRequestParts (or OptionalFromRequest). Missing value → None, invalid value → rejection error.

Built-in support added incrementally:

ExtractorOption<T> supportVersion
Json<T>OptionalFromRequest0.8.3
Extension<T>OptionalFromRequestParts0.8.3
MultipartOptionalFromRequest0.8.5
rust
async fn handler(body: Option<Json<MyPayload>>) -> impl IntoResponse {
match body {
Some(Json(payload)) => { /* process payload */ }
None => { /* no body sent */ }
}
}

WebSocket Changes (0.8.0)

Message types changed from String/Vec<u8> to Utf8Bytes/Bytes:

rust
// Before (0.7)
Message::Text(String)
Message::Binary(Vec<u8>)
// After (0.8)
Message::Text(Utf8Bytes)
Message::Binary(Bytes)

WebSocket::close removed — send close messages explicitly:

rust
socket.send(Message::Close(None)).await.ok();

For HTTP/2 WebSocket support, use any() instead of get():

rust
Router::new().route("/ws", any(ws_handler));

See references/websockets-and-responses.md for selected_protocol and more.

New APIs

APIVersionDescription
Router::method_not_allowed_fallback0.8.0Custom handler when path matches but method doesn't
NoContent0.8.0Shortcut response for StatusCode::NO_CONTENT
routing::connect0.8.0CONNECT method support
Router::reset_fallback0.8.4Remove a fallback, reverting to default 404
WebSocketUpgrade::selected_protocol0.8.4Get the subprotocol selected during WS handshake
Event::bytes()0.8.5Binary data in SSE events
ResponseAxumBodyLayer0.8.5Map any body type to axum::body::Body
Quick Examples
rust
use axum::response::NoContent;
// NoContent response
async fn delete_item() -> NoContent {
NoContent
}
// Router with method_not_allowed_fallback and reset_fallback
let api = Router::new()
.route("/items", get(list_items).post(create_item))
.fallback(api_fallback);
let app = Router::new()
.nest("/api", api.reset_fallback())
.method_not_allowed_fallback(|| async { "Method not supported" })
.fallback(global_fallback);
// SSE with binary data (0.8.5)
use axum::response::sse::{Event, Sse};
let event = Event::default().bytes(my_bytes);
// ResponseAxumBodyLayer — normalize body types from tower services (0.8.5)
use axum::middleware::ResponseAxumBodyLayer;
let app = Router::new()
.route("/", get(handler))
.layer(ResponseAxumBodyLayer::new());

Reference Files

FileContents
routing-and-handlers.mdPath syntax, router methods, CONNECT, Sync requirement, serve changes
extractors.mdasync_trait removal, OptionalFromRequestParts, optional extractor support
websockets-and-responses.mdWS message types, HTTP/2 WS, NoContent, SSE binary, ResponseAxumBodyLayer

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ryan-nguyen-01/maestro/axum-knowledge-patch/badge)](https://verified-skill.com/skills/ryan-nguyen-01/maestro/axum-knowledge-patch)

Something wrong with this skill or its page? Tell us.