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 tushaarmehtaa/tushar-skills --skill rate-limitgit clone --depth 1 https://github.com/tushaarmehtaa/tushar-skillsWrote 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/tushaarmehtaa/tushar-skills/rate-limit)<a href="https://agentmods.dev/skills/tushaarmehtaa/tushar-skills/rate-limit"><img src="https://agentmods.dev/badge/skills/tushaarmehtaa/tushar-skills/rate-limit/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/tushaarmehtaa/tushar-skills/rate-limit"><img src="https://agentmods.dev/badge/skills/tushaarmehtaa/tushar-skills/rate-limit.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.00043 | $0.00870 |
| Opus 5.5 | $0.00017 | $0.00348 |
| Sonnet 5.5 | $0.00009 | $0.00174 |
| Haiku 4.5 | $0.00004 | $0.00087 |
Grade A, and why
rate-limit 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 34 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rate limiting with Upstash
Rate limits are one layer of abuse and cost control. Design policy before wiring middleware.
For raw @upstash/ratelimit API shapes, use Upstash's official agent skill (upstash-ratelimit-js) if installed, otherwise the Upstash ratelimit features docs. SDK defaults below were checked on 2026-11-04 against that page and @upstash/ratelimit 2.2.0. Re-check them if that date is more than about 90 days old or the installed version differs.
Workflow
- Detect Next.js/runtime/version, deployed proxy/CDN, auth/API-key model, installed Upstash versions, protected routes, operation cost, existing quotas, and whether middleware/proxy already touches the request.
- Define a policy table per route class: identifier, algorithm/window/burst, cost weight, user tier, response behavior, and store-outage behavior. Ask only when the threat/cost tradeoff cannot be inferred. Give each tier its own limiter and prefix. Use
dynamicLimits: truewithsetDynamicLimit()only when a limit must change at runtime without a redeploy, such as load shedding; it supports single-regionfixedWindow,slidingWindow, andtokenBucketonly. - Prefer authenticated user, API key, or tenant+user identifiers. Use IP only for anonymous traffic and only from a deployment-provided trusted source. Never trust arbitrary
x-forwarded-forfrom the public internet; configure trusted proxy depth/platform headers. Do not collapse unknown clients to127.0.0.1. - Namespace by environment and route/policy. Do not apply blanket middleware and a per-route limiter to the same request unless deliberate layered limits use different keys.
- Configure explicit Upstash timeout and logging/metrics. Fail-open is the default unless you choose otherwise: when Redis does not answer within
timeout(5 s if unset),limit()returns success and says so inreason. Readreasonand choose outage behavior by endpoint:- low-risk availability paths may fail open with degraded telemetry;
- authentication, high-cost generation, or abuse-sensitive paths may use a local emergency limit, queue, credit reservation, or fail closed with a clear temporary response.
- Return
429with a non-negativeRetry-Afterand consistent rate-limit headers. Add headers to successful responses where useful. Do not emit misleading zero limits during fail-open degradation. - For weighted work, consume tokens based on server-calculated batch/operation cost. Combine rate limits with body-size limits, concurrency controls, idempotency, budgets/credits, and provider quotas where relevant.
- Preserve async work such as analytics synchronization using the runtime’s
waitUntilmechanism when the SDK exposes a pending promise. - Create the limiter outside the request handler.
ephemeralCacheis on by default: blocked identifiers are denied from memory until reset, without a Redis call, withreason: "cacheBlock". That only works while the instance stays warm, and it also changes test results.
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.
- 1mo ago Changed · +3 lines 75de96efe3da
- 3mo ago First seen · 31 lines · 43 tokens per session scan A 0eae47072c9e
rate-limit is a skill published in the GitHub repository tushaarmehtaa/tushar-skills (12 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 870 once invoked, about $0.0002 per session on Opus 5.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-08-30.
rate-limit compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rate-limittushaarmehtaa/tushar-skills | Skill | 12 | 1mo ago | MIT | A | 43 | Claude Code |
| background-job-orchestratorcuriositech/some_claude_skills | Skill | 285 | 7d ago | MIT | A | 95 | Claude Code |
| spring-data-redisrrezartprebreza/spring-boot-skills | Skill | 376 | 17d ago | MIT | A | 37 | Claude Code, Codex |
| idempotency-handlingsecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 46 | Claude Code |
| bullmqzhe-qi/clhoria-template | Skill | 194 | 6d ago | MIT | A | 45 | Claude Code |
| nw-sd-patternsnWave-ai/nWave | Skill | 638 | 15d ago | MIT | A | 43 | Claude Code |
| python-redis-module-skilljiushiwon/wg-skills | Skill | 154 | 10d ago | Apache-2.0 | A | 109 | Claude Code, Codex |