api-security-best-practices

Installation
Summary

Comprehensive guide to securing APIs through authentication, authorization, input validation, rate limiting, and vulnerability protection.

  • Covers five core security areas: JWT/OAuth authentication, role-based access control, input validation with parameterized queries, rate limiting with Redis, and DDoS protection via security headers
  • Includes practical code examples for token generation, refresh flows, SQL injection prevention, XSS sanitization, and tiered rate limiting by user tier
  • Addresses OWASP API Top 10 vulnerabilities with specific mitigation strategies and common pitfalls like exposed secrets, weak passwords, and missing authorization checks
  • Provides security checklists for authentication, data protection, monitoring, and testing across REST, GraphQL, and WebSocket APIs
SKILL.md

API Security Best Practices

Overview

Guide developers in building secure APIs by implementing authentication, authorization, input validation, rate limiting, and protection against common vulnerabilities. This skill covers security patterns for REST, GraphQL, and WebSocket APIs.

When to Use This Skill

  • Use when designing new API endpoints
  • Use when securing existing APIs
  • Use when implementing authentication and authorization
  • Use when protecting against API attacks (injection, DDoS, etc.)
  • Use when conducting API security reviews
  • Use when preparing for security audits
  • Use when implementing rate limiting and throttling
  • Use when handling sensitive data in APIs

How It Works

Related skills
Installs
7.0K
GitHub Stars
37.3K
First Seen
Jan 22, 2026