Agent skill · security · secondsky

api-security-hardening

REST API security hardening with authentication, rate limiting, input validation, security headers. Use for production APIs, security audits, defense-in-depth, or encountering vulnerabilities, injection attacks, CORS issues.

Why this skill is useful

Adds specific middleware implementations and security patterns for REST APIs that the AI wouldn't reliably generate on its own.

What it needs

Requires escape-html, express, express-mongo-sanitize, express-rate-limit, express-validator, helmet installed locally. About 1k tokens when loaded. Last updated 2026-08-06. 204 stars on the source repository.

What this skill does

API Security Hardening Protect REST APIs against common vulnerabilities with multiple security layers. Security Middleware Stack (Express) Input Validation Security Headers Security Checklist [ ] HTTPS everywhere [ ] Authentication on all protected routes [ ] Input validation and sanitization [ ] Rate limiting enabled [ ] Security headers configured [ ] CORS restricted to allowed origins [ ] No stack traces in production errors [ ] Audit logging enabled [ ] Dependencies regularly updated Additional Implementations See references/python-nginx.md for: Python FastAPI security middleware Pydantic input validation with password rules Nginx SSL/TLS and security headers configuration HTTP Parameter Pollution prevention Never Do Trust user input without validation Return detailed errors in production Store secrets in code Use GET for state-changing operations Disable security for convenience

How to use it

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

@skills secondsky/api-security-hardening

View the source on GitHub

Browse the @skills marketplace