llm-rate-limiting

llm-rate-limiting is a skill for Claude Code from latestaiagents/agent-skills. It costs 49 tokens per session (2,643 once invoked), scanned A, original, MIT.

A guide for controlling how often an application sends requests to large language model (LLM) APIs. It covers quota limits, retry backoff, concurrent requests, fair usage, and burst traffic.

In plain words
What is it for?
Use it when building or fixing request throttling, retry handling, or concurrency control for LLM services.
Why use it?
It helps prevent requests from being rejected when an API limit is reached or when too many requests arrive at once. It also helps avoid exhausting an API quota.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mlops plugin — 7 skills shipped together , and of llmops-guardian, latestaiagents

Good fit Use it when building or fixing request throttling, retry handling, or concurrency control for LLM services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/latestaiagents/agent-skills/llm-rate-limiting
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 latestaiagents/agent-skills --skill llm-rate-limiting
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Made for: Claude Code.

Or install mlops, the plugin that ships this one along with the rest of its 7 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 llm-rate-limiting

README.md
[![agentmods](https://agentmods.dev/badge/skills/latestaiagents/agent-skills/llm-rate-limiting/github.svg)](https://agentmods.dev/skills/latestaiagents/agent-skills/llm-rate-limiting)
Your own site
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/llm-rate-limiting"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/llm-rate-limiting/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 llm-rate-limiting

Your own site · 80×15
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/llm-rate-limiting"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/llm-rate-limiting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,643 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00049 $0.02643
Opus 5 $0.00024 $0.01321
Sonnet 5 $0.00010 $0.00529
Haiku 4.5 $0.00005 $0.00264

Measured 9d ago against content hash 55275d3a24bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

llm-rate-limiting scanned grade A with 0 findings 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 9d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/mlops/llmops-guardian/llm-rate-limiting/SKILL.md · 455 lines

How it starts

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

LLM Rate Limiting

Implement robust rate limiting to prevent quota exhaustion and handle API limits gracefully.

When to Use

  • Hitting API rate limits
  • Managing concurrent requests
  • Preventing quota exhaustion
  • Implementing fair usage policies
  • Handling burst traffic

API Rate Limits (2026)

Anthropic Claude

Tier Requests/min Tokens/min Tokens/day
Free 5 20K 300K
Tier 1 50 40K 1M
Tier 2 1000 80K 2.5M
Tier 3 2000 160K 5M
Tier 4 4000 400K 10M

OpenAI

Tier RPM TPM
Free 3 40K
Tier 1 500 200K
Tier 2 5000 450K
Tier 3 5000 800K
Tier 4 10000 2M

Rate Limiter Implementation

Token Bucket Algorithm

class TokenBucket {
  private tokens: number;
  private lastRefill: number;

  constructor(
    private capacity: number,      // Max tokens
    private refillRate: number,    // Tokens per ms
  ) {
    this.tokens = capacity;
    this.lastRefill = Date.now();
  }

  private refill(): void {
    const now = Date.now();
    const elapsed = now - this.lastRefill;
    const newTokens = elapsed * this.refillRate;

    this.tokens = Math.min(this.capacity, this.tokens + newTokens);
    this.lastRefill = now;
  }

  async acquire(tokens: number = 1): Promise<boolean> {
    this.refill();

    if (this.tokens >= tokens) {
      this.tokens -= tokens;
      return true;
    }

    return false;
  }

  async waitForTokens(tokens: number = 1): Promise<void> {
    while (!(await this.acquire(tokens))) {
      const waitTime = (tokens - this.tokens) / this.refillRate;
      await sleep(Math.min(waitTime, 1000)); // Max 1 second wait
    }
  }
}

// Usage
const limiter = new TokenBucket(
  1000,  // 1000 tokens capacity
  1000 / 60000  // 1000 tokens per minute = ~16.67 per second
);

async function makeRequest() {
  await limiter.waitForTokens(1);
  return callAPI();
}

Read the full file on GitHub · 455 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. 9d ago First seen · 455 lines · 49 tokens per session scan A 55275d3a24bf

Subscribe to this mod's changes

llm-rate-limiting is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 49 tokens to every session and 2,643 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

fw-ai-actions-app

Expert-level skill for AI Actions and integrations on Freshworks Platform 3.0. Use when (1) Creating actions.json and SMI functions (flat request, nested response), (2) Request templates and third-party API integration, (3) Pre-build validation (pricing, paywalls, account prerequisites), (4) Failure-case validation…

freshworks-developers/fw-dev-tools · 123 tokens

ai-enterprise-ai-usecase-priority-assessment

A business-diagnosis helper for deciding which enterprise AI use cases deserve attention first. It turns supplied information into a summary, findings, recommended actions, and reusable deliverables.

skillsaiagent/aiskills · 79 tokens

mem0-integration

Mem0 memory layer integration for AI agents. Implement persistent, semantic memory for long-term context retention and personalization.

a5c-ai/babysitter · 27 tokens

moai-ref-api-patterns

REST/GraphQL API design patterns, error handling conventions, and input validation reference for backend development. Agent-extending skill that amplifies backend domain work (spawned via Agent(general-purpose) with backend instructions) with production-grade API patterns. Use when designing APIs, implementing…

modu-ai/moai-adk · 85 tokens

llm-classifier

LLM-based zero-shot and few-shot classification for flexible intent detection.

a5c-ai/babysitter · 18 tokens

llm-pipeline

Use when wiring several LLM calls into a production flow: typed contracts between steps, a router/gateway so 429s, timeouts and outages fail over instead of taking you down, and cost control via caching, model tiers and abort caps. NOT single-prompt wording (that is prompt-engineering), NOT a model-driven tool loop…

ericrisco/rsc-harness · 83 tokens