clade-reliability-patterns

Featured

Build fault-tolerant Claude integrations — retries, circuit breakers, Use when working with reliability-patterns patterns. fallbacks, timeouts, and graceful degradation. Trigger with "anthropic reliability", "claude fault tolerance", "anthropic circuit breaker", "claude fallback".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Anthropic Reliability Patterns ## Overview Build fault-tolerant Claude integrations with built-in SDK retries, model fallback chains (Sonnet → Haiku), circuit breakers to avoid hammering a failing API, graceful degradation with cached/static responses, and per-request timeout configuration. ## Built-In SDK Retries The SDK retries 429 (rate limit) and 529 (overloaded) automatically: ```typescript const client = new Anthropic({ maxRetries: 3, // default: 2 timeout: 120_000, // 2 minutes }); ``` ## Model Fallback Chain ```typescript const FALLBACK_CHAIN = ['claude-sonnet-4-20250514', 'claude-haiku-4-5-20251001']; async function callWithFallback(params: Anthropic.MessageCreateParams) { for (const model of FALLBACK_CHAIN) { try { return await client.messages.create({ ...params, model }); } catch (err) { if (err instanceof Anthropic.APIError && err.status >= 500) { console.warn(`${model} failed (${err.status}), trying next...`); continue; } throw err; // Don't retry client errors (4xx) } } throw new Error('All models failed'); } ``` ## Circuit Breaker ```typescript class ClaudeCircuitBreaker { private failures = 0; private lastFailure = 0; private readonly threshold = 5; private readonly resetMs = 60_000; async call(params: Anthropic.MessageCreateParams) { if (this.failures >= this.threshold && Date.now() - this.lastFailure < this.resetMs) { throw new Error('Circuit open — Claude API unavaila...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

anth-reliability-patterns

Implement reliability patterns for Claude API: circuit breakers, graceful degradation, idempotency, and fallback strategies. Trigger with phrases like "anthropic reliability", "claude circuit breaker", "claude fallback", "anthropic fault tolerance".

2,266 Updated today
jeremylongshore
AI & Automation Featured

anth-sdk-patterns

Apply production-ready Anthropic SDK patterns for TypeScript and Python. Use when implementing Claude integrations, building reusable wrappers, or establishing team coding standards for the Messages API. Trigger with phrases like "anthropic SDK patterns", "claude best practices", "anthropic code patterns", "production claude code".

2,266 Updated today
jeremylongshore
AI & Automation Featured

clade-rate-limits

Handle Anthropic rate limits — understand tiers, implement backoff, Use when working with rate-limits patterns. optimize throughput, and monitor usage. Trigger with "anthropic rate limit", "claude 429", "anthropic throttling", "anthropic usage limits", "claude tokens per minute".

2,266 Updated today
jeremylongshore
AI & Automation Featured

customerio-reliability-patterns

Implement Customer.io reliability and fault-tolerance patterns. Use when building circuit breakers, fallback queues, idempotency, or graceful degradation for Customer.io integrations. Trigger: "customer.io reliability", "customer.io resilience", "customer.io circuit breaker", "customer.io fault tolerance".

2,266 Updated today
jeremylongshore
AI & Automation Featured

clade-sdk-patterns

Production-ready Anthropic SDK patterns — client config, retries, timeouts, Use when working with sdk-patterns patterns. error handling, TypeScript types, and async patterns. Trigger with "anthropic sdk", "claude client setup", "anthropic typescript", "anthropic python patterns".

2,266 Updated today
jeremylongshore