Agent skill · Security

api-security-best-practices

Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities

Nick44,086★ · +407/wk · 1 repos on radarProfile →
claude-codecodexcursorMIT
Install
npx skills add sickn33/agentic-awesome-skills --skill api-security-best-practices --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 23 KB
Bundled scripts: none
Path: skills/api-security-best-practices/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 44,414 · +328 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Guides developers in building secure APIs by implementing authentication, authorization, input validation, rate limiting, and protection against common vulnerabilities across REST, GraphQL, and WebSocket APIs.

How it works

  1. Authentication & Authorization: choose method (JWT, OAuth 2.0, API keys), implement token-based authentication, set up RBAC, secure session management, and consider MFA.
  2. Input Validation & Sanitization: validate all input, sanitize inputs, use parameterized queries, implement request schema validation, and prevent SQLi, XSS, and command injection.
  3. Rate Limiting & Throttling: implement per-user/IP rate limiting, set up API throttling, configure quotas, handle rate limit errors gracefully, monitor activity.
  4. Data Protection: encrypt data in transit (HTTPS/TLS), encrypt data at rest, implement proper error handling, sanitize error messages, use secure headers.
  5. API Security Testing: test authentication/authorization, perform penetration testing, check OWASP API Top 10, validate input handling, test rate limiting.

When to use it

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

What it can touch

  • Tools mentioned: claude-code, codex, cursor.
  • Files and code examples include multiple code blocks and configurations for authentication, validation, rate limiting, and testing.

Caveats

  • Risk level: critical.
  • License: MIT.
  • Declared source: community.
  • Date added: 2026-02-27.
From the 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 ### Step 1: Authentication & Authorization I'll help you implement secure authentication: - Choose authentication method (JWT, OAuth 2.0, API keys) - Implement token-based authentication - Set up role-based access control (RBAC) - Secure session management - Implement multi-factor authentication (MFA) ### Step 2: Input Validation & Sanitization Protect against injection attacks: - Validate all input data - Sanitize user inputs - Use parameterized queries - Implement request schema validation

What's inside
Steps it walks through
  1. Overview
  2. When to Use This Skill
  3. How It Works
  4. Step 1: Authentication & Authorization
  5. Step 2: Input Validation & Sanitization
  6. Step 3: Rate Limiting & Throttling
  7. Step 4: Data Protection
  8. Step 5: API Security Testing
  9. Examples
  10. Example 1: Implementing JWT Authentication
  11. Example 2: Input Validation and SQL Injection Prevention
  12. Example 3: Rate Limiting and DDoS Protection
  13. Best Practices
  14. ✅ Do This
More from agentic-awesome-skills
All skills →
About this skill
What does the api-security-best-practices skill do?

Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities

How do I install it?

Run `npx skills add sickn33/agentic-awesome-skills --skill api-security-best-practices --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going