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.
npx skills add lingxling/awesome-skills-cn --skill api-rate-limit-handlergit clone --depth 1 https://github.com/lingxling/awesome-skills-cnWrote 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.
[](https://agentmods.dev/skills/lingxling/awesome-skills-cn/api-rate-limit-handler)<a href="https://agentmods.dev/skills/lingxling/awesome-skills-cn/api-rate-limit-handler"><img src="https://agentmods.dev/badge/skills/lingxling/awesome-skills-cn/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.
<a href="https://agentmods.dev/skills/lingxling/awesome-skills-cn/api-rate-limit-handler"><img src="https://agentmods.dev/badge/skills/lingxling/awesome-skills-cn/api-rate-limit-handler.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.02309 |
| Opus 5.5 | $0.00013 | $0.00924 |
| Sonnet 5.5 | $0.00006 | $0.00462 |
| Haiku 4.5 | $0.00003 | $0.00231 |
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 13d 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); This is a copy
100% identical to api-rate-limit-handler — 61 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
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-Afterheaders - 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);
}
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.
- 13d ago First seen · 283 lines · 32 tokens per session scan A 05f166646882
api-rate-limit-handler is a skill published in the GitHub repository lingxling/awesome-skills-cn (314 stars, last pushed 13d ago), licensed MIT. It adds 32 tokens to every session and 2,309 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to api-rate-limit-handler, differing in 61 lines, and is treated as a copy.
Other skills, from other repositories
api-rate-limit-handler
Implement bounded, idempotency-aware API throttling, backoff, and retry handling for 429 and transient 5xx responses.
api-rate-limit-handler
Implement bounded, idempotency-aware API throttling, backoff, and retry handling for 429 and transient 5xx responses.
a0-development
Develop or operate Agent Zero: projects, chats, tasks, framework, tools and API/WebUI.
anthropic-api
Integrate the Anthropic Messages API with system prompts, tool calls, streaming, and client error handling.
api-design
Design production-grade REST, GraphQL, gRPC, and Python library APIs with correct schemas, error contracts, auth, and versioning. Use when the user asks to design an API, define endpoints, create an OpenAPI/Swagger spec, design a GraphQL schema, build a gRPC service, model request/response with Pydantic, add…
content-modelling
Design CMS content models — content types, fields, editorial workflows, governance rules, and COPE (Create Once, Publish Everywhere) patterns — for structured, multi-channel publishing. Use when the user asks to design a content model, define content types in a CMS, structure fields for editorial content, plan a…