concurrency-management

Installation
SKILL.md

Concurrency Management

Use this skill when

  • Writing safe concurrent code (threads/async)
  • Managing shared state and race conditions
  • Choosing async/parallel strategies

Do not use this skill when

  • Single-request simple flows
  • Distributed coordination (use distributed-locking)

Instructions

  1. Prefer immutable data and message passing over shared mutable state.
  2. Use structured concurrency: bounded pools, context/cancellation propagation.
  3. Guard shared state with the narrowest lock; prefer atomic ops.
  4. Avoid blocking calls inside async code (thread pool starvation).
  5. Define concurrency limits for fan-out and batch jobs.
  6. Detect and fix race conditions with stress tests and race detectors.
  7. Prefer task queues over unbounded spawn.
Installs
1
First Seen
Oct 22, 2026
Security Audits