rate-limiting

rate-limiting is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 21 tokens per session (761 once invoked), scanned A, original, MIT.

A guide to controlling how often clients can call a service or API. It covers design principles, system components, and a step-by-step architecture.

In plain words
What is it for?
Use it when designing request limits for clients, API gateways, microservices, and databases.
Why use it?
It helps prevent overloaded services, uneven traffic, and failures when demand increases. It also addresses reliability, scalability, security, and monitoring concerns.

Skill for Claude CodeCodex

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

Good fit Use it when designing request limits for clients, API gateways, microservices, and databases.

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

Made for: Claude Code, Codex.

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 rate-limiting

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/rate-limiting"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/rate-limiting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 761 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00021 $0.00761
Opus 5 $0.00010 $0.00380
Sonnet 5 $0.00004 $0.00152
Haiku 4.5 $0.00002 $0.00076

Measured 8d ago against content hash 563026c2c961, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

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 8d 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/backend/universal/rate-limiting/SKILL.md · 123 lines

How it starts

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

rate-limiting

Purpose

Comprehensive description for rate-limiting providing detailed architectures and best practices.

Core Principles

  1. First principle - Reliability
  2. Second principle - Scalability
  3. Third principle - Maintainability
  4. Fourth principle - Security
  5. Fifth principle - Observability

Agent Protocol

Triggers: Code execution Input Context Required: Repository context Output Artifact: System design document Response Formats:

{ "status": "ok", "action": "completed" }

Decision Matrix

[Start] -> (Condition Check) -> [End]
               |
               v
          [Alternative]

Detailed Architectural Overview

[Client] ---> [API Gateway] ---> [Microservice]
                                     |
                                     v
                                 [Database]

Workflow Steps

Phase 1

  1. Initialization step 1
  2. Initialization step 2
  3. Initialization step 3
  4. Initialization step 4 Phase 2
  5. Processing step 1
  6. Processing step 2
  7. Processing step 3
  8. Processing step 4 Phase 3
  9. Storage step 1
  10. Storage step 2
  11. Storage step 3
  12. Storage step 4 Phase 4
  13. Retrieval step 1
  14. Retrieval step 2
  15. Retrieval step 3
  16. Retrieval step 4 Phase 5
  17. Optimization step 1
  18. Optimization step 2
  19. Optimization step 3
  20. Optimization step 4 Phase 6
  21. Cleanup step 1
  22. Cleanup step 2
  23. Cleanup step 3
  24. Cleanup step 4

Extended Troubleshooting Guide

Symptom Primary Cause Mitigation Action
High Latency Network Congestion Scale up resources
Data Loss Database Failure Restore from backup
Connection Refused Service Down Restart service
Unauthorized Access Invalid Token Renew token
Out of Memory Memory Leak Optimize code
Disk Full Log Overload Rotate logs

Complete Execution Scenario

[Trigger] -> [Analysis] -> [Action] -> [Result Verification]

Rules and Guidelines

  1. Always validate inputs.
  2. Ensure backward compatibility.
  3. Keep logs structured.
  4. Fail gracefully.
  5. Apply rate limiting where appropriate.

Read the full file on GitHub · 123 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. 8d ago First seen · 123 lines · 21 tokens per session scan A 563026c2c961

Subscribe to this mod's changes

rate-limiting is a skill published in the GitHub repository j4flmao/agent-skills (23 stars, last pushed 5d ago), licensed MIT. It adds 21 tokens to every session and 761 once invoked, about $0.0001 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

api-rate-limit-handler

Implement bounded, idempotency-aware API throttling, backoff, and retry handling for 429 and transient 5xx responses.

sickn33/agentic-awesome-skills · 32 tokens

implementing-api-rate-limiting-and-throttling

Implements API rate limiting and throttling controls using token bucket, sliding window, and fixed window algorithms to protect against brute force attacks, credential stuffing, resource exhaustion, and API abuse. The engineer configures per-user, per-IP, and per-endpoint rate limits using Redis-backed counters, API…

xalgorix/xalgorix · 114 tokens

detecting-api-enumeration-attacks

Detect and prevent API enumeration attacks including BOLA and IDOR exploitation by monitoring sequential identifier access patterns and authorization failures.

xalgorix/xalgorix · 32 tokens

implementing-api-abuse-detection-with-rate-limiting

Implement API abuse detection using token bucket, sliding window, and adaptive rate limiting algorithms to prevent DDoS, brute force, and credential stuffing attacks.

xalgorix/xalgorix · 43 tokens

implementing-api-gateway-security-controls

Implements security controls at the API gateway layer including authentication enforcement, rate limiting, request validation, IP allowlisting, TLS termination, and threat protection. The engineer configures API gateways (Kong, AWS API Gateway, Azure APIM, Apigee) to act as a centralized security enforcement point…

xalgorix/xalgorix · 106 tokens

securing-api-gateway-with-aws-waf

Securing API Gateway endpoints with AWS WAF by configuring managed rule groups for OWASP Top 10 protection, creating custom rate limiting rules, implementing bot control, setting up IP reputation filtering, and monitoring WAF metrics for security effectiveness.

xalgorix/xalgorix · 59 tokens