security-headers
Skill0 starsChanged 8 months agoMITView on GitHub
Use when configuring HTTP responses, middleware, or server settings
7 other projects use a version of this.
Adopted by
Most recently taken up by
- manastalukdar/ai-devstudiotheir own version, first seen Oct 13, 2026
- ferr079/claude-code-cybersec-skillstheir own version, first seen Oct 12, 2026
- trezor/trezor-suitetheir own version, first seen Oct 8, 2026
- moh-obaida/ReadyVibe-Skillstheir own version, first seen Oct 8, 2026
- Pradnyeshp/Claude-Skillstheir own version, first seen Jul 6, 2026
- YepAPI/skillstheir own version, first seen Apr 12, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- trezor/trezor-suite★ 1.1ksame name
- harperaa/secure-claude-skills★ 16same name
- YepAPI/skills★ 8same name
- moh-obaida/ReadyVibe-Skills★ 2same name
- Pradnyeshp/Claude-Skills★ 2same name
- manastalukdar/ai-devstudio★ 1same name
- ferr079/claude-code-cybersec-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- access-controlSkill
- accessibilitySkill
- accessibility-testingSkill
- api-securitySkill
- authenticationSkill
- dependency-securitySkill
- injection-preventionSkill
- input-validationSkill
- secrets-managementSkill
- security-contextSkill
- xss-csrfSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Every HTTP response should include security headers.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Security Headers
Every HTTP response should include security headers. They're your last line of defense and take minutes to add.
Related: xss-csrf, api-security, security-context
Rule 1: Content Security Policy (CSP)
Blocks inline scripts, unauthorized sources, and most XSS attacks.
// WRONG — no CSP (any script from anywhere can run)
// RIGHT — restrictive CSP
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self'; connect-src 'self'; frame-ancestors 'none';Rule 2: Strict-Transport-Security (HSTS)
Forces HTTPS. Prevents downgrade attacks.
// WRONG — no HSTS (browser may request HTTP first)
// RIGHT — enforce HTTPS for 1 year, include subdomains
Strict-Transport-Security: max-age=31536000; includeSubDomains; preloadRule 3: X-Content-Type-Options
Prevents MIME type sniffing. Browser respects the declared Content-Type.
X-Content-Type-Options: nosniffRule 4: X-Frame-Options
Prevents clickjacking by blocking your site from being embedded in iframes.
// Block all framing
X-Frame-Options: DENY
// Or allow only same-origin framing
X-Frame-Options: SAMEORIGINRule 5: Referrer-Policy
Controls how much URL information is sent to other sites.
// WRONG — sends full URL including query params
Referrer-Policy: no-referrer-when-downgrade
// RIGHT — only sends origin, not full path
Referrer-Policy: strict-origin-when-cross-originRule 6: Permissions-Policy
Restricts which browser features your site can use.
Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=()Implementation Examples
// Node.js / Express — use helmet
const helmet = require('helmet');
app.use(helmet());
// Or set manually
app.use((req, res, next) => {
res.setHeader('X-Content-Type-Options', 'nosniff');
res.setHeader('X-Frame-Options', 'DENY');
res.setHeader('Referrer-Policy', 'strict-origin-when-cross-origin');
res.setHeader('Permissions-Policy', 'camera=(), microphone=(), geolocation=()');
res.setHeader('Strict-Transport-Security', 'max-age=31536000; includeSubDomains');
next();
});# Django — use django-csp and SecurityMiddleware
SECURE_HSTS_SECONDS = 31536000
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_CONTENT_TYPE_NOSNIFF = True
X_FRAME_OPTIONS = 'DENY'Quick Reference
| Header | Value | Purpose |
| Content-Security-Policy | default-src 'self' | Blocks unauthorized scripts/resources |
| Strict-Transport-Security | max-age=31536000 | Forces HTTPS |
| X-Content-Type-Options | nosniff | Prevents MIME sniffing |
| X-Frame-Options | DENY | Prevents clickjacking |
| Referrer-Policy | strict-origin-when-cross-origin | Limits referrer info |
| Permissions-Policy | camera=(), microphone=() | Restricts browser features |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

