Agent skill · software engineering · aj-geddes

api-rate-limiting

Implement API rate limiting strategies using token bucket, sliding window, and fixed window algorithms. Use when protecting APIs from abuse, managing traffic, or implementing tiered rate limits.

Why this skill is useful

Provides specific implementations and strategies for API rate limiting that the AI wouldn't reliably generate on its own.

What it needs

About 1k tokens when loaded. Last updated 2026-03-04. 307 stars on the source repository.

What this skill does

API Rate Limiting Table of Contents Overview When to Use Quick Start Reference Guides Best Practices Overview Protect APIs from abuse and manage traffic using various rate limiting algorithms with per-user, per-IP, and per-endpoint strategies. When to Use Protecting APIs from brute force attacks Managing traffic spikes Implementing tiered service plans Preventing DoS attacks Fairness in resource allocation Enforcing quotas and usage limits Quick Start Minimal working example: Reference Guides Detailed implementations in the references/ directory: Guide Contents --- --- Token Bucket Algorithm Token Bucket Algorithm Sliding Window Algorithm Sliding Window Algorithm Redis-Based Rate Limiting Redis-Based Rate Limiting Tiered Rate Limiting Tiered Rate Limiting Python Rate Limiting (Flask) Python Rate Limiting (Flask) Response Headers Response Headers Best Practices ✅ DO Include rate limit headers in responses Use Redis for distributed rate limiting Implement tiered limits for different user plans Set appropriate window sizes and limits Monitor rate limit metrics Provide clear retry guidance Document rate limits in API docs Test under high load ❌ DON'T Use in-memory storage in production Set limits too restrictively Forget to include Retry-After header Ignore distributed scenarios Make rate limits public (security) Use simple counters for distributed systems Forget cleanup of old data

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aj-geddes/api-rate-limiting

View the source on GitHub

Browse the @skills marketplace