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

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

Agent Skill

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

总安装

8,034

周安装

325

GitHub Stars

公开资料未说明

下载量

2,522
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install tokio-async-code-review

简介

审查 tokio 异步运行时的任务管理与同步原语使用情况。

  • 适用于 Rust 2024 版本变更后的代码质量与性能评估。
  • 通过 clawhub 安装,需确认是否读取 Cargo.toml 与源码结构。
  • 建议检查是否会触发编译或第三方 crate 分析。tokio-async-code-review 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 可参考原始 README 了解审查规则与报告输出格式。

SKILL.md

name
tokio-async-code-review
description
Reviews tokio async runtime usage for task management, sync primitives, channel patterns, and runtime configuration. Covers Rust 2024 edition changes including async fn in traits, RPIT lifetime capture, LazyLock, and if-let temporary scoping. Use when reviewing Rust code that uses tokio, async/await patterns, spawn, channels, or async synchronization. Also covers tokio-util, tower, and hyper integration patterns.

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.

Gates (objective passes before conclusions)

Complete in order for the review scope. Do not assert Critical or Major until the relevant gate passes.

  1. Dependency surface — Read the crate (and workspace, if inherited) Cargo.toml that supplies tokio. Pass: Written note of tokio version and enabled features, or explicit statement that there is no direct tokio dependency and where it comes from (workspace/path).
  2. Runtime model — Locate runtime construction (#[tokio::main], Runtime::builder, tests, or library with no owned runtime). Pass: One line naming flavor (multi_thread / current_thread / tests-only / none) and where it is defined.
  3. Blocking inventory — Search reviewed paths for blocking APIs (std::fs::, std::net:: without async wrappers, std::thread::sleep, heavy CPU loops in async fn). Pass: Each hit listed as path:line (or tool output excerpt), or explicit “no blocking patterns found in reviewed async code” after the search.
  4. Protocol — Load beagle-rust:review-verification-protocol. Pass: Its pass conditions met before any finding is reported (file:line evidence for asserted issues).

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

After Gates, apply beagle-rust:review-verification-protocol to every reported issue (evidence and dispositions per that skill).

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

77.58%
按下载量换算1,957

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install tokio-async-code-review 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills