skills/team/axum-scaffolder/SKILL.md
Scaffolds Axum HTTP endpoints with OpenAPI documentation (utoipa), Tower middleware, JWT authentication, rate limiting, CORS, health checks, and versioning. Axum-first approach: typed extractors, typed responses, and compile-time route verification. Use when creating Rust REST APIs, scaffolding Axum endpoints, setting up Axum projects, configuring Tower middleware, adding OpenAPI documentation to Axum, or implementing JWT authentication in Axum. Triggers on: "scaffold axum", "create axum endpoint", "axum router", "add axum route", "rust rest api", "axum api", "axum openapi", "axum jwt", "axum middleware". Do NOT use when the existing codebase uses Actix-web — scaffolding Axum into an Actix project requires 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]
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
Federal / government security overlay applied ON TOP OF a base language security review (dotnet/python/php/rust/react). Language-agnostic: adds NIST SP 800-53 control mapping, FIPS 140-2/3 cryptographic compliance (with a per-language crypto table), CUI handling, EO 14028 supply-chain requirements, and DOE Order 205.1B, and emits POA&M-ready findings with FIPS 199 impact levels. Use for federal/DOE/DOD/national-laboratory systems. Triggers on "federal security review", "NIST compliance", "NIST 800-53", "FISMA", "CUI", "FIPS audit", "DOE security", "POA&M", "ATO review". Do NOT use alone — run the matching <lang>-security-review FIRST; this overlay maps and extends it.
tools
OWASP-based security review of React / TypeScript front-end applications. Detects the framework (Vite/CRA/Next), entry points, and data flows, scans against the OWASP Top 10 (2025) mapped to React client-side patterns (XSS via raw HTML, URL/protocol injection, secrets in the bundle, insecure token storage, dependency CVEs, missing CSP, open redirects), and produces a manager-friendly executive summary plus a graded technical findings table. Use to audit React code for vulnerabilities. Triggers on "react security review", "frontend security audit", "audit react for vulnerabilities", "owasp react", "react xss", "react security posture", "npm audit review". For federal / gov / DOE / NIST / FIPS / CUI context, run security-review-federal after this base review. Do NOT use to grade architecture/structure — use react-architecture-checklist.
tools
Analyzes legacy React codebases and produces actionable modernization plans. Primary migration paths include class components to function components + hooks, Create React App to Vite, React 16/17 to 18 to 19, JavaScript to TypeScript, Enzyme to React Testing Library, legacy Redux to Redux Toolkit / Zustand / Context, and deprecated lifecycle/API removal. Does NOT perform the migration — assesses, quantifies risk, and plans. Triggers on phrases like "modernize react", "class to hooks", "upgrade react", "migrate CRA to vite", "react legacy migration", "react 17 to 18", "react js to typescript", "react technical debt", "enzyme to RTL".
development
Scaffolds feature-based React / TypeScript architecture using feature folders, presentational + container components, custom hooks, a typed data layer, and structural CQRS (query hooks vs mutation hooks). React analog of dotnet-vertical-slice and python-feature-slice — no DI framework; uses props/context for dependency injection and a query cache for server state. Use when creating feature-based React projects, adding React features, organizing components by feature rather than by technical type, or scaffolding a feature's data layer. Triggers on phrases like "scaffold react feature", "create react slice", "react feature folder", "react vertical slice", "add react feature", "react feature architecture", "organize react by feature".