rust-async-concurrency-review

Review Rust async code for task lifecycle, cancellation, locking, backpressure, and shutdown defects.

2|Updated May 6, 2026
One-click install
npx skills add https://github.com/bpcakes/jig-skills --skill rust-async-concurrency-review-bpcakes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-async-concurrency-review
Source: https://github.com/bpcakes/jig-skills/tree/main/plugins/jig-rust/skills/rust-async-concurrency-review
Command: npx skills add https://github.com/bpcakes/jig-skills --skill rust-async-concurrency-review-bpcakes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Rust async code often compiles cleanly while hiding concurrency bugs like detached tasks, lost cancellation progress, deadlocks from locks held across .await, unbounded queues, and missing graceful shutdown. This Skill reviews scoped Rust changes for these async correctness failures and reports concrete, severity-ranked findings with file locations and fixes. ## Core Features & Use Cases - Lifecycle and cancellation analysis: Traces ownership of spawned tasks, JoinHandles, JoinSets, and CancellationTokens, and checks select! branches for cancellation-unsafe operations like read_exact. - Backpressure and scheduler checks: Detects unbounded channels without justification, blocking std::fs or CPU-heavy work on runtime threads, and unbounded task fanout. - Optional scanner and references: Ships a Python scanner that surfaces review leads in Rust files, plus reference playbooks and patch patterns for TaskTracker, semaphores, timeouts, and tracing. - Use Case: Before merging a pull request that adds a Tokio worker pool, run this review to confirm every spawned task has an owner, shutdown drains the JoinSet within a bounded wait, and no lock guard survives an .await. ## Quick Start Ask the agent to review your current Rust working changes for async and concurrency correctness, reporting findings with file locations without editing code.

Frequently Asked Questions about rust-async-concurrency-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review Rust Tokio code for async concurrency bugs?

Map every spawned task, select!, channel, lock, and shutdown path, then trace who owns, cancels, and joins each task. This Skill provides a checklist workflow, severity rubric, and an optional Python scanner that flags review leads in Rust files.

What async Rust bugs does a Tokio concurrency review catch?

It catches detached JoinHandles, cancellation-unsafe select! branches like read_exact, std::sync::Mutex guards held across .await, blocking std::fs calls on runtime threads, unbounded channels without backpressure, unbounded task fanout, and missing graceful shutdown.

Does the async review scanner prove a bug exists?

No. The scan_async_rust.py scanner favors recall over precision and only produces leads. Each hit must be manually inspected in surrounding code to confirm a concrete failure mode before it is reported as a finding.

When should I not use a Rust async concurrency review?

Skip it for purely synchronous Rust, formatting-only diffs, or general API design with no async concern. Adjacent issues like error handling or transaction consistency belong to their own dedicated reviews.

Why is tokio::select! with read_exact dangerous in a loop?

When another branch wins, the read_exact future is dropped and any partially filled buffer progress is lost, so the next iteration restarts at an unknown frame boundary. Use cancellation-safe read calls with an explicit state machine instead.