- Home
- Skills
- Shotaiuchi
- Dotclaude
- Review Concurrency
review-concurrency_skill
- Shell
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill shotaiuchi/dotclaude --skill review-concurrency- SKILL.md1.9 KB
Overview
This skill performs concurrency and thread-safety-focused code reviews for multi-threaded, coroutine, and async code. It highlights defects that cause races, deadlocks, livelocks, and incorrect thread usage. The output classifies findings by severity and gives actionable remediation steps.
How this skill works
The skill inspects code paths that access shared mutable state, synchronization primitives, and concurrency APIs. It looks for unprotected read-modify-write sequences, inconsistent lock ordering, blocking calls under locks, coroutine leaks, and incorrect dispatcher usage. Each finding is mapped to a severity level and accompanied by targeted recommendations.
When to use it
- Review pull requests that introduce threading, coroutines, or async/await logic
- Audit code that manipulates shared mutable state or global caches
- Assess performance fixes that change synchronization or locking
- Validate new libraries that alter execution context or use background threads
- Before release when stability under load is required
Best practices
- Prefer immutable data or thread-safe collections to reduce locking needs
- Use fine-grained locking and document lock acquisition order to avoid deadlocks
- Prefer atomic operations for simple counters and flags instead of coarse locks
- Ensure coroutine scopes are structured and cancellations are propagated
- Avoid blocking calls while holding locks; use timeouts and non-blocking alternatives
Example use cases
- Detect a TOCTOU bug in a config check followed by a write without synchronization
- Flag nested synchronized blocks with inconsistent ordering that can deadlock under load
- Find coroutines launched in global scope that can leak and outlive lifecycle owners
- Identify UI updates performed off the main thread or DB operations on the main thread
- Recommend replacing shared mutable maps with concurrent map implementations
FAQ
The review focuses on concurrency patterns and principles applicable across languages and runtimes, including threads, coroutines, and async/await. Language-specific idioms are considered when available.
How are severity levels determined?
Severity is based on impact and likelihood: Critical for corruption or hang, High for likely-to-manifest races, Medium for lower-risk thread-safety issues, and Low for defensive improvements.