Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

axum-code-review阿克苏姆代码审查

Agent Skill

axum-code-review 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 OpenClaw 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,168

周安装

222

GitHub Stars

公开资料未说明

下载量

1,812
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:axum-code-review(阿克苏姆代码审查)
来源仓库:https://github.com/anderskev/axum-code-review
安装命令:
openclaw skills install axum-code-review
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install axum-code-review

简介

审查 axum Web 框架代码的路由、提取器和中间件实现。

  • 适用于 Rust 项目代码质量检查和架构分析场景。
  • 可识别状态管理和错误处理中的常见问题。axum-code-review 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 通过 OpenClaw 宿主调用,需配合具体代码片段使用。
  • 安装前应验证仓库权限,避免越权访问敏感模块。

SKILL.md

name
axum-code-review
description
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.

Axum Code Review

Review Workflow

  1. 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-trait in custom extractors.
  2. Check routing — Route organization, method routing, nested routers
  3. Check extractors — Order matters (body extractors must be last), correct types
  4. Check state — Shared state via State<T>, not global mutable state
  5. Check error handlingIntoResponse implementations, error types

Gates (before reporting findings)

Run in order. Do not write a finding until the step that applies has passed.

  1. Version and edition on diskPass when: You have read the relevant Cargo.toml (crate or workspace root) and can state axum (and related tower/tower-http) versions and Rust edition. Then apply 0.6 vs 0.7+ or Edition 2024–specific checklist items only when that file supports them.
  1. Per-finding evidencePass 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).
  1. Category check vs protocolPass 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.
  1. Output shapePass 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 TypeReference
Route definitions, nesting, method routingreferences/routing.md
State, Path, Query, Json, body extractorsreferences/extractors.md
Tower middleware, layers, error handlingreferences/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)

Extractors

  • [ ] Body-consuming extractors (Json, Form, Bytes) are the LAST parameter
  • [ ] State<T> requires T: Clone — typically Arc<AppState> or direct Clone derive
  • [ ] Path<T> parameter types match the route definition
  • [ ] Query<T> fields are Option for optional query params with #[serde(default)]
  • [ ] Custom extractors implement FromRequestParts (not body) or FromRequest (body)
  • [ ] Edition 2024: Custom extractors use native async fn in trait impls (no #[async_trait] needed for FromRequest/FromRequestParts)

State Management

  • [ ] Application state shared via State<T>, not global mutable statics
  • [ ] Database pool in state (not created per-request)
  • [ ] State contains only shared resources (pool, config, channels), not request-specific data
  • [ ] Clone derived or manually implemented on state type
  • [ ] Edition 2024: Shared static state uses LazyLock from std (not once_cell::sync::Lazy or lazy_static!)

Error Handling

  • [ ] Handler errors implement IntoResponse for proper HTTP error codes
  • [ ] Internal errors don't leak to clients (no raw error messages in 500 responses)
  • [ ] Error responses use consistent format (JSON error body with code/message)
  • [ ] Result<impl IntoResponse, AppError> pattern used for handlers
  • [ ] Edition 2024: Handler return types -> impl IntoResponse capture all in-scope lifetimes by default; use + use<> to opt out of capturing request lifetimes when returning owned data

Middleware

  • [ ] Tower layers applied in correct order (outer runs first on request, last on response)
  • [ ] tower-http used for common concerns (CORS, compression, tracing, timeout)
  • [ ] Request-scoped data passed via extensions, not global state
  • [ ] Middleware errors don't panic — they return error responses
  • [ ] Edition 2024: Middleware using #[async_trait] can migrate to native async fn in trait impls

Severity Calibration

Critical

  • Body extractor not last in handler parameters (silently consumes body, later extractors fail)
  • SQL injection via path/query parameters passed directly to queries
  • Internal error details leaked to clients (stack traces, database errors)
  • Missing authentication middleware on protected routes

Major

  • Global mutable state instead of State<T> (race conditions)
  • Missing error type conversion (raw sqlx::Error returned to client)
  • Missing request timeout (handlers can hang indefinitely)
  • Route conflicts causing unexpected 405s
  • Edition 2024: async-trait still used for FromRequest/FromRequestParts when native async fn works

Minor

  • Manual route method matching instead of .get(), .post()
  • Missing fallback handler (default 404 is plain text, not JSON)
  • Middleware applied per-route when it should be global (or vice versa)
  • Missing tower-http::trace for request logging
  • Edition 2024: once_cell::sync::Lazy or lazy_static! used where std::sync::LazyLock works

Informational

  • Suggestions to use tower-http layers for common concerns
  • Router organization improvements
  • Suggestions to add OpenAPI documentation via utoipa or aide

Valid Patterns (Do NOT Flag)

  • #[axum::debug_handler] on handlers — Debugging aid that improves compile error messages
  • Extension<T> for middleware-injected data — Valid pattern for request-scoped values
  • Returning impl IntoResponse from handlers — More flexible than concrete types
  • Router::new() per module, merged in main — Standard organization pattern
  • ServiceBuilder for layer composition — Tower pattern, not over-engineering
  • axum::serve with TcpListener — Standard axum 0.7+ server setup
  • Native async fn in FromRequest/FromRequestParts implsasync-trait crate no longer needed (stable since Rust 1.75)
  • + use<'a> on handler return types — Edition 2024 precise capture syntax for RPIT
  • std::sync::LazyLock for shared static state — Replaces once_cell/lazy_static (stable since Rust 1.80)

Before Submitting Findings

Complete Gates (before reporting findings) and load beagle-rust:review-verification-protocol for category-specific checks before any issue is final.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

81.27%
按下载量换算1,473

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills