Api Security Hardening
Express middleware stack for REST API hardening with helmet, rate limiting, input validation, and security headers.
- CCM score
- 52 of 100
- skills.sh installs
- 522
- GitHub stars
- 257
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers Express middleware for security headers, rate limiting, input validation, and injection prevention in production APIs
- Includes rate limits of 100 requests per 15 minutes on
/api/and 5 on/api/auth/, plus ahelmetstack and an 8-character password rule - Provides a 9-item security checklist covering HTTPS, authentication, CORS, error handling, audit logging, and dependency updates
- Designed for Express-based production APIs, with a reference covering FastAPI, Pydantic, and Nginx configuration
Install
$ npx -y skills add secondsky/claude-skills --skill api-security-hardening -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
API Security Hardening
Protect REST APIs against common vulnerabilities with multiple security layers.
Security Middleware Stack (Express)
const helmet = require('helmet');
const rateLimit = require('express-rate-limit');
const mongoSanitize = require('express-mongo-sanitize');
app.use(helmet());
app.use(mongoSanitize());
// For input sanitization, see the `xss-prevention` skill — do NOT use the
// deprecated `xss-clean` package (unmaintained since 2018; its own README
// recommends migrating off it).
app.use('/api/', rateLimit({
windowMs: 15 * 60 * 1000,
max: 100
}));
app.use('/api/auth/', rateLimit({
windowMs: 15 * 60 * 1000,
max: 5
}));
Input Validation
const { body, validationResult } = require('express-validator');
const escapeHtml = require('escape-html');
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- Security, Backend & APIs
- First seen
- Jun 3, 2026
Questions
What does the api-security-hardening skill do?
It hardens REST APIs against common vulnerabilities using layered defenses: authentication on protected routes, rate limiting, input validation, security headers, and CORS restriction. The SKILL.md includes Express middleware examples using helmet, express-rate-limit and express-validator, plus Python FastAPI and Nginx configuration in a reference file.
How do I install the api-security-hardening skill?
Run npx -y skills add secondsky/claude-skills --skill api-security-hardening -y in your project. Once installed, the agent can apply security middleware, input validation and header configuration to your API code.
Which skills lead the Security category, and where does api-security-hardening stand?
Api-security-hardening sits in the Security category alongside azure-compliance, entra-agent-id, firebase-security-rules-auditor, security-audit and cloudflare-one. It focuses on REST API hardening, covering rate limiting, input validation, security headers and CORS for production APIs.
Is api-security-hardening suited to Express or Python projects?
The main examples are written for Express in JavaScript, with rate limiting, mongo sanitization and validation middleware. Python FastAPI middleware, Pydantic password rules and Nginx SSL and header setup are covered in a separate reference file.
More from secondsky/claude-skills
All 116- Architecture Patterns521
- Api Rate Limiting517
- Design System Creation515
- Threejs509
- React Composition Patterns504
- Api Contract Testing500
- Technical Specification500
- React Native Skills499
- Mobile App Testing491
- Csrf Protection487
- Ml Model Training487
- Bun Test Basics483
- Payment Gateway Integration481
- Test Quality Analysis480
- Bun Hono Integration476
- Api Reference Documentation475
- Mutation Testing471
- Tanstack Router471
- Internationalization I18n467
- Security Headers Configuration466
- Systematic Debugging466
- Bun Package Manager465
- Interaction Design465
- Seo Optimizer465
Similar to Api Security Hardening
More Securityapi-security-hardenerSkillpatricio0312rev/skills290 installsHardening guide for production APIs covering validation, auth, authorization, and rate limiting in Express.
api-security-best-practicesSkillsickn33/agentic-awesome-skills9K installsSecure API design guide covering authentication, authorization, input validation, and abuse controls for protected endpoints.
security-headers-configurationSkillsecondsky/claude-skills466 installsConfigures HTTP security headers for XSS, clickjacking, and MIME sniffing defense with Express and Nginx examples.
better-auth-security-best-practicesSkillbetter-auth/skills52.7K installsHardening guide for Better Auth covering rate limits, secrets, CSRF, origins, sessions, cookies, and audit hooks.
backend-api-securityPluginHermeticOrmus/LibreUIUX-Claude-Code127 starsAPI security hardening, authentication implementation, authorization patterns, rate limiting, and input validation