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

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

Agent Skill

axum-code-review 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

470

周安装

19

GitHub Stars

54

下载量

147
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/existential-birds/beagle --skill axum-code-review

简介

Axum 代码审查聚焦路由组织、提取器顺序、共享状态和错误处理等关键模式。

  • 适用于 Rust 2021/2024 版 Axum 项目,识别版本差异带来的生命周期和异步 trait 问题。
  • 检查重点包括 Cargo.toml 配置、嵌套路由结构和 IntoResponse 实现完整性。
  • 使用前需确认项目使用的 axum 版本及 tower-http 功能依赖,避免误判。
  • axum-code-review 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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

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

Load and follow beagle-rust:review-verification-protocol before reporting any issue.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.57%
按下载量换算54

Claude

26.06%
按下载量换算38

Cursor

18.98%
按下载量换算28

Gemini CLI

8.69%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills