aj-geddes avatar

Security Headers Configuration

This sets up HTTP security headers to protect web apps from XSS, clickjacking, and MIME sniffing attacks. You get reference implementations for Express, Nginx, Flask, and Apache covering CSP, HSTS, X-Frame-Options, and the rest of the standard hardening stack. Use it when deploying new apps, fixing security audit findings, or meeting compliance requirements. The guides are platform specific which is helpful since header syntax varies wildly between a Node middleware and an htaccess file. One thing to note: the quick start shows unsafe-inline in the CSP example, which the best practices section correctly warns against, so you'll want to tighten that up for production.

skills.sh installs
519
GitHub stars
379
last updated
Aug 21, 2026

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill security-headers-configuration --agent claude-code

Installs into .claude/skills of the current project.

Files

Security Headers Configuration

Table of Contents

Overview

Implement comprehensive HTTP security headers to protect web applications from XSS, clickjacking, MIME sniffing, and other browser-based attacks.

When to Use

  • New web application deployment
  • Security audit remediation
  • Compliance requirements
  • Browser security hardening
  • API security
  • Static site protection

Quick Start

Minimal working example:

// security-headers.js
const helmet = require("helmet");

Sponsors

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Security, AI & Agent Building
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258

Recommended

More Security
1davila7 avatarapi-security-best-practicesdavila7/claude-code-templatesImplement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities466skills.sh installs
2secondsky avatarsecurity-headers-configurationsecondsky/claude-skillsConfigures HTTP security headers to protect against XSS, clickjacking, and MIME sniffing attacks. Use when hardening web applications, passing security audits, 454skills.sh installs
3hieutrtr avatarcode-review-securityhieutrtr/ai1-skillsSecurity-focused code review checklist and automated scanning patterns. Use when reviewing pull requests for security issues, auditing authentication/authorizat440skills.sh installs
4secondsky avataroauth-implementationsecondsky/claude-skillsOAuth 2.0 and OpenID Connect authentication with secure flows. Use for third-party integrations, SSO systems, token-based API access, or encountering authorizat422skills.sh installs
5mastepanoski avatarowasp-llm-top10mastepanoski/claude-skillsSecurity audit for LLM and GenAI applications using OWASP Top 10 for LLM Apps 2025. Assess prompt injection, data leakage, supply chain, and 7 more critical vul409skills.sh installs
6davila7 avatarvulnerability-scannerdavila7/claude-code-templatesAdvanced vulnerability analysis principles. OWASP 2025, Supply Chain Security, attack surface mapping, risk prioritization.394skills.sh installs