Agent skill · data analytics · jeremylongshore

anth-common-errors

Diagnose and fix Anthropic Claude API errors by HTTP status code.

Why this skill is useful

Provides specific troubleshooting steps and scripts for diagnosing and fixing Claude API errors that the AI wouldn't reliably generate on its own.

What it needs

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

What this skill does

Anthropic Common Errors Overview Quick reference for all Claude API error types with exact HTTP codes, error bodies, and fixes. The API returns errors as JSON: {"type": "error", "error": {"type": "...", "message": "..."}}. Error Reference 400 — invalidrequesterror Common causes and fixes: Message Pattern Cause Fix ---------------- ------- ----- messages: roles must alternate Consecutive same-role messages Merge adjacent user/assistant messages maxtokens: must be >= 1 Missing or zero maxtokens Always set maxtokens (required param) model: invalid model id Typo in model name Use exact ID: claude-sonnet-4-20250514 messages.0.content: empty Empty message content Ensure content is non-empty string or array toolresult: tooluseid not found Mismatched tool ID Copy id from the tooluse block exactly 401 — authenticationerror 403 — permissionerror API key lacks required permissions. Generate a new key at console.anthropic.com. 404 — notfounderror Invalid endpoint or model. Check you're using https://api.anthropic.com/v1/messages and a valid model ID. 429 — ratelimiterror Check headers for details: retry-after — seconds to wait anthropic-ratelimit-requests-limit — RPM cap anthropic-ratelimit-tokens-limit — TPM cap anthropic-ratelimit-tokens-remaining — tokens left this window Fix: The SDK handles 429 with automatic retry (configurable via maxRetries). For manual handling, see anth-rate-limits. 529 — overloadederror API is temporarily overloaded. Retry after 30-60 seconds. Not counted against rate limits. 500 — apierror Internal server error. Retry with exponential backoff. If persistent, check status.anthropic.com. Quick Diagnostic Script SDK Error Handling Prerequisites Use an API key supplied by the environment's secret manager and a workspace/model that the caller is authorized to use; never paste a key into a command, issue, or receipt. Have a sandbox project, a synthetic prompt such as health-check-001, and a request-correlation ID available for diagnosis. …

How to use it

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

@skills jeremylongshore/anth-common-errors

View the source on GitHub

Browse the @skills marketplace