secure-headers

secure-headers is a skill for Claude Code from latestaiagents/agent-skills. It costs 63 tokens per session (2,235 once invoked), scanned A, original, MIT.

A guide to HTTP security headers, which are browser instructions that limit common web attacks. It covers settings such as Content Security Policy, HTTPS enforcement, and clickjacking protection.

In plain words
What is it for?
Use it when hardening a web app, configuring a Content Security Policy, preventing clickjacking, or addressing security scanner findings.
Why use it?
It helps remove gaps in a web application's browser-facing security configuration.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the common-security plugin — 2 skills shipped together , and of security, latestaiagents

Good fit Use it when hardening a web app, configuring a Content Security Policy, preventing clickjacking, or addressing security scanner findings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/latestaiagents/agent-skills/secure-headers
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add latestaiagents/agent-skills --skill secure-headers
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Made for: Claude Code.

Or install common-security, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for secure-headers

README.md
[![agentmods](https://agentmods.dev/badge/skills/latestaiagents/agent-skills/secure-headers/github.svg)](https://agentmods.dev/skills/latestaiagents/agent-skills/secure-headers)
Your own site
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/secure-headers"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/secure-headers/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for secure-headers

Your own site · 80×15
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/secure-headers"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/secure-headers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,235 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.02235
Opus 5.5 $0.00025 $0.00894
Sonnet 5.5 $0.00013 $0.00447
Haiku 4.5 $0.00006 $0.00224

Measured 1mo ago against content hash bc7bef42964d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

secure-headers scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

# Check headers with curl
skills/security/common-security/secure-headers/SKILL.md · 344 lines

How it starts

The opening of the file, as written. The whole thing — 344 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Secure HTTP Headers

Configure HTTP security headers to protect against common web attacks.

When to Use

  • Setting up a new web application
  • Hardening existing applications
  • Fixing security scanner findings
  • Implementing Content Security Policy
  • Preventing clickjacking

Essential Security Headers

Header Purpose Priority
Content-Security-Policy XSS prevention HIGH
Strict-Transport-Security Force HTTPS HIGH
X-Frame-Options Clickjacking HIGH
X-Content-Type-Options MIME sniffing MEDIUM
Referrer-Policy Privacy MEDIUM
Permissions-Policy Feature control MEDIUM

Implementation

Express.js with Helmet

const helmet = require('helmet');

app.use(helmet({
  // Content Security Policy
  contentSecurityPolicy: {
    directives: {
      defaultSrc: ["'self'"],
      scriptSrc: ["'self'", "https://cdn.example.com"],
      styleSrc: ["'self'", "'unsafe-inline'"],  // Consider removing unsafe-inline
      imgSrc: ["'self'", "data:", "https:"],
      connectSrc: ["'self'", "https://api.example.com"],
      fontSrc: ["'self'", "https://fonts.gstatic.com"],
      objectSrc: ["'none'"],
      mediaSrc: ["'self'"],
      frameSrc: ["'none'"],
      frameAncestors: ["'none'"],
      formAction: ["'self'"],
      baseUri: ["'self'"],
      upgradeInsecureRequests: []
    }
  },

  // HTTP Strict Transport Security
  hsts: {
    maxAge: 31536000,  // 1 year
    includeSubDomains: true,
    preload: true
  },

  // Prevent clickjacking
  frameguard: { action: 'deny' },

  // Prevent MIME type sniffing
  noSniff: true,

  // Referrer Policy
  referrerPolicy: { policy: 'strict-origin-when-cross-origin' },

  // Permissions Policy
  permittedCrossDomainPolicies: { permittedPolicies: 'none' }
}));

// Additional headers
app.use((req, res, next) => {
  // Permissions Policy (formerly Feature-Policy)
  res.setHeader('Permissions-Policy',
    'geolocation=(), microphone=(), camera=(), payment=()');

  // Cross-Origin policies
  res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');
  res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');
  res.setHeader('Cross-Origin-Resource-Policy', 'same-origin');

  next();
});

Read the full file on GitHub · 344 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 344 lines · 63 tokens per session scan A bc7bef42964d

Subscribe to this mod's changes

secure-headers is a skill published in the GitHub repository latestaiagents/agent-skills (6 stars, last pushed 6mo ago), licensed MIT. It adds 63 tokens to every session and 2,235 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.