/security-headers-configuration
Configures HTTP security headers to protect against XSS, clickjacking, and MIME sniffing attacks. Use when hardening web applications, passing security audits, or implementing Content Security Policy.
One skill from claude-skills.
shell
$ npx -y skills add secondsky/claude-skills --skill security-headers-configuration --agent claude-codeInstalls just this skill. Get the whole plugin for auto-invocation.
How it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/security-headers-configuration
Context preview
The summary Claude sees to decide when to auto-load this skill.
Configures HTTP security headers to protect against XSS, clickjacking, and MIME sniffing attacks. Use when hardening web applications, passing security audits, or implementing Content Security Policy.
Stats
Stars194
Forks29
LanguageTypeScript
LicenseMIT
Ships with claude-skills
SKILL.md
security-headers-configuration.SKILL.md
--- name: security-headers-configuration description: Configures HTTP security headers to protect against XSS, clickjacking, and MIME sniffing attacks. Use when hardening web applications, passing security audits, or implementing Content Security Policy. license: MIT --- # Security Headers Configuration Implement HTTP security headers to defend against common browser-based attacks. ## Essential Headers | Header | Purpose | Value | |--------|---------|-------| | HSTS | Force HTTPS | `max-age=31536000; includeSubDomains` | | CSP | Restrict resources | `default-src 'self'` | | X-Frame-Options | Prevent clickjacking | `DENY` | | X-Content-Type-Options | Prevent MIME sniffing | `nosniff` | ## Express Implementation ```javascript const helmet = require('helmet'); app.use(helmet()); // Custom CSP app.use(helmet.contentSecurityPolicy({ directives: { defaultSrc: ["'self'"], scriptSrc: ["'self'", "'unsafe-inline'"], styleSrc: ["'self'", "'unsafe-inline'"], imgSrc: ["'self'", "data:", "https:"], connectSrc: ["'self'", "https://api.example.com"],
