Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Performance Review?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/reliant-labs-performance-review)
---
name: performance-review
description: Performance and concurrency review methodology — scalability analysis, race condition detection, and resource leak identification
---
# Performance & Concurrency Review
## Focus Areas
### Performance & Scalability
#### Big-O Regressions
- **Nested loops**: O(n²) or worse where O(n) is possible
- **Repeated scans**: searching the same collection multiple times
- **N+1 queries**: loading related data one record at a time
- **Inefficient algorithms**: sorting when a heap would do, linear search in sorted data
#### Unbounded Work
- **No pagination/limits**: queries or API calls that return unbounded results
- **Recursive calls**: missing depth caps, stack overflow potential
- **Large allocations**: unbounded buffers, loading entire files into memory
- **Unbounded retries**: retry loops without max attempts
#### Hot Paths
- **Logging in tight loops**: debug/trace logging that kills performance
- **Unnecessary serialization**: JSON encode/decode on every iteration
- **Excessive copies**: passing large structs by value, unnecessary cloning
- **Repeated computation**: recalculating values that could be cached
#### Resource Leaks
- **File handles**: opened but not closed, missing defer/finally
- **Goroutines/threads**: spawned but never terminated, leaked via blocked channels
- **DB connections**: not returned to pool, connection exhaustion
- **Timers**: timers not stopped, ticker leaks
- **Memory**: growing caches without eviction, holding references preventing GC
### Concurrency & Distributed Systems
#### Data Races
- **Shared state**: maps, slices, structs accessed from multiple goroutines
- **Caches**: concurrent read/write without synchronization
- **Globals**: package-level variables modified concurrently
- **Async callbacks**: closures capturing variables that change
#### Deadlocks & Livelocks
- **Lock ordering**: inconsistent lock acquisition order
- **Holding locks across I/O**: locks held during network calls, DB queries
- **Nested locks**: acquiring locks while holding other locks
- **Channel deadlocks**: unbuffered channels with no receiver
#### Atomicity & Transactions
- **Multi-step updates**: related writes not in a transaction
- **Partial failures**: what state is left if step 2 of 3 fails?
- **Check-then-act**: TOCTOU races, read-modify-write without locks
- **Distributed transactions**: cross-service consistency issues
#### Retries & Backoff
- **Retry storms**: all clients retrying simultaneously
- **Missing backoff**: immediate retries overwhelming the system
- **Missing jitter**: synchronized retries causing thundering herd
- **Retrying non-idempotent ops**: duplicate side effects
#### Ordering & Duplication
- **At-least-once semantics**: handling duplicate deliveries
- **Out-of-order events**: events arriving in unexpected order
- **Missing dedupe keys**: no way to identify duplicate requests
- **Eventual consistency**: code assuming immediate consistency
#### Consistency & Caching
- **Stale reads**: reading from replica/cache when fresh data needed
- **Cache invalidation**: stale cache entries, missing invalidation
- **Read-after-write**: expecting to read data just written
- **Clock skew**: relying on synchronized clocks across machines
### Failure Modes & Resilience
- **Dependency failures**: what happens when downstream services are down?
- **Slow dependencies**: timeouts, circuit breakers, fallback behavior
- **Partial failures**: graceful degradation vs complete failure
- **Resource exhaustion**: behavior when memory/connections/threads run out
## Output Format
### Performance/Concurrency Review Summary
- Risk level: LOW / MEDIUM / HIGH / CRITICAL
- Key concerns (1-3 bullets)
### Findings (ordered by severity)
For each finding:
- **Severity**: CRITICAL / HIGH / MEDIUM / LOW
- **Category**: (e.g., "Data Race", "N+1 Query", "Resource Leak")
- **Location**: file:line or function
- **Issue**: What could go wrong
- **Failure scenario**: How this manifests in production
- **Recommendation**: Specific fix
### Scalability Assessment
- How does this code behave as load increases?
- Any bottlenecks or scaling limits?
### Concurrency Safety
- Shared state inventory (if any)
- Synchronization mechanisms used
- Race condition risk assessment
## Review Guidelines
- Think about what happens at 10x, 100x current load
- Consider failure modes, not just happy path
- Look for missing timeouts, limits, and circuit breakers
- Check for proper resource cleanup in error paths
- Flag "works on my machine" patterns
- Keep suggestions proportional to the change. Small UI changes, copy updates, or config tweaks rarely have meaningful performance implications — acknowledge this and move on rather than searching for micro-optimizations.