Skip to content
Back to skills

Security Headers

ASecurity

Defines required HTTP security headers and API-specific header rules; use when configuring web servers or API gateways or when reviewing HTTP responses.

  • 19 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 19, 2026
ai-agentsapisecurity

Works with

  • api

Security analysis

A100/100

Scanned October 19, 2026

npx -y skills add sawrus/agent-guides --skill security-headers --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Security Headers?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Security Headers
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sawrus-security-headers/badge)](https://www.skillsdirectory.com/skills/sawrus-security-headers)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: security-headers
description: "Defines required HTTP security headers and API-specific header rules; use when configuring web servers or API gateways or when reviewing HTTP responses."
---

# Skill: HTTP Security Headers

## When to load

When configuring web servers, API gateways, or reviewing HTTP responses.

## Required Headers

```nginx
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
add_header Content-Security-Policy "
  default-src 'self';
  script-src 'self' 'nonce-{NONCE}';
  style-src 'self' 'unsafe-inline';
  img-src 'self' data: https://cdn.mycompany.com;
  connect-src 'self' https://api.mycompany.com;
  frame-ancestors 'none';
" always;
```

## API-Specific

- Remove: `X-Powered-By`, `Server` (information disclosure)
- Add: `X-Request-ID` (tracing), `Cache-Control: no-store` (auth responses)
- CORS: Never `Access-Control-Allow-Origin: *` for credentialed requests

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.