resilience-patterns
Skill1 starsChanged 6 months agoMITView on GitHub
Make calls to dependencies survive failure - timeouts, retries with backoff and jitter, idempotency, circuit breakers, bulkheads, and graceful degradation. Use when the user integrates an external service or API, asks about retries or timeouts, debugs cascading failures, or wants a resilience review of service-to-service calls.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- abhisheksharma2411/distributed-systems-skillstheir own version, first seen Aug 27, 2026
- roanbrasil/engineer-grade-agent-skillstheir own version, first seen Jun 17, 2026
- 4444J99/a-i--skillstheir own version, first seen Jun 7, 2026
- Vimalk0703/shipworthytheir own version, first seen Apr 1, 2026
- tygwan/skillstheir own version, first seen Nov 12, 2025
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- 4444J99/a-i--skills★ 17same name
- roanbrasil/engineer-grade-agent-skills★ 8same name
- Vimalk0703/shipworthy★ 6same name
- abhisheksharma2411/distributed-systems-skills★ 1same name
- tygwan/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository50 other files it gives its agents.
- accessibility-reviewSkill
- adr-authorSkill
- api-designSkill
- architecture-reviewSkill
- caching-strategySkill
- changelogSkill
- ci-cd-pipelineSkill
- codebase-explorationSkill
- code-reviewSkill
- code-style-guideSkill
- context-engineeringSkill
- conventional-commitsSkill
- cost-optimizationSkill
- database-migrationSkill
- data-privacy-reviewSkill
- debuggingSkill
- dependency-updateSkill
- deprecation-migrationSkill
- error-handlingSkill
- feature-flag-rolloutSkill
- filament-resource-designSkill
- flux-ui-patternsSkill
- git-workflowSkill
- i18n-reviewSkill
- idea-refineSkill
- incident-responseSkill
- incremental-implementationSkill
- inertia-patternsSkill
- laravel-ai-featuresSkill
- laravel-eloquent-performanceSkill
- laravel-queue-designSkill
- laravel-testingSkill
- livewire-component-designSkill
- llm-feature-designSkill
- observabilitySkill
- onboarding-docSkill
- performance-budgetSkill
- pr-descriptionSkill
- primevue-patternsSkill
- refactoringSkill
- release-checklistSkill
- runbook-authorSkill
- security-auditSkill
- spec-writingSkill
- task-breakdownSkill
- tech-debt-triageSkill
- test-writingSkill
- threat-modelingSkill
- using-elyra-skillsSkill
- vue-component-patternsSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Every remote call will fail, hang, or succeed-without-you-knowing.
- Distinctive: line 56
If you can't make it idempotent, don't auto-retry — surface the ambiguity ("payment status unknown") instead of guessing
- Distinctive: line 60
After N consecutive failures (or failure-rate threshold), open: fail fast without calling, for a cool-down period
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Resilience Patterns
Every remote call will fail, hang, or succeed-without-you-knowing. Resilience is deciding what happens then — before it happens at 3 AM.
When to use
- Integrating an external API, payment provider, queue, or another internal service
- "Should this retry?" / "What timeout should this have?"
- A dependency outage took the whole system down (cascading failure)
- Reviewing service-to-service calls for production readiness
Principles
- Timeouts are not optional. A call without a timeout is a thread/connection held hostage by someone else's outage. Every remote call gets one.
- Retries amplify load. A retry storm against a struggling dependency is a self-inflicted DDoS. Retry less than you think, with backoff and jitter.
- Idempotency before retries. Retrying a non-idempotent call (payments!) trades an error for a duplicate. Fix idempotency first.
- Degrade, don't die. The feature failing should cost the feature — not the page, not the app.
The decision ladder
For each remote call, answer in order:
1. Timeout — how long will you wait?
- Set from the caller's budget, not the dependency's average: if the user gives up at 3s, a 30s timeout is a 30s hang
- Separate connect timeout (short, ~1s) from read timeout
- Total budget across retries must fit the caller's deadline
2. Retry — is it safe, and is it worth it?
| Failure | Retry? |
| Connection error, 503, 429 | Yes — with backoff (429: honor Retry-After) |
| Timeout on a read (GET) | Yes |
| Timeout on a write | Only if idempotent (see 3) |
| 400, 401, 403, 404, 422 | No — retrying a validation error N times yields N errors |
Policy: 2–3 attempts max, exponential backoff with jitter (e.g. 0.5s → 1s → 2s ± random). Retry storms come from synchronized clients.
3. Idempotency — can this run twice safely?
- Writes get an idempotency key (client-generated UUID); the server dedupes on it
- Consumers of queues assume at-least-once delivery: handlers must tolerate duplicates
- If you can't make it idempotent, don't auto-retry — surface the ambiguity ("payment status unknown") instead of guessing
4. Circuit breaker — when do you stop trying?
- After N consecutive failures (or failure-rate threshold), open: fail fast without calling, for a cool-down period
- Then half-open: let one probe through; success closes the circuit
- Per-dependency, not global — and emit a metric/alert when state changes
5. Bulkhead — what does this failure NOT get to take down?
- Separate connection pools / worker pools per dependency, so a hung dependency can't exhaust shared resources
- Queue non-urgent work instead of calling inline
6. Degradation — what does the user see?
Decide per feature: cached/stale data, a hidden widget, a default value, or an honest "temporarily unavailable". Defining this is product work — do it at design time, not mid-incident.
Review checklist
For each remote call in the code under review:
- Explicit timeout (connect + read), justified against caller's budget
- Retry policy matches the failure table above; backoff has jitter
- Writes are idempotent or not auto-retried
- Failure of this dependency cannot cascade (breaker/bulkhead where it matters)
- Degraded behavior is defined and tested
- Failures are observable: metric per dependency, alert on breaker-open (see
observability)
Output format
## Resilience review: <service/integration>
| Call | Timeout | Retry | Idempotent | Breaker | Degradation |
|------|---------|-------|------------|---------|-------------|
| … | 1s/3s | 2× backoff+jitter | key-based | yes | cached data |
### Gaps (ranked)
1. <call>: <missing control> → <concrete fix>
### Cascade analysis
If <dependency> hangs: <what happens today> → <what should happen>Anti-patterns
- ❌ No timeout ("the library default is fine" — do you know what it is? It's often infinite)
- ❌ Retrying 4xx errors, or retrying writes without idempotency keys
- ❌ Exponential backoff without jitter — synchronized retry waves
- ❌ Catch-and-continue swallowing failures so nothing degrades visibly but data quietly goes missing
- ❌ One shared connection pool for all dependencies — one outage drains it for everyone
- ❌ Circuit breaker with no alert on open — you've automated hiding the outage
- ❌ Testing only the happy path; resilience code that has never seen a failure is decoration
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

