tokio-async-code-review
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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anderskev/tokio-async-code-reviewWhat This Skill Does
The tokio-async-code-review skill is a specialized static analysis tool designed to audit Rust codebases leveraging the Tokio asynchronous runtime. It systematically inspects asynchronous logic to ensure high performance, memory safety, and concurrency correctness. By analyzing Cargo feature flags, runtime initialization, task lifecycle management, and synchronization primitives, the skill identifies common pitfalls such as blocking the executor, improper mutex guard lifetimes, and channel misconfigurations. It provides actionable reports formatted with specific line references and severity levels, making it an essential companion for Rust developers managing complex async architectures.
Installation
To install this skill, run the following command in your terminal:
clawhub install openclaw/skills/skills/anderskev/tokio-async-code-review
Use Cases
- Production Audits: Verifying that a production service has correctly configured feature flags and is not accidentally using synchronous blocking calls in async loops.
- Performance Tuning: Identifying bottlenecks where a
std::sync::Mutexmight be held across an.awaitpoint, causing potential deadlocks or runtime starvation. - Refactoring: Moving from simple single-threaded async code to complex multi-threaded architectures requiring robust cancellation patterns and semaphore-based concurrency limiting.
- Error Handling: Ensuring
JoinHandleresults, channel disconnects, and broadcast lag errors are handled rather than ignored or unwrapped.
Example Prompts
- "Review the following worker module for potential deadlocks. I'm using
tokio::sync::Mutexinside an async loop—is this optimal? [Paste Code]" - "I'm seeing 'thread panicked' errors when my tasks fail. How can I improve my
JoinHandlemanagement using this skill's guidelines?" - "Check my
Cargo.tomland main entry point. Are my Tokio feature flags sufficient for a high-throughput TCP server? [Paste Cargo.toml]"
Tips & Limitations
- Tips: Always include your
Cargo.tomlwhen requesting a review, as feature flags are the root cause of many cryptic compilation errors. For large codebases, provide files one at a time to receive more granular feedback. - Limitations: The skill is a static analysis tool; it cannot detect runtime-specific race conditions that depend on external timing or network conditions. It works best when provided with isolated modules of your business logic.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anderskev-tokio-async-code-review": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read
Related Skills
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
fetch-pr-feedback
Fetch review comments from a PR and evaluate with receive-feedback skill
swift-testing-code-review
Reviews Swift Testing code for proper use of
rust-testing-code-review
Reviews Rust test code for unit test patterns, integration test structure, async testing, mocking approaches, and property-based testing. Covers Rust 2024 edition changes including async fn in traits for mocks,
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do