axum

Axum ergonomic Rust web framework with tower. Use for Rust APIs.

7 stars

Best use case

axum is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Axum ergonomic Rust web framework with tower. Use for Rust APIs.

Teams using axum should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/axum/SKILL.md --create-dirs "https://raw.githubusercontent.com/G1Joshi/Agent-Skills/main/skills/frameworks/axum/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/axum/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How axum Compares

Feature / AgentaxumStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Axum ergonomic Rust web framework with tower. Use for Rust APIs.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Axum

Axum is the most popular web framework in the Rust ecosystem (tokio). v0.7 (2024/2025) is built on **Hyper 1.0** and standardizes the service trait.

## When to Use

- **High Performance**: When you need millisecond latency (e.g., ad tech, gaming).
- **Rust Backend**: The default choice for new Rust web projects.
- **Type Safety**: Extractor pattern guarantees types at compile time.

## Core Concepts

### Extractors

Declarative data parsing: `async fn handler(Json(body): Json<CreateUser>)`.

### Middleware (Tower)

Axum uses `tower` middleware, meaning you can use any middleware from the ecosystem (timeout, tracing, rate-limit).

### Handlers

Async functions that implementation `IntoResponse`.

## Best Practices (2025)

**Do**:

- **Use `axum::serve`**: v0.7 replacement for `Server::bind`.
- **Use `sqlx`**: The standard async SQL query builder for Axum.
- **Use `tracing`**: For structured logging.

**Don't**:

- **Don't unwrap**: Handle errors with `Result<impl IntoResponse, AppError>`.

## References

- [Axum Documentation](https://docs.rs/axum/latest/axum/)