rate-limiting-and-security

Enforce API rate limiting and security with OWASP Top 10 protections.

28|3|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/oborchers/fractional-cto --skill rate-limiting-and-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rate-limiting-and-security
Source: https://github.com/oborchers/fractional-cto/tree/main/api-design-principles/skills/rate-limiting-and-security
Command: npx skills add https://github.com/oborchers/fractional-cto --skill rate-limiting-and-security

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill addresses the critical need to protect APIs from abuse, ensure fair usage, and prevent security vulnerabilities through robust rate limiting, input validation, and security best practices.

Core Features & Use Cases

  • Rate Limiting: Implement various algorithms (Sliding Window Counter, Token Bucket) to control request volume.
  • Security Best Practices: Adhere to OWASP API Security Top 10, configure CORS, enforce HTTPS, and implement request signing for webhooks.
  • Input Validation: Sanitize and validate all incoming data to prevent injection attacks and ensure data integrity.
  • Use Case: Protect a public API from being overwhelmed by implementing a global rate limit of 100 requests per minute, while applying a stricter limit of 5 requests per minute to a computationally expensive /exports endpoint.

Quick Start

Apply a rate limiter to the /api/v1/exports endpoint allowing only 5 requests per minute.

Frequently Asked Questions about rate-limiting-and-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement rate limiting in Node.js or Python to protect specific API endpoints?

API rate limiting is implemented using sliding window counters or token buckets to control request volume. You can enforce tiered limits, such as 100 global requests per minute and stricter limits on expensive endpoints, with provided Node.js/Express and Python/FastAPI examples.

What is the best way to secure webhooks and validate incoming API requests?

Secure webhooks by implementing request signing with HMAC-SHA256 and validate incoming API requests by sanitizing data to prevent injection attacks. This ensures data integrity and protects against malicious payloads targeting your endpoints.

How does the sliding window counter algorithm work for API rate limiting?

The sliding window counter algorithm tracks API request volume over a rolling time period rather than fixed intervals. This approach smooths traffic spikes and provides accurate, fair usage enforcement compared to basic fixed window limits.

Can I configure CORS and enforce HTTPS to align with the OWASP API Security Top 10?

Yes, you can configure CORS and enforce HTTPS to align with OWASP API Security Top 10 guidelines. Addressing these vulnerabilities prevents cross-origin access issues and ensures encrypted client-server communication.

How do I apply different rate limits to a specific endpoint like an API export route?

You apply different rate limits by configuring tiered restrictions based on endpoint routes. For example, you can set a global limit of 100 requests per minute while enforcing a stricter 5 requests per minute limit on a computationally expensive /exports endpoint.

What are the limitations of using token buckets for API security compared to other methods?

Token buckets allow bursty traffic up to a maximum capacity, which may temporarily overwhelm downstream systems if not paired with strict sliding window counters. Token buckets alone do not validate input or prevent injection attacks, requiring additional security layers.