skills/team/axum-scaffolder/SKILL.md
Scaffolds Axum HTTP endpoints with OpenAPI (utoipa), Tower middleware, JWT auth, rate limiting, CORS, health checks, and versioning. Axum-first: typed extractors, typed responses, compile-time route verification. Use when creating Rust REST APIs, scaffolding Axum endpoints/projects, configuring Tower middleware, or adding OpenAPI/JWT to Axum. Not when the codebase uses Actix-web — Axum-into-Actix needs manual integration not covered here.
npx skillsauth add michaelalber/ai-toolkit axum-scaffolderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"An API that is not documented is an API that is not finished. Security by default: every route is protected unless explicitly marked public."
Axum is Rust's most ergonomic HTTP framework, built on Tower's middleware ecosystem and Tokio's
async runtime. This skill scaffolds production-ready Axum APIs with OpenAPI documentation, security
middleware, and proper error handling from day one. The OpenAPI spec is generated from code, not
written separately; routes are versioned from the first commit; auth is applied at the router level
so anonymous access is explicit; request and response data flow through typed extractors and
impl IntoResponse, never raw Request parsing.
Non-Negotiable Constraints:
#[utoipa::path] on every handler; utoipa::OpenApi derive on the app; the spec must be accurate./api/v1/ prefix on all routers; no unversioned routes./health, /docs).axum::extract::{Json, Path, Query, State}; no raw Request parsing.impl IntoResponse with explicit status codes; errors as RFC 7807 Problem Details via AppError.Full principle table, KB lookups, discipline rules, anti-patterns, and error recovery live in
references/conventions.md.
DETECT Existing Cargo.toml/deps, AppState/AppError/main router, Rust edition + Tokio version,
existing utoipa setup.
CONFIGURE Add deps to Cargo.toml; create src/errors.rs (AppError), src/state.rs (AppState),
src/openapi.rs (OpenApi derive). (Templates in router-template.md.)
SCAFFOLD Feature router with typed handlers; request/response models with ToSchema;
#[utoipa::path] on handlers; feature error type with From<FeatureError> for AppError.
SECURE Add JWT validation middleware; apply to protected route groups; leave /health + /docs
unprotected. (Layer ordering + JWT in middleware-patterns.md.)
DOCUMENT #[utoipa::path] on all handlers; ToSchema on all types; OpenApi derive with all
paths/schemas; /docs route serving the OpenAPI UI.
VERIFY cargo build · cargo test · cargo clippy -- -D warnings · curl /health → 200 ·
curl /docs → OpenAPI UI · protected routes → 401 without token.
Exit criteria: all routes scaffolded, documented, secured, and verified.
<axum-scaffold-state>
phase: DETECT | CONFIGURE | SCAFFOLD | SECURE | DOCUMENT | VERIFY | COMPLETE
feature_name: [name]
edition: [2015 | 2018 | 2021 | 2024]
tokio_version: [1.x | unknown]
utoipa_configured: true | false
auth_middleware: true | false
rate_limiting: true | false
cors_configured: true | false
health_check: true | false
openapi_ui: true | false
build_status: pass | fail | not-run
last_action: [description]
next_action: [description]
</axum-scaffold-state>
references/router-template.md.references/middleware-patterns.md.references/conventions.md.| Skill | Relationship |
|-------|-------------|
| rust-feature-slice | Provides feature module organization; this skill provides the HTTP infrastructure (middleware, OpenAPI, auth). Use both together. |
| rust-security-review | After scaffolding, verify auth middleware, CORS, and input validation. |
| rust-architecture-checklist | After scaffolding, verify handler thinness, error handling, and trait design. |
| sqlx-migration-manager | When the API needs database access, use it for the migration lifecycle. |
| minimal-api-scaffolder | Parallel skill for .NET Minimal API — same OpenAPI-first philosophy, different ecosystem. |
development
Interviews the user relentlessly about a plan, decision, or idea — one question at a time, each with a recommended answer. Shared engine behind "grill-me" and "grill-with-docs". Use on any "grill" trigger phrase or to stress-test thinking. Do NOT use to build the plan; it ends at shared understanding, not implementation.
testing
Runs a relentless interview to sharpen a plan or design, capturing the decisions as ADRs and a glossary along the way. Use when the user wants to be grilled AND wants the session to leave durable domain documentation behind. Do NOT use for a throwaway stress-test with no artifacts; use grill-me instead.
tools
OWASP-based security review of Vue/TypeScript front-ends. Detects framework (Vite/Vue CLI/Nuxt), entry points, and data flows; scans the OWASP Top 10 (2025) mapped to Vue client-side risks (raw-HTML XSS via v-html, URL/protocol injection, bundled secrets, insecure token storage, dependency CVEs, missing CSP, open redirects, router guard bypass); emits an exec summary plus graded findings. Use to audit Vue for vulnerabilities. Not for architecture grading (vue-architecture-checklist).
tools
Analyzes legacy Vue codebases and produces actionable modernization plans. Primary migration paths include Options API to Composition API, Vue 2 to Vue 3, Vue CLI to Vite, JavaScript to TypeScript, Vue Test Utils/Karma/Mocha to Vitest + Vue Testing Library, legacy Vuex to Pinia, and removed-in-Vue-3 pattern cleanup (filters, event bus, `$listeners`). Does NOT perform the migration — assesses, quantifies risk, and plans.