Agent skill · security · aj-geddes

api-security-hardening

Secure REST APIs with authentication, rate limiting, CORS, input validation, and security middleware. Use when building or hardening API endpoints against common attacks.

Why this skill is useful

Provides specific implementation patterns and middleware configurations for securing REST APIs that the AI wouldn't reliably generate on its own.

What it needs

Requires cors, express, express-mongo-sanitize, express-rate-limit, helmet, hpp, jsonwebtoken, validator, xss-clean installed locally. About 1k tokens when loaded. Last updated 2026-03-04. 307 stars on the source repository.

What this skill does

API Security Hardening Table of Contents Overview When to Use Quick Start Reference Guides Best Practices Overview Implement comprehensive API security measures including authentication, authorization, rate limiting, input validation, and attack prevention to protect against common vulnerabilities. When to Use New API development Security audit remediation Production API hardening Compliance requirements High-traffic API protection Public API exposure Quick Start Minimal working example: Reference Guides Detailed implementations in the references/ directory: Guide Contents --- --- Node.js/Express API Security Node.js/Express API Security Python FastAPI Security Python FastAPI Security API Gateway Security Configuration API Gateway Security Configuration Best Practices ✅ DO Use HTTPS everywhere Implement rate limiting Validate all inputs Use security headers Log security events Implement CORS properly Use strong authentication Version your APIs ❌ DON'T Expose stack traces Return detailed errors Trust user input Use HTTP for APIs Skip input validation Ignore rate limiting

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aj-geddes/api-security-hardening

View the source on GitHub

Browse the @skills marketplace