skills/rate-limit-strategist/SKILL.md
Selects the optimal rate limiting strategy (sliding window, token bucket, leaky bucket) for per-user, per-IP, or global levels.
npx skillsauth add fatih-developer/fth-skills rate-limit-strategistInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill designs the throttling and quota mechanisms that protect an API from noisy neighbors, accidental infinite loops in client code, and malicious abuse. It shifts the focus from "how to code it" to "what the limits should actually be."
Core assumption: Without rate limits, your API will eventually be DDOSed by your own front-end bug.
Select the right rate-limiting algorithm based on traffic characteristics:
Rate limits should rarely be global. Define multiple layers:
/export-pdf limited to 1 req/min).When a limit is hit, the application must respond gracefully, not just fail. Define standard headers to inform the client.
Required Outputs (Must write BOTH to docs/api-report/):
docs/api-report/rate-limit-report.md)### 🛑 Rate Limiting Strategy
- **Selected Algorithm:** Token Bucket
- **Implementation Layer:** Redis-backed API Gateway Plugin.
#### ⚖️ Configured Quotas
1. **Global (IP-Based):** 300 requests per minute.
2. **Standard User (Token-Based):** 60 requests per minute.
3. **Expensive Route (`POST /generate-report`):** 5 requests per hour per User.
#### 📬 Consumer Response Design
When limits are exceeded, return `429 Too Many Requests`.
**Headers Included:**
- `X-RateLimit-Limit: 60` (Total quota)
- `X-RateLimit-Remaining: 0` (Used up)
- `X-RateLimit-Reset: 1711281600` (Unix timestamp of reset)
- `Retry-After: 45` (Seconds to wait)
**Body:**
```json
{
"error": "quota_exceeded",
"message": "You have exceeded your plan limit of 60 req/min. Please try again in 45 seconds.",
"upgrade_url": "https://dashboard.com/billing"
}
2. **Machine-Readable JSON (`docs/api-report/rate-limit-output.json`)**
```json
{
"skill": "rate-limit-strategist",
"algorithm": "token_bucket",
"tiers": [
{"type": "IP", "limit": 300, "window": "1m"},
{"type": "User", "limit": 60, "window": "1m"},
{"type": "Endpoint", "path": "/generate-report", "limit": 5, "window": "1h"}
],
"enforced_headers": ["Retry-After", "X-RateLimit-Remaining"]
}
X-RateLimit vs standard IETF RateLimit). Pick one and be consistent.tools
Create, optimize, critique, and programmatically structure prompts for AI systems. Use this skill whenever the user is designing or improving a static prompt, system prompt, coding prompt, agent prompt, workflow prompt, MCP-oriented prompt package, or an algorithmic prompt optimization pipeline. Also use it when the user asks to turn vague AI behavior into a precise instruction set, tool policy, agent spec, evaluation metric, or prompt architecture.
testing
Assumption-first architecture review skill to stress-test project plans and expose hidden risks.
testing
Enforce and manage DESIGN.md specifications, extract design systems from URLs, and combine design reasoning with token roles to prevent drift.
testing
Forces the agent to act with a Claude-like product mindset, prioritizing user journey, UX states, and visual quality before coding.