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 Circuit Breakers?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adityaaatiwari-circuit-breakers-anvil)
---
name: circuit-breakers
description: Prevent cascading failures across downstream dependencies using circuit breakers, bulkheads, timeouts, and fallbacks
---
<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->
# Circuit breakers
Use when protecting services calling flaky downstream APIs, caches, payment gateways, or microservices.
## Timeouts and state transitions
- Always pair circuit breakers with tight per-request connect and read timeouts—without timeouts, hung sockets exhaust worker pools before tripping.
- Count only dependency failures (`5xx`, timeouts, connection errors) toward error thresholds; ignore client `4xx` errors so bad caller inputs do not trip circuits globally.
- Configure `closed -> open -> half-open` transitions with a clear cooldown window and bounded probe traffic in `half-open` before closing.
## Bulkheads and fallbacks
- Isolate slow third-party integrations inside bounded concurrency pools (bulkheads) so one degraded dependency cannot exhaust shared event loops or DB pools.
- Serve stale cached values, default UI states, or queued async retries cleanly when the circuit is open, and cap retries carefully to avoid amplifying load on recovery.
## Verify
Inject downstream delays and 503 storms in integration tests to verify fast tripping, half-open recovery probes, and caller latency bounds.