api-rate-limit-handler

api-rate-limit-handler is a skill for Claude Code, Codex from sickn33/agentic-awesome-skills. It costs 32 tokens per session (2,309 once invoked), scanned A, original, MIT.

An implementation guide for handling API rate limits and temporary failures. An API is a service that software calls over a network; rate limits restrict how often it may be called.

In plain words
What is it for?
Use it to add bounded retries, exponential backoff, idempotency safeguards, and support for Retry-After headers when calling external APIs.
Why use it?
It prevents an application from repeatedly overwhelming another service or failing when it receives 429 or temporary 5xx responses. It also distinguishes errors that should be retried from errors that need a code or request change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Part of the agentic-awesome-skills plugin — 196 skills shipped together

Good fit Use it to add bounded retries, exponential backoff, idempotency safeguards, and support for Retry-After headers when calling external APIs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sickn33/agentic-awesome-skills/api-rate-limit-handler
About the project

AAS Core is a local control plane for coding agents that lets them search a large catalogue of skills, choose a stack, validate it, and create a reproducible plan. It is used to assemble and review agent workflows through its CLI, local MCP server, catalogue, plugins, and Workbench. The catalogue add-ons provide the skills, plugins, bundles, and workflows that AAS Core helps agents select and validate.

sickn33/agentic-awesome-skills · 46,133 stars · on GitHub · sickn33.github.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sickn33/agentic-awesome-skills --skill api-rate-limit-handler
Clone the repo
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills

Made for: Claude Code, Codex.

Or install agentic-awesome-skills, the plugin that ships this one along with the rest of its 196 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-rate-limit-handler

README.md
[![agentmods](https://agentmods.dev/badge/skills/sickn33/agentic-awesome-skills/api-rate-limit-handler/github.svg)](https://agentmods.dev/skills/sickn33/agentic-awesome-skills/api-rate-limit-handler)
Your own site
<a href="https://agentmods.dev/skills/sickn33/agentic-awesome-skills/api-rate-limit-handler"><img src="https://agentmods.dev/badge/skills/sickn33/agentic-awesome-skills/api-rate-limit-handler/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-rate-limit-handler

Your own site · 80×15
<a href="https://agentmods.dev/skills/sickn33/agentic-awesome-skills/api-rate-limit-handler"><img src="https://agentmods.dev/badge/skills/sickn33/agentic-awesome-skills/api-rate-limit-handler.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,309 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 196
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.02309
Opus 5 $0.00016 $0.01154
Sonnet 5 $0.00006 $0.00462
Haiku 4.5 $0.00003 $0.00231

Measured 4d ago against content hash 05f166646882, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

api-rate-limit-handler scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(url, options);
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/agentic-awesome-skills-claude/skills/api-rate-limit-handler/SKILL.md · 283 lines

How it starts

The opening of the file, as written. The whole thing — 283 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Rate Limit Handler

Overview

A skill for implementing production-grade rate limiting, exponential backoff, and retry strategies when integrating with external APIs. Prevents cascading failures, respects upstream quotas, and keeps your application resilient under load.

When to Use This Skill

  • Use when calling external APIs that enforce rate limits (OpenAI, Stripe, GitHub, etc.)
  • Use when you receive 429 Too Many Requests or 5xx errors and need graceful recovery
  • Use when building a client that must respect Retry-After headers
  • Use when designing a system that fans out to multiple API providers
  • Use when the user says "handle rate limits", "add retry logic", "backoff strategy", or "don't get throttled"

How It Works

Step 1: Classify the response

Determine whether a failed request is retryable or terminal.

Status Classification Action
200-299 Success Return response
400, 401, 403, 404 Terminal client error Do not retry — fix the request
408, 429 Retryable (rate limit / timeout) Retry with backoff
500, 502, 503, 504 Retryable (server error) Retry with backoff

Step 2: Parse rate limit headers

Always check upstream hints before computing your own delay.

function getRetryDelay(
  response: Response,
  attempt: number,
  maxDelayMs = 60_000
): number {
  // Prefer upstream hints
  const retryAfter = response.headers.get("Retry-After");
  if (retryAfter) {
    const seconds = Number(retryAfter);
    if (Number.isFinite(seconds) && seconds >= 0) {
      return Math.min(seconds * 1000, maxDelayMs);
    }
    // HTTP-date format
    const date = new Date(retryAfter).getTime();
    if (Number.isFinite(date)) {
      return Math.min(Math.max(0, date - Date.now()), maxDelayMs);
    }
  }

  // GitHub documents x-ratelimit-reset as Unix epoch seconds.
  const githubReset = Number(response.headers.get("x-ratelimit-reset"));
  if (Number.isFinite(githubReset)) {
    return Math.min(
      Math.max(0, githubReset * 1000 - Date.now()),
      maxDelayMs
    );
  }

  // Fallback: capped exponential backoff with full jitter.
  const cap = Math.min(1000 * 2 ** attempt, maxDelayMs);
  return Math.floor(Math.random() * cap);
}

Read the full file on GitHub · 283 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 283 lines · 32 tokens per session scan A 05f166646882

Subscribe to this mod's changes

api-rate-limit-handler is a skill published in the GitHub repository sickn33/agentic-awesome-skills (46,133 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 2,309 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.