Skip to content
Back to skills

Add Rate Limit

ASecurity

Adds rate limiting to a named route group using your current stack, with sane limits, proper 429 replies and a test.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 15, 2026
ai-agentsrustexpressapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill add-rate-limit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Add Rate Limit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Add Rate Limit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-add-rate-limit/badge)](https://www.skillsdirectory.com/skills/workspace-templates-add-rate-limit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: add-rate-limit
description: Adds rate limiting to a named route group using your current stack, with sane limits, proper 429 replies and a test.
argument-hint: "[route group, e.g. /auth/*]"
user-invocable: true
disable-model-invocation: true
---

Add rate limiting to this route group: $ARGUMENTS

1. Find how the app is served and whether a limiter exists already (express-rate-limit, slowapi, Rack::Attack, a gateway or CDN rule, Redis). Reuse it. Do not add a new store without asking.
2. Choose the key per route: IP for anonymous routes, user id or API key for authenticated ones, and both IP and account name for login. Mention proxy setups: read the real client IP only from a trusted forwarded header.
3. Propose limits and show the numbers before coding, for example 5 per minute for login, 60 per minute for general reads. A burst allowance is better than a hard cap.
4. Return 429 with a Retry-After header and the project's normal error body. Never reveal whether an account exists.
5. Check multi-instance behavior: an in-memory counter is wrong behind several servers, so say so.
6. Write a test that exceeds the limit, sees the 429, and checks that a different key is unaffected. Run the tests.

Report the limits, keys and any gap such as a shared store you did not set up.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.