backend-resilience-patterns

backend-resilience-patterns is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 121 tokens per session (5,989 once invoked), scanned A, original, MIT.

A guide to keeping backend services working when another service or external system is slow or unavailable. It covers timeouts, retries, circuit breakers, bulkheads, and fallbacks.

In plain words
What is it for?
Use it when designing reliable HTTP calls, database calls, message-queue calls, retry policies, and fallback handling.
Why use it?
It reduces cascading failures, where one broken dependency causes many services to fail. It also helps make failure behavior predictable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it when designing reliable HTTP calls, database calls, message-queue calls, retry policies, and fallback handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/j4flmao/agent-skills/resilience-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add j4flmao/agent-skills --skill resilience-patterns
Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for backend-resilience-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/resilience-patterns/github.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/resilience-patterns)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/resilience-patterns"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/resilience-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for backend-resilience-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/resilience-patterns"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/resilience-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,989 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 280
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00121 $0.05989
Opus 5 $0.00060 $0.02995
Sonnet 5 $0.00024 $0.01198
Haiku 4.5 $0.00012 $0.00599

Measured 5d ago against content hash b786dccf6b5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

backend-resilience-patterns scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

response = requests.post(f"{PAYMENT_API}/charge", json={"order_id": order_id, "amount": amount})
skills/backend/universal/resilience-patterns/SKILL.md · 669 lines

How it starts

The opening of the file, as written. The whole thing — 669 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Backend Resilience Patterns

Purpose

Protect backend services from cascading failures by applying circuit breakers, retries with backoff, bulkheads, timeouts, and fallbacks. Resilience is not optional — every external call must be wrapped in fault-tolerance patterns.

Agent Protocol

Trigger

Exact user phrases: "resilience", "circuit breaker", "retry", "bulkhead", "timeout", "fallback", "resilience4j", "fault tolerance", "retry strategy", "backoff", "rate limiter".

Input Context

  • Type of external calls (HTTP, database, message queue).
  • Existing retry or timeout configuration.
  • SLAs and latency requirements.

Output Artifact

Configuration snippets or code. No file unless requested.

Response Format

Pattern: {circuit-breaker|retry|bulkhead|timeout|fallback}
Config: {key parameters and values}

Completion Criteria

  • At least timeout configured for every external call.
  • Retry with exponential backoff and jitter configured.
  • Circuit breaker defined per dependency (not one for all).
  • Fallback handler defined for every circuit breaker.
  • Bulkhead isolation applied to thread pools where needed.

Max Response Length

4 lines per pattern. 20 lines for full configuration.

Architecture Decision Tree

Which Resilience Pattern?

What type of failure are you protecting against?
  ├── Slow responses (server busy, GC pause, overloaded)
  │   └── Timeout + Circuit Breaker
  ├── Transient failures (network blip, connection reset, DNS failure)
  │   └── Retry with backoff + Circuit Breaker
  ├── Resource exhaustion (thread pool, connection pool, memory)
  │   └── Bulkhead + Circuit Breaker
  ├── Downstream service completely down
  │   └── Circuit Breaker + Fallback
  └── Client sending too many requests
      └── Rate Limiter + Bulkhead

Pattern Composition Order

How should patterns be composed?
  ┌─────────────────────────────────┐
  │ 1. Timeout (outermost)          │  ← Fail fast
  │ 2. Bulkhead (semaphore limit)   │  ← Isolate resources
  │ 3. Circuit Breaker              │  ← Stop cascading failures
  │ 4. Retry (innermost)            │  ← Retry transient failures
  │ 5. Fallback (catch-all)         │  ← Degrade gracefully
  └─────────────────────────────────┘

Read the full file on GitHub · 669 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 669 lines · 121 tokens per session scan A b786dccf6b5a

Subscribe to this mod's changes

backend-resilience-patterns is a skill published in the GitHub repository j4flmao/agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 121 tokens to every session and 5,989 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

distributed-systems

Distributed systems patterns for locking, resilience, idempotency, and rate limiting. Use when implementing distributed locks, circuit breakers, retry policies, idempotency keys, token bucket rate limiters, or fault tolerance patterns.

yonatangross/orchestkit · 48 tokens

error-handling

Use when designing the reaction to a class of failures — typed error taxonomies, retry/backoff/timeout policy, circuit breakers, React/Next error boundaries, and the user-message vs operator-log split. NOT diagnosing one specific crash (that is debug), NOT logs/metrics/traces (that is observability), NOT the wire…

ericrisco/rsc-harness · 78 tokens

error-handling

Implement robust error handling with custom error types, proper propagation, user-friendly messages, and logging. Use when adding error handling to APIs, libraries, or applications.

asgarovf/locusai · 36 tokens

error-handling

Error handling patterns. Exception hierarchies, Result types, structured error responses, retry strategies, circuit breakers.

pan94u/forge · 26 tokens

resilience-and-blast-radius-design

Design or audit a system's resilience posture using a layered framework — defense in depth, controlled degradation (load shedding vs. throttling), blast radius compartmentalization (role/location/time), failure domains, 3-tier component reliability hierarchy, and continuous validation. Use this skill when designing a…

bookforge-ai/bookforge-skills · 114 tokens

api-rate-limit-handler

Implement bounded, idempotency-aware API throttling, backoff, and retry handling for 429 and transient 5xx responses.

sickn33/agentic-awesome-skills · 32 tokens