Agent skill · software engineering · jeremylongshore

anth-reliability-patterns

Implement reliability patterns for Claude API: circuit breakers,

Why this skill is useful

Adds executable scripts for implementing reliability patterns with the Claude API, enhancing fault tolerance and service resilience.

What it needs

Requires anthropic installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Anthropic Reliability Patterns Overview Production reliability patterns for Claude API: circuit breaker (prevent cascading failures), graceful degradation (serve fallbacks), idempotency (safe retries), and timeout management. Circuit Breaker Graceful Degradation Idempotent Requests Timeout Configuration Reliability Checklist [ ] Circuit breaker prevents cascading failures [ ] Graceful degradation serves fallback responses [ ] Idempotency keys prevent duplicate processing [ ] Timeouts configured at SDK and application level [ ] Health check probes API connectivity [ ] Retry logic uses exponential backoff (SDK default) [ ] Rate limit headers monitored for pre-emptive throttling Prerequisites Define an approved model/workspace policy, request timeout, retry and circuit thresholds, fallback behavior, idempotency store, and rollback owner. Exercise the controls in a sandbox using synthetic prompts and a no-op downstream sink before enabling production traffic. Permit telemetry to contain only correlation IDs, status classes, model IDs, token counts, latency, breaker state, and aggregate fallback counts. Never store prompts, completions, credentials, or sensitive tool arguments. Instructions 1. Validate request scope and estimate budget before the call; reject unapproved models, destinations, or data classes before invoking the API. 2. Apply bounded retries only to transient, repeat-safe failures. Coordinate backoff and breaker state across instances so a provider incident does not create a retry storm. 3. Generate an application idempotency key from a stable request identity, not from an unredacted prompt. Cache only completed, policy-approved results and never deduplicate operations with unreviewed side effects. 4. Route to an explicitly approved fallback or a static response when the breaker opens. A fallback must preserve authorization and data-handling rules rather than silently widening scope. 5. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/anth-reliability-patterns

View the source on GitHub

Browse the @skills marketplace