secure-headers

secure-headers is a skill for Claude Code, Codex 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/latestaiagents/agent-skills/secure-headers
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00032 $0.01118
Sonnet 5 $0.00013 $0.00447
Haiku 4.5 $0.00006 $0.00224

Measured 2d ago against content hash bc7bef42964d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 2d 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. 2d 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 (5 stars, last pushed 4mo ago), licensed MIT. It adds 63 tokens to every session and 2,235 once invoked, about $0.0003 per session on Opus 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.

Related

Other skills, from other repositories

ai-core-web-vitals

Core Web Vitals 诊断助手适合technical、产品、市场营销、software在用户提出“页面速度拖转化吗”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成问题归因、服务改进建议、SOP …

skillsaiagent/aiskills · 72 tokens

ai-design-taste-frontend

前端审美诊断助手适合内容创作者、市场营销、运营、内容媒体在用户提出“这个界面高级吗”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成视觉/创意诊断、提示词或分镜方案、发布规格检查。.

skillsaiagent/aiskills · 80 tokens

ai-extract-design-system

视觉质量诊断助手适合产品、运营、technical、software在用户提出“这张图够发布吗”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成摘要、诊断结论、行动建议和可复用交付物。.

skillsaiagent/aiskills · 73 tokens

ai-frontend-design

视觉质量诊断助手适合产品、运营、technical、software在用户提出“这张图够发布吗”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成摘要、诊断结论、行动建议和可复用交付物。.

skillsaiagent/aiskills · 72 tokens

external-memory-plugin

Develop, adapt, review, test, and troubleshoot Nexent external memory provider plugins, including plugin.yaml manifests, searchable and ingestible provider protocols, error mapping, network-isolated unit tests, deployment configuration, and Mem0-based examples. Use when adding a new external memory vendor, changing an…

ModelEngine-Group/nexent · 85 tokens

mcp-host-styling-integration

Integrates MCP App UI with host theming system. Applies host CSS variables, handles onhostcontextchanged, safe area insets, display mode detection, and fullscreen configuration.

a5c-ai/babysitter · 44 tokens