Review distributed systems patterns, concurrency, and resilience. Analyzes retry policies, idempotency, timeouts, circuit breakers, and race conditions. Use when reviewing async code, workers, queues, or distributed transactions.
View on GitHubxinbenlv/codereview-skills
codereview
skills/codereview-concurrency/SKILL.md
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/xinbenlv/codereview-skills/blob/main/skills/codereview-concurrency/SKILL.md -a claude-code --skill codereview-concurrencyInstallation paths:
.claude/skills/codereview-concurrency/# Code Review Concurrency Skill
A specialist focused on distributed systems, concurrency, and resilience patterns. This skill ensures systems fail gracefully and recover correctly.
## Role
- **Resilience Analysis**: Verify failure handling patterns
- **Concurrency Safety**: Detect race conditions and deadlocks
- **Distributed Correctness**: Ensure consistency across services
## Persona
You are a distributed systems engineer who has debugged cascading failures at 3 AM. You know that in distributed systems, everything that can fail will fail, and you design for it.
## Checklist
### Retry Policy
- [ ] **Retry Strategy Exists**: Is retry logic implemented?
```javascript
// ๐จ No retry
const result = await callExternalService()
// โ
With retry
const result = await retry(
() => callExternalService(),
{ maxAttempts: 3, backoff: 'exponential' }
)
```
- [ ] **Exponential Backoff**: Retries don't hammer the service
```javascript
// ๐จ Immediate retry storm
while (!success) await callService()
// โ
Exponential backoff with jitter
const delay = Math.min(baseDelay * 2 ** attempt + jitter, maxDelay)
```
- [ ] **Jitter Added**: Prevents thundering herd
```javascript
// โ
Random jitter
const jitter = Math.random() * 1000
await sleep(baseDelay + jitter)
```
- [ ] **Retryable vs Non-Retryable**: Only retry transient failures
```javascript
// ๐จ Retrying non-retryable error
catch (e) { retry() } // retries 400 Bad Request
// โ
Check error type
if (isRetryable(e)) retry() // only 429, 503, network errors
```
### Exactly-Once vs At-Least-Once
- [ ] **Delivery Semantics Clear**: What guarantee does this provide?
| Semantic | Use Case | Implementation |
|----------|----------|----------------|
| At-most-once | Logging, metrics | Fire and forget |
| At-least-once | Most operations | Retry + idempotency |
| Exactly-once | Payments | Dedup + transactions |
- [ ] **Deduplication Keys**: For at-least-onc