← ClaudeAtlas

anthropic-api-resiliencelisted

Use when adding rate-limit / overload resilience to any Anthropic SDK client (Claude API consumer). Generates round-robin key rotation + exponential backoff (1s→5min, 2x multiplier) + circuit breaker (10 consecutive failures). Triggers on: 'Anthropic API rate limit', 'Claude API retries', 'multiple Anthropic keys', 'round-robin Anthropic', 'production-grade Anthropic client', 'rate limit error 429', 'Anthropic overloaded_error'.
mickolasjae/mick-applied-ai-toolkit · ★ 0 · AI & Automation · score 70
Install: claude install-skill mickolasjae/mick-applied-ai-toolkit
# Anthropic API Resilience Production-grade reliability wrapper for any `@anthropic-ai/sdk` (TS) or `anthropic` (Python) client. Adds three layers: **round-robin key rotation**, **exponential backoff**, and a **circuit breaker** on per-key failure streaks. ## When to use Trigger this skill whenever the user is: - Hitting `429 RateLimitError` or `529 overloaded_error` from Claude - Asking for "Anthropic API retries", "multiple Anthropic keys", "round-robin Anthropic", "production-grade Anthropic client" - Running an agent loop, batch job, or any long-running pipeline that calls `client.messages.create()` more than ~1/sec - Reviewing code that calls Anthropic with no retry/backoff wrapper Do **not** trigger for: simple one-shot scripts, prompt-engineering questions, or non-Anthropic providers. ## Quick assessment (ask this first) > **How many Anthropic API keys do you have available?** - **1 key**: round-robin buys nothing. Install the wrapper anyway — backoff + circuit breaker still prevent thundering-herd retries that get you rate-limited harder. Skip the multi-key env-var step. - **2+ keys**: full payoff. Distinct keys from different Anthropic accounts/orgs give independent rate-limit buckets. Same-account keys share the bucket and only help with key-specific failures (revoked, network, etc.). ## Spec (verified pattern) Sourced from `RL-Studio-Anthropic/ANTHROPIC_KEY_MANAGEMENT.md`: | Knob | Value | |---|---| | Base backoff | 1 second | | Max backoff | 5 minutes (3