Diagnose and fix Anthropic API errors — authentication, rate limits, Use when working with common-errors patterns.

MITAuto-check passedBackend & APIs

Install Clade Common Errors

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill clade-common-errors -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace clade-common-errors --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/clade-common-errors .claude/skills/clade-common-errors && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
clade-common-errors
GitHub stars
2.8k
Token cost
~1.6k tokens
SKILL.md length
284 words
Files
2 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Diagnose and fix Anthropic API errors — authentication, rate limits, Use when working with common-errors patterns.

  • Works in 6 steps: authentication_error (401) → rate_limit_error (429) → overloaded_error (529) → …
  • Working with common-errors patterns
  • SKILL.md covers Overview, Error Reference, Instructions and Quick Diagnostic, plus 6 more sections
  • Calls curl and jq; reaches status.anthropic.com and api.anthropic.com; needs ANTHROPIC_API_KEY

What it does

Clade Common Errors is an agent skill from jeremylongshore/tons-of-skills-marketplace. Diagnose and fix Anthropic API errors — authentication, rate limits, Use when working with common-errors patterns. overloaded, context length, and content policy issues. Trigger with "anthropic error", "claude 429", "claude overloaded", "anthropic not working", "debug claude api".

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/one-pager.md`). Compatibility notes: Designed for Claude Code

It sits in Backend & APIs, covering Rate limiting and LLM API integration. It works with Anthropic API. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Working with common-errors patterns
  • With anthropic error
  • Claude overloaded
  • Anthropic not working

Example prompts

  • “anthropic error”
  • “claude 429”
  • “claude overloaded”
  • “/clade-common-errors”

Requirements

  • A credential in ANTHROPIC_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Grep, Bash(curl:*)

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. authentication_error (401)
  2. rate_limit_error (429)
  3. overloaded_error (529)
  4. invalid_request_error (400)
  5. not_found_error (404)
  6. Content too long (context window)

What it can do on your machine

Read from SKILL.md and the folder at commit 80f86df. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Bash(curl:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • status.anthropic.com
    • api.anthropic.com

    Also links to:

    • platform.claude.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ANTHROPIC_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Clade Common Errors loads about 1.6k tokens when it runs, and up to ~2.1k if it reads all its reference files. Until then it costs about 75 tokens; SKILL.md has 284 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 284 words, ~1,609 tokens.

Download SKILL.mdSave it as .claude/skills/clade-common-errors/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
clade-common-errors
description
Diagnose and fix Anthropic API errors — authentication, rate limits, Use when working with common-errors patterns. overloaded, context length, and content policy issues. Trigger with "anthropic error", "claude 429", "claude overloaded", "anthropic not working", "debug claude api".
allowed-tools
Read, Grep, Bash(curl:*)
compatibility
Designed for Claude Code
version
1.1.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, anthropic, claude, errors, debugging

Anthropic Common Errors

Overview

Every Anthropic API error includes a type field and HTTP status code. Here are the real errors you'll hit and how to fix them.

Error Reference

Instructions

Step 1: authentication_error (401)
json
{"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}

Cause: API key is missing, malformed, or revoked. Fix:

bash
# Verify key exists and starts with sk-ant-
echo $ANTHROPIC_API_KEY | head -c 10
# Should print: sk-ant-api

# Test directly
curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "claude-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-4-20250514","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}'

Step 2: rate_limit_error (429)
json
{"type":"error","error":{"type":"rate_limit_error","message":"Number of request tokens has exceeded your per-minute rate limit"}}

Cause: Exceeded requests per minute (RPM) or tokens per minute (TPM). Fix:

typescript
// The SDK has built-in retries with backoff
const client = new Anthropic({
  maxRetries: 3, // default is 2
});

// Or handle manually using the retry-after header
try {
  const msg = await client.messages.create({ ... });
} catch (err) {
  if (err instanceof Anthropic.RateLimitError) {
    const retryAfter = err.headers?.['retry-after'];
    await sleep(Number(retryAfter) * 1000 || 5000);
    // retry...
  }
}

Rate limit tiers (as of 2025):

TierRPMTPM (input)TPM (output)
Tier 1 (free)5040,0008,000
Tier 2 ($40+)1,00080,00016,000
Tier 3 ($200+)2,000160,00032,000
Tier 4 ($400+)4,000400,00080,000

Step 3: overloaded_error (529)
json
{"type":"error","error":{"type":"overloaded_error","message":"Overloaded"}}

Cause: Anthropic API is temporarily at capacity. This is NOT a rate limit — it's server load. Fix:

typescript
// SDK retries 529s automatically. Increase retries if needed:
const client = new Anthropic({ maxRetries: 5 });

// For critical paths, implement fallback:
try {
  return await client.messages.create({ model: 'claude-sonnet-4-20250514', ... });
} catch (err) {
  if (err instanceof Anthropic.APIError && err.status === 529) {
    // Fall back to a different model or provider
    return await client.messages.create({ model: 'claude-haiku-4-5-20251001', ... });
  }
  throw err;
}

Step 4: invalid_request_error (400)
json
{"type":"error","error":{"type":"invalid_request_error","message":"messages: roles must alternate between \"user\" and \"assistant\", but found multiple \"user\" roles in a row"}}

Common causes:

  • Messages don't alternate user/assistant
  • max_tokens missing or exceeds model limit
  • Image too large (>5MB) or wrong format
  • Invalid model ID

Fix: Validate messages before sending:

typescript
function validateMessages(messages: Anthropic.MessageParam[]) {
  for (let i = 1; i < messages.length; i++) {
    if (messages[i].role === messages[i - 1].role) {
      throw new Error(`Messages must alternate roles. Index ${i} has same role as ${i-1}`);
    }
  }
  if (messages[0]?.role !== 'user') {
    throw new Error('First message must be from user');
  }
}

Step 5: not_found_error (404)
json
{"type":"error","error":{"type":"not_found_error","message":"model: model_not_found"}}

Cause: Invalid model ID or model not available on your plan. Fix: Use exact model IDs:

  • claude-opus-4-20250514
  • claude-sonnet-4-20250514
  • claude-haiku-4-5-20251001

Step 6: Content too long (context window)
json
{"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 204521 tokens > 200000 maximum"}}

Fix:

typescript
// Count tokens before sending (use Anthropic's token counting)
const count = await client.messages.countTokens({
  model: 'claude-sonnet-4-20250514',
  messages,
});
console.log(`Input tokens: ${count.input_tokens}`);

if (count.input_tokens > 180000) {
  // Truncate conversation history, keeping system + last N messages
  messages = [messages[0], ...messages.slice(-10)];
}

Quick Diagnostic

bash
# Check API status
curl -s https://status.anthropic.com/api/v2/status.json | jq '.status.description'

# Verify API key works
curl -s https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "claude-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-4-20250514","max_tokens":10,"messages":[{"role":"user","content":"ping"}]}' | jq '.content[0].text'

# Check current usage/limits
# (No API for this — check console.anthropic.com/settings/limits)

Output

  • Identified error type and HTTP status code
  • Root cause determined from error message
  • Applied fix (key rotation, backoff, input validation, model ID correction)
  • Verified resolution with successful API call

Error Handling

ErrorCauseSolution
API ErrorCheck error type and status codeSee clade-common-errors

Examples

Each error section above includes the exact JSON error response, cause analysis, and fix code. See Quick Diagnostic section for curl commands to test connectivity.

Resources

Next Steps

For deeper debugging, see clade-debug-bundle.

Prerequisites

  • Anthropic SDK installed (@claude-ai/sdk or anthropic)
  • API credentials configured
  • Access to application logs or console output

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/.curated/clade-common-errors of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/one-pager.md

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Clade Common Errors next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Clade Common Errors compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clade Common Errors this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.6kAutomated safety check: PassMIT
Anthropic Product Knowledgesyahiidkamil/Software-Engineer-AI-Agent-Atlas4014 repos~651Automated safety check: PassNone
Neon AI Gatewayneondatabase/agent-skills100—~5.1kAutomated safety check: NotesApache-2.0
Using Ccproxy APIstarbaser/ccproxy350—~4kAutomated safety check: PassCustom licence
Flowfile AI Subsystem GuideEdwardvaneechoud/Flowfile375—~7kAutomated safety check: NotesMIT
Neon Functionsneondatabase/agent-skills100—~12kAutomated safety check: NotesApache-2.0

Similar skills

  • Anthropic Product Knowledge

    syahiidkamil/Software-Engineer-AI-Agent-Atlas

    Stop and consult this skill whenever your response would include specific facts about Anthropic's products.

    401 GitHub starsUsed in 4 repos~651 tokens
    AI & LLM EngineeringAuto-check passed
  • Neon AI Gateway

    neondatabase/agent-skills

    Official

    One API and one credential for frontier and open-source LLMs, built into your Neon branch and powered by Databricks.

    100 GitHub stars~5.1k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Using Ccproxy API

    starbaser/ccproxy

    Guides users through ccproxy as an OpenAI-compatible and Anthropic-compatible LLM API server with SDK integration, OAuth authentication, sentinel key substitution, model routing, and troubleshooting.

    350 GitHub stars~4k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Flowfile AI Subsystem Guide

    Edwardvaneechoud/Flowfile

    Maps the /ai/ subsystem of flowfile_core, its three agent tiers, litellm seam, BYOK keys and rate limits, and sets rules for extending or debugging it safely.

    375 GitHub stars~7k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Neon Functions

    neondatabase/agent-skills

    Official

    Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASEURL injected automatically and compute that runs next to your data.

    100 GitHub stars~12k tokensUpdated today
    Backend & APIsAuto-check: notes
  • Awesome Free LLM APIs

    LeoYeAI/openclaw-master-skills

    Reference guide for permanent free-tier LLM APIs with rate limits, model lists, and OpenAI-compatible integration patterns.

    2.2k GitHub stars~4.1k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Clade Common Errors

What does Clade Common Errors do?

Diagnose and fix Anthropic API errors — authentication, rate limits, Use when working with common-errors patterns. Clade Common Errors is an agent skill from jeremylongshore/tons-of-skills-marketplace. Diagnose and fix Anthropic API errors — authentication, rate limits, Use when working with common-errors patterns.

When should I use Clade Common Errors?

Clade Common Errors fits situations like: working with common-errors patterns; with anthropic error; Claude overloaded; anthropic not working.

How do I install Clade Common Errors in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill clade-common-errors -a claude-code`. Or copy the skill folder (skills/.curated/clade-common-errors in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/clade-common-errors in your project. Claude Code loads it when a task matches its description.

How do I install Clade Common Errors in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill clade-common-errors -a codex`. Or copy the skill folder (skills/.curated/clade-common-errors in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/clade-common-errors in your project. Codex loads it when a task matches its description.

Can I use Clade Common Errors in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill clade-common-errors -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clade-common-errors, .gemini/skills/clade-common-errors, .github/skills/clade-common-errors and .opencode/skills/clade-common-errors in your project.

What does Clade Common Errors need to run?

Going by SKILL.md and its folder, Clade Common Errors needs the command-line tools its instructions call (curl and jq) and credentials named ANTHROPIC_API_KEY. Our summary lists: A credential in ANTHROPIC_API_KEY. Its frontmatter pre-approves these tools: Read, Grep, Bash(curl:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Clade Common Errors access the network?

SKILL.md names 3 domains. In commands or code: status.anthropic.com and api.anthropic.com; the agent is likely to contact these when it follows the instructions. As links in the text: platform.claude.com. This is read from the text; nothing was executed.

Is Clade Common Errors safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Clade Common Errors use?

Clade Common Errors is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Clade Common Errors use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 501 tokens, read only when the agent opens those files.

What are the alternatives to Clade Common Errors?

Skills that share tags, products or a category with Clade Common Errors: Anthropic Product Knowledge (syahiidkamil/Software-Engineer-AI-Agent-Atlas, 401 stars), Neon AI Gateway (neondatabase/agent-skills, 100 stars), Using Ccproxy API (starbaser/ccproxy, 350 stars) and Flowfile AI Subsystem Guide (Edwardvaneechoud/Flowfile, 375 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clade Common Errors?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.