Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
secondsky avatar

Security Headers Configuration

  • 334 installs
  • 202 repo stars
  • Updated August 4, 2026
  • secondsky/claude-skills

security-headers-configuration is an agent skill that configures HTTP security headers—including HSTS, CSP, X-Frame-Options, and Permissions-Policy—for developers hardening web apps against XSS, clickjacking, and MIME sn

About

security-headers-configuration is a MIT-licensed Claude skill for HTTP browser security headers. It provides production-ready values and implementation snippets for Express using Helmet and for Nginx add_header blocks, covering HSTS, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy. A 6-item checklist tracks rollout steps, and the skill points to SecurityHeaders.com, Mozilla Observatory, and Google CSP Evaluator for verification. Developers invoke it when hardening SaaS or API frontends, tightening CSP before production, or preparing for penetration tests and security audits without rewriting header guidance from scratch.

  • security-headers-configuration

Security Headers Configuration by the numbers

  • 334 all-time installs (skills.sh)
  • +14 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #1,248 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/secondsky/claude-skills --skill security-headers-configuration

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs334
repo stars202
Last updatedAugust 4, 2026
Repositorysecondsky/claude-skills

How do you configure HTTP security headers correctly?

Use security-headers-configuration for development tasks

Who is it for?

Web developers shipping SaaS or API frontends who need auditable HSTS and CSP configuration with copy-paste middleware or server blocks.

Skip if: Teams addressing only application-layer auth bugs or backend secrets management with no HTTP response header changes needed.

When should I use this skill?

A task involves hardening web apps, implementing CSP, passing security audits, or fixing missing HSTS and X-Frame-Options headers.

What you get

Production-ready security header directives for Express or Nginx plus a verified checklist against external header scanners.

  • HTTP security header config
  • Security headers checklist

By the numbers

  • Checklists 6 essential HTTP security headers for deployment
  • Documents Express Helmet and Nginx add_header implementation paths

Files

SKILL.mdMarkdownGitHub ↗

Security Headers Configuration

Implement HTTP security headers to defend against common browser-based attacks.

Essential Headers

HeaderPurposeValue
HSTSForce HTTPSmax-age=31536000; includeSubDomains
CSPRestrict resourcesdefault-src 'self'
X-Frame-OptionsPrevent clickjackingDENY
X-Content-Type-OptionsPrevent MIME sniffingnosniff

Express Implementation

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"],
    fontSrc: ["'self'", "https://fonts.gstatic.com"],
    frameAncestors: ["'none'"]
  }
}));

Nginx Configuration

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
add_header X-Frame-Options "DENY" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self'" always;

Verification Tools

Security Headers Checklist

  • [ ] HSTS enabled with long max-age
  • [ ] CSP configured and tested
  • [ ] X-Frame-Options set to DENY
  • [ ] X-Content-Type-Options set to nosniff
  • [ ] Referrer-Policy configured
  • [ ] Permissions-Policy disables unused features

Additional Implementations

See references/python-apache.md for:

  • Python Flask security headers middleware
  • Flask-Talisman library configuration
  • Apache .htaccess configuration
  • Header testing script

Common Mistakes

  • Setting CSP to report-only permanently
  • Using overly permissive policies
  • Forgetting to test after changes
  • Not including all subdomains in HSTS

Related skills

How it compares

Use security-headers-configuration for HTTP response header hardening; use OWASP or dependency audit skills when the primary risk is vulnerable packages rather than missing browser policies.

FAQ

Which headers does security-headers-configuration cover?

security-headers-configuration covers HSTS, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy. It ships Express Helmet and Nginx examples plus a 6-item checklist for deployment verification.

How do you verify security-headers-configuration changes?

security-headers-configuration recommends scanning deployed sites with SecurityHeaders.com, Mozilla Observatory, and Google CSP Evaluator. It advises starting CSP in report-only mode, then enforcing after testing real traffic.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.