Resilience — timeouts, retries with exponential backoff and jitter, circuit breakers, bulkheads, rate limiting and load shedding, fallbacks, idempotency keys, graceful degradation, backpressure. Use when code calls anything over a network or must survive overload (resilience, retry, circuit breaker, timeout, bulkhead, backpressure, idempotency).
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 Resilience Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-resilience-patterns)
---
name: resilience-patterns
description: Resilience — timeouts, retries with exponential backoff and jitter, circuit breakers, bulkheads, rate limiting and load shedding, fallbacks, idempotency keys, graceful degradation, backpressure. Use when code calls anything over a network or must survive overload (resilience, retry, circuit breaker, timeout, bulkhead, backpressure, idempotency).
metadata:
category: reliability
---
# Resilience patterns
## Purpose
Contain failures so one slow or failing dependency does not take the system down.
**Use when:** every outbound call and every overload-prone entry point.
**Not for:** hiding bugs with retries.
## Inputs
- Call graph, dependency SLAs, latency budgets.
## Outputs
- Resilience policy per dependency and tests for failure modes.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "resilience patterns"` for prior decisions, patterns and anti-patterns.
## Steps
1. **Budget.** Set timeouts from the caller's latency budget, not defaults.
Done when every call has a timeout.
2. **Retry.** Retry only idempotent operations, with backoff, jitter and a cap.
Done when retry storms are impossible.
3. **Isolate.** Add circuit breakers and bulkheads per dependency.
Done when one dependency cannot exhaust shared pools.
4. **Degrade.** Define fallbacks and load shedding; test with fault injection.
Done when failure tests pass.
## Best practices
- Retry budgets across layers — not retries at every layer.
- Fail fast beats hanging.
## Common mistakes
- Infinite retries without jitter.
- Timeouts longer than the caller's timeout.
## Example
Payment call: 800 ms timeout, 2 retries with jitter on 5xx only, breaker opens at 50% errors over 20 calls, fallback "payment pending".
## Reusable prompt
```text
Apply the Resilience patterns skill (.agents/skills/resilience-patterns/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Define timeouts, retries, breakers, bulkheads and fallbacks per dependency and the tests that prove them.
Return: Resilience policy per dependency and tests for failure modes..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```