Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

tokio-async-code-review东京异步代码审查

Agent Skill

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

总安装

563

周安装

23

GitHub Stars

54

下载量

180
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

tokio-async-code-review 用于 Tokio 异步代码审查,识别阻塞操作与死锁风险。

  • 检查 channel 类型匹配与 sync primitive 正确使用。
  • 验证 runtime 配置与 feature flags 启用状态。
  • 需确保 std::thread::sleep 等阻塞调用不在 async 函数内。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Tokio Async Code Review

Review Workflow

  1. Check Cargo.toml — Note tokio feature flags (full, rt-multi-thread, macros, sync, etc.). Missing features cause confusing compile errors.
  2. Check runtime setup — Is #[tokio::main] or manual runtime construction used? Multi-thread vs current-thread?
  3. Scan for blocking — Search for std::fs, std::net, std::thread::sleep, CPU-heavy loops in async functions.
  4. Check channel usage — Match channel type to communication pattern (mpsc, broadcast, oneshot, watch).
  5. Check sync primitives — Verify correct mutex type, proper guard lifetimes, no deadlock potential.

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
Task spawning, JoinHandle, structured concurrencyreferences/task-management.md
Mutex, RwLock, Semaphore, Notify, Barrierreferences/sync-primitives.md
mpsc, broadcast, oneshot, watch channel patternsreferences/channels.md
Pin, cancellation, Future internals, select!, blocking bridgereferences/pinning-cancellation.md

Review Checklist

Runtime Configuration

  • Tokio features in Cargo.toml match actual usage
  • Runtime flavor matches workload (multi_thread for I/O-bound, current_thread for simpler cases)
  • #[tokio::test] used for async tests (not manual runtime construction)
  • Worker thread count configured appropriately for production

Task Management

  • spawn return values (JoinHandle) are tracked, not silently dropped
  • spawn_blocking used for CPU-heavy or synchronous I/O operations
  • Tasks respect cancellation (via CancellationToken, select!, or shutdown channels)
  • JoinError (task panic or cancellation) is handled, not just unwrapped
  • tokio::select! branches are cancellation-safe
  • Native async fn in traits used instead of async-trait crate where possible (stable since Rust 1.75)
  • RPIT lifetime capture reviewed in async contexts — -> impl Future now captures all in-scope lifetimes in edition 2024

Sync Primitives

  • tokio::sync::Mutex used when lock is held across .await; std::sync::Mutex for short non-async sections
  • No mutex guard held across await points (deadlock risk)
  • Semaphore used for limiting concurrent operations (not ad-hoc counters)
  • RwLock used when read-heavy workload (many readers, infrequent writes)
  • Notify used for simple signaling (not channel overhead)
  • std::sync::LazyLock used instead of once_cell::sync::Lazy or lazy_static! for runtime-initialized singletons (stable since Rust 1.80)
  • if let lock guard patterns reviewed for edition 2024 temporary scoping — temporaries drop earlier, may change borrow validity

Channels

  • Channel type matches pattern: mpsc for back-pressure, broadcast for fan-out, oneshot for request-response, watch for latest-value
  • Bounded channels have appropriate capacity (not too small = deadlock, not too large = memory)
  • SendError / RecvError handled (indicates other side dropped)
  • Broadcast Lagged errors handled (receiver fell behind)
  • Channel senders dropped when done to signal completion to receivers

Timer and Sleep

  • tokio::time::sleep used instead of std::thread::sleep
  • tokio::time::timeout wraps operations that could hang
  • tokio::time::interval used correctly (.tick().await for periodic work)

Severity Calibration

Critical

  • Blocking I/O (std::fs::read, std::net::TcpStream) in async context without spawn_blocking
  • Mutex guard held across .await point (deadlock potential)
  • std::thread::sleep in async function (blocks runtime thread)
  • Unbounded channel where back-pressure is needed (OOM risk)

Major

  • JoinHandle silently dropped (lost errors, zombie tasks)
  • Missing select! cancellation safety consideration
  • Wrong mutex type (std vs tokio) for the use case
  • Missing timeout on network/external operations

Minor

  • tokio::spawn for trivially small async blocks (overhead > benefit)
  • Overly large channel buffer without justification
  • Manual runtime construction where #[tokio::main] suffices
  • std::sync::Mutex where contention is high enough to benefit from tokio's async mutex

Informational

  • Suggestions to use tokio-util utilities (e.g., CancellationToken)
  • Tower middleware patterns for service composition
  • Structured concurrency with JoinSet
  • Migration from async-trait crate to native async fn in traits
  • Migration from once_cell / lazy_static to std::sync::LazyLock
  • Using #[expect(lint)] instead of #[allow(lint)] for self-cleaning suppression

Valid Patterns (Do NOT Flag)

  • std::sync::Mutex for short critical sections — tokio docs recommend this when no .await is inside the lock
  • tokio::spawn without explicit join — Valid for background tasks with proper shutdown signaling
  • Unbuffered channel capacity of 1 — Valid for synchronization barriers
  • #[tokio::main(flavor = "current_thread")] in simple binaries — Not every app needs multi-thread runtime
  • clone() on Arc<T> before spawn — Required for moving into tasks, not unnecessary cloning
  • Large broadcast channel capacity — Valid when lagged errors are expensive (event sourcing)
  • Native async fn in traits without async-trait — Stable since 1.75; the crate is still valid for dyn dispatch cases
  • + use<'a> on -> impl Future returns — Correct edition 2024 precise capture syntax to limit lifetime capture
  • #[expect(clippy::type_complexity)] on complex async types — Self-cleaning alternative to #[allow], warns when suppression is no longer needed

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

35.91%
按下载量换算65

Claude

27.41%
按下载量换算49

Cursor

18.52%
按下载量换算33

Gemini CLI

10.04%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/existential-birds/beagle --skill tokio-async-code-review 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills