axum-code-review
Reviews axum web framework code for routing patterns, extractor usage, middleware, state management, and error handling. Use when reviewing Rust code that uses axum, tower, or hyper for HTTP services. Covers axum 0.7+ patterns including State, Path, Query, Json extractors.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anderskev/axum-code-reviewAxum Code Review
Review Workflow
- Check Cargo.toml — Note axum version (0.6 vs 0.7+ have different patterns), Rust edition (2021 vs 2024), tower, tower-http features. Edition 2024 changes RPIT lifetime capture in handler return types and removes the need for
async-traitin custom extractors. - Check routing — Route organization, method routing, nested routers
- Check extractors — Order matters (body extractors must be last), correct types
- Check state — Shared state via
State<T>, not global mutable state - Check error handling —
IntoResponseimplementations, error types
Gates (before reporting findings)
Run in order. Do not write a finding until the step that applies has passed.
-
Version and edition on disk — Pass when: You have read the relevant
Cargo.toml(crate or workspace root) and can stateaxum(and related tower/tower-http) versions and Rustedition. Then apply 0.6 vs 0.7+ or Edition 2024–specific checklist items only when that file supports them. -
Per-finding evidence — Pass when: Each issue cites
[FILE:LINE]from the current tree for the handler, router, layer, or type under review (not from memory, docs-only, or another branch). -
Category check vs protocol — Pass when: For the finding type (routing conflict, extractor order, error leak, middleware order, etc.), you ran the matching checks from
beagle-rust:review-verification-protocol(e.g. full handler signature for extractor order; surrounding error mapping before “raw error to client”). Then add the finding. -
Output shape — Pass when: The report lines match Output Format below (severity + description).
Output Format
Report findings as:
[FILE:LINE] ISSUE_TITLE
Severity: Critical | Major | Minor | Informational
Description of the issue and why it matters.
Quick Reference
| Issue Type | Reference |
|---|---|
| Route definitions, nesting, method routing | references/routing.md |
| State, Path, Query, Json, body extractors | references/extractors.md |
| Tower middleware, layers, error handling | references/middleware.md |
Review Checklist
Routing
- Routes organized by domain (nested routers for
/api/users,/api/orders) - Fallback handlers defined for 404s
- Method routing explicit (
.get(),.post(), not.route()with manual method matching) - No route conflicts (overlapping paths with different extractors)
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anderskev-axum-code-review": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
fetch-pr-feedback
Fetch review comments from a PR and evaluate with receive-feedback skill
swift-testing-code-review
Reviews Swift Testing code for proper use of
rust-testing-code-review
Reviews Rust test code for unit test patterns, integration test structure, async testing, mocking approaches, and property-based testing. Covers Rust 2024 edition changes including async fn in traits for mocks,
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do