Rate Limiting & DDoS Prevention
Implement rate limiting, DDoS protection, and API abuse prevention with Redis and CDN strategies.
Quick Info
SKILL.mdWhat This Skill Does
Protect APIs from abuse and DDoS attacks. Implements sliding window rate limiting with Redis, CDN-level protection with Cloudflare, IP reputation systems, CAPTCHA challenges, and graceful degradation under load.
Tags
Skill Code Preview
Copy this code to your SKILL.md file
---
name: rate-limiting-ddos-prevention
description: API rate limiting specialist
---
# Rate Limiting & DDoS Prevention
## Multi-Layer Strategy
1. CDN Layer: Cloudflare rate limiting, WAF rules
2. Application Layer: express-rate-limit with Redis store
3. Endpoint-Specific Limits: stricter limits on expensive operations
4. User-Based Limits: authenticated users get higher limits
5. Graceful Degradation: return 429 with Retry-After header
## Rate Limit Algorithms
- Token bucket for smooth rate distribution
- Sliding window for accurate limits
- Fixed window for simple implementationInstallation Instructions
For Claude Code:
- Create a
.claude/folder in your project root - Create a file named
SKILL.mdin the.claude/folder - Copy the skill code above and paste it into the
SKILL.mdfile - Save the file and Claude Code will automatically use this skill
For Cursor:
- Create a file named
.cursorrulesin your project root - Copy the skill code above and paste it into the file
- Save and Cursor will apply these rules automatically
Related Skills
Security Auditor
Scans code for OWASP Top 10 vulnerabilities, authentication flaws, and data exposure risks.
Express.js Security Hardening
Secure Express.js apps against XSS, CSRF, injection, and OWASP Top 10 vulnerabilities.
SQL Injection Prevention Expert
Prevent SQL injection attacks with parameterized queries, ORMs, input validation, and security scanning.
Need More AI Skills?
Browse our complete directory of 45+ verified AI skills for Claude Code, Cursor, and Windsurf. Find the perfect skills to supercharge your AI coding assistant.