axum-impl-tower-stack

Official

Order Axum middleware safely with tower stacks

AuthorImpertio-Studio
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It prevents subtle, production-breaking bugs when adding Axum middleware through tower and tower-http, especially layer ordering mistakes, missing Cargo features, and incorrect CORS or rate-limiting assumptions.

Core Features & Use Cases

  • Correct tower middleware composition: clarifies how tower::Service/Layer wrapping works in Axum and how ServiceBuilder order differs from stacked Router::layer() order.
  • tower-http layer correctness: ensures the right constructor usage and enables the required tower-http Cargo feature flags so layers actually compile.
  • Production-safe CORS and rate limiting: provides guardrails for using CorsLayer::new() allowlists instead of permissive presets, and distinguishes coarse global throttling (tower::limit) from per-client token buckets (tower_governor), including the Clone/Buffer requirement.

Quick Start

Use the skill when you need to add tracing, compression, timeouts, CORS, request body limits, or rate limiting to an Axum app via a ServiceBuilder middleware stack and want deterministic, version-aware ordering and feature-safe configuration.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: axum-impl-tower-stack
Download link: https://github.com/Impertio-Studio/Axum-Claude-Skill-Package/archive/main.zip#axum-impl-tower-stack

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.