Skip to content

Guide · Agent skill

How to use the API Rate Limit Handler agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The API Rate Limit Handler is an agent skill that teaches an AI coding agent how to handle 'slow down' responses (HTTP 429) and temporary server errors (5xx) when its code calls outside web APIs. It is for developers whose applications break under load or who want retry logic that does not duplicate POST requests. After this guide you will know what the skill changes, how to install it, how to ask for it in plain language, and where its limits are.

API Rate Limit Handlersickn33/agentic-awesome-skills · MIT

Quick start

  1. 1Download the ZIP. Get the api-rate-limit-handler ZIP from the skill's page in this directory.
  2. 2Unzip into a skills folder. Place the folder in ~/.claude/skills/ for personal use, or in your project's .claude/skills/ folder.
  3. 3Or upload in the Claude apps. Go to Settings → Capabilities → Skills and upload the skill.
  4. 4Ask in plain language. Describe the API and the problem, such as rate limits or retries on 429 or 503 responses.
  5. 5Review the generated retry code. Check the retry count, time budget and whether POST retries are disabled.
  6. 6Confirm provider header rules. Read the provider's docs for Retry-After and reset header formats before relying on them.

What is an agent skill, and what does this one make the agent do?

An agent skill is a folder containing a SKILL.md file with instructions that an AI agent can load when a task matches them. This skill covers the case where the code the agent writes calls external APIs such as GitHub, Stripe or OpenAI, which enforce rate limits.

With the skill loaded, the agent classifies each failed response as retryable or terminal, reads Retry-After and provider reset headers before computing its own delay, and waits with capped exponential backoff plus jitter when no hint exists. It also stops within a total time budget and avoids retrying operations that could cause duplicate side effects. Optionally it adds a token bucket to throttle outgoing requests.

  • Retries 408, 429, 500, 502, 503 and 504; does not retry 400, 401, 403 or 404.
  • Treats Retry-After and provider reset headers as minimum waits, never shortening them.
  • Refuses to schedule a retry that would exceed the total time budget.
  • Does not retry POST or other side-effect operations unless the provider documents an idempotency mechanism and the same key is reused.

How do you install the API Rate Limit Handler skill?

Download the ZIP from the skill's page in this directory, then choose one of two routes. For a personal install, unzip it into ~/.claude/skills/. For a single project, unzip it into the project's .claude/skills/ folder so it applies only there.

If you use the Claude apps instead, upload the skill under Settings → Capabilities → Skills.

  • Personal: unzip into ~/.claude/skills/
  • Project: unzip into .claude/skills/ inside your repository
  • Claude apps: Settings → Capabilities → Skills, then upload

Requirements for the code examples

The TypeScript examples need Node.js or another runtime that provides fetch. The Python example needs Python with the httpx package. The skill does not run scripts and does not itself make network calls; it supplies instructions and code patterns that the agent writes into your project.

  • TypeScript: Node.js or a runtime with fetch
  • Python: Python with httpx

How do you trigger the skill with natural requests?

You do not need a special command. Ask for the behaviour in ordinary words when you are writing code that calls an API. The skill's description matches requests such as handling rate limits, adding retry logic, a backoff strategy, or not getting throttled. You can also name the API and the problem, for example that a GitHub integration is returning 429 errors under load.

  • "Handle rate limits when calling the GitHub API from this script."
  • "Add retry logic with backoff to our Stripe client, but don't retry charges."
  • "Our service gets 503s under load from the provider. Add retries that respect Retry-After."
  • "Don't get throttled: limit our OpenAI calls to 60 requests per minute."

What does the generated code look like?

The skill's core pattern is a fetchWithRetry function. It takes a URL, request options, a maximum retry count and a total elapsed-time budget. Retries are skipped for non-idempotent methods unless the caller sets retryNonIdempotent explicitly. The delay helper prefers Retry-After, then a GitHub-style x-ratelimit-reset header, and falls back to jittered backoff capped at 60 seconds.

  • Default: 3 retries within a 120-second budget.
  • Upstream hints are minimum waits; if a hint would exceed the remaining budget, the function throws instead of retrying early.
  • A TokenBucket class can throttle outgoing requests before they reach the provider.

What about POST requests and payments?

The skill is explicit that retrying a POST can duplicate a charge or record. Leave retryNonIdempotent false unless the provider documents an idempotency mechanism and your code reuses the same stable idempotency key for every attempt. Non-idempotent operations such as payments or order creation without such a key are a case the skill says not to retry.

Safety notes and tips

The skill provides general guidance. It does not replace a provider's documented retry policy, so check each provider's docs before relying on specific header formats. Provider reset headers do not share one unit: some return durations while GitHub returns Unix epoch seconds, so parse an extra header only after confirming it in that provider's documentation.

Review the generated code before shipping, especially the timeout and budget values, which you should choose for your own workload.

  • Use the skill for real integrations, not one-off scripts that make a few requests.
  • Confirm header formats in each provider's current documentation.
  • Keep retries bounded so failures surface instead of piling up.

What people use it for

  • Adding Retry-After-aware retries to a GitHub API client that reads repository data.
  • Throttling outgoing OpenAI requests with a token bucket of 60 requests per minute.
  • Making a service that calls several providers fail in a bounded time instead of stalling.
  • Retrying idempotent GET or PUT calls on 503 responses while leaving POST calls alone.

Frequently asked questions

Is the API Rate Limit Handler skill free?

The skill is released under the MIT licence, as stated on its page. Check the licence text in the downloaded files for the full terms.

What do I need to use it?

You need an agent that supports skills and a runtime for the generated code: Node.js or a fetch-capable runtime for TypeScript, and Python with httpx for the Python example. The skill itself runs no scripts and makes no network calls.

Does the skill retry POST requests?

Not by default. POST retries are blocked unless you explicitly set retryNonIdempotent and the provider documents an idempotency key that is reused on every attempt.

Which status codes does it retry?

It retries 408, 429, 500, 502, 503 and 504. It treats 400, 401, 403 and 404 as terminal and does not retry them.

Why does my app still get throttled after installing it?

The skill gives general patterns. You may need the proactive token bucket for outgoing limits, and you must confirm each provider's specific limits and header formats in its documentation.

How does it compare with a dedicated retry library?

The skill is instructions and code patterns the agent writes into your project, not a library you import. If you want a maintained package, use one; if you want the agent to write code tailored to your app, this skill fits that purpose.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are integrating with rate-limited APIs and want an agent to write bounded, Retry-After-aware retry code that avoids duplicating POST requests. Skip it for simple scripts with a few one-off calls, for payments or order creation without a provider idempotency key, or where you must follow a specific provider's retry policy exactly.

Download the skill