axum-handler

Write Axum 0.8 handlers with correct path syntax, state, and error handling.

Updated May 26, 2026
One-click install
npx skills add https://github.com/adelabdelgawad/rust-fullstack-agents --skill axum-handler
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: axum-handler
Source: https://github.com/adelabdelgawad/rust-fullstack-agents/tree/main/plugins/rusty/skills/axum-handler
Command: npx skills add https://github.com/adelabdelgawad/rust-fullstack-agents --skill axum-handler

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Write Axum 0.8 handlers with correct path syntax, extractor ordering, state injection, and IntoResponse error handling.

Core Features & Use Cases

  • Enforce 0.8 path syntax using brace captures like {id} and avoid colon/star forms that panic.
  • Demonstrate correct State<T> usage for shared app state and FromRef-based sub-state extraction.
  • Document extractor ordering rules to ensure body-consuming extractors are last and optional per-handler patterns.
  • Provide robust error-handling patterns with IntoResponse implementations and standardized AppError-like types.
  • Auto-trigger guidance for adding or modifying routes, handlers, and associated extractors in an Axum project.

Quick Start

Add a new Axum 0.8 route with proper extractors and state handling to generate correct handler code.

Frequently Asked Questions about axum-handler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I inject state into Axum 0.8 handlers correctly?▼

To inject state into Axum 0.8 handlers, use State<T> for shared app state and FromRef-based sub-state extraction. This approach guarantees compile-time correctness over using Extension<T>.

What is the correct extractor ordering for Axum route handlers?▼

Correct extractor ordering in Axum route handlers requires placing body-consuming extractors last. This per-handler pattern ensures requests are processed sequentially without exhausting the body stream prematurely.

How do I implement error handling in Axum with IntoResponse?▼

Implement error handling in Axum by creating standardized AppError-like types. These types must implement the IntoResponse trait to automatically convert application errors into HTTP responses.

Why does my Axum 0.8 route panic with colon or star path syntax?▼

Axum 0.8 route path syntax panics with colon or star forms because they are unsupported. You must use brace captures like {id} in your route definitions to prevent runtime panics.

Can I use FromRequestParts to build custom Axum extractors?▼

Yes, you can use FromRequestParts to build custom Axum extractors for non-body data, and FromRequest for body-consuming data. Both integrate seamlessly with IntoResponse-based error types.