Skip to content
Back to skills

Rate Limiting

ASecurity

Add rate limits that protect logins, APIs and expensive endpoints without blocking legitimate users

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentsrustgitapibackendsecurity

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add ansh44233/forge --skill rate-limiting --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rate Limiting?

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

Security grade badge for Rate Limiting
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ansh44233-rate-limiting/badge)](https://www.skillsdirectory.com/skills/ansh44233-rate-limiting)

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
---
description: Add rate limits that protect logins, APIs and expensive endpoints without blocking legitimate users
profile: standard
tags: security, api, rate-limiting, backend
---

# Rate limiting

Rate limits stop brute force, scraping and runaway clients, and protect your own costs.

## Design
- Pick the key deliberately: per user/API key when authenticated, per IP (with care behind proxies) otherwise, per account for login attempts.
- Token bucket or sliding window in a shared store (Redis) when there are multiple instances; in-memory only for single-instance apps.
- Stricter limits on login, password reset, signup, OTP and expensive or LLM-backed endpoints.

## Responses
- Return `429` with `Retry-After` and rate-limit headers; never a silent drop.
- Log and alert on sustained limit hits; they are often attacks.

## Pitfalls
- Trust `X-Forwarded-For` only from your own proxy hops.
- Don't count health checks; allow-list internal services explicitly.

## Verify
A test hits the limited endpoint N+1 times and asserts the last response is 429 with `Retry-After`, and that a different user/key is unaffected.

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.