memstack-security-csp-headers

memstack-security-csp-headers is a skill for Claude Code from cwinvestments/memstack. It costs 83 tokens per session (4,048 once invoked), scanned A, original, MIT.

A web security header auditor checks browser-facing HTTP headers such as Content-Security-Policy, HSTS, and X-Frame-Options. These headers tell browsers which resources are allowed and how to defend against common attacks.

In plain words
What is it for?
Use it to review a site's security headers and generate safer header settings for its framework, hosting setup, and external resources.
Why use it?
It exposes headers that are missing or too permissive, such as allowing unsafe scripts or framing that can enable clickjacking.

Skill for Claude Code

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

Part of the memstack plugin — 87 skills, 2 commands, 6 hooks shipped together

Good fit Use it to review a site's security headers and generate safer header settings for its framework, hosting setup, and external resources.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cwinvestments/memstack/csp-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 cwinvestments/memstack --skill csp-headers
Clone the repo
git clone --depth 1 https://github.com/cwinvestments/memstack

Made for: Claude Code.

Or install memstack, the plugin that ships this one along with the rest of its 87 skills, 2 commands, 6 hooks.

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 memstack-security-csp-headers

README.md
[![agentmods](https://agentmods.dev/badge/skills/cwinvestments/memstack/csp-headers/github.svg)](https://agentmods.dev/skills/cwinvestments/memstack/csp-headers)
Your own site
<a href="https://agentmods.dev/skills/cwinvestments/memstack/csp-headers"><img src="https://agentmods.dev/badge/skills/cwinvestments/memstack/csp-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 memstack-security-csp-headers

Your own site · 80×15
<a href="https://agentmods.dev/skills/cwinvestments/memstack/csp-headers"><img src="https://agentmods.dev/badge/skills/cwinvestments/memstack/csp-headers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,048 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00083 $0.04048
Opus 5.5 $0.00033 $0.01619
Sonnet 5.5 $0.00017 $0.00810
Haiku 4.5 $0.00008 $0.00405

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

Security

Grade A, and why

memstack-security-csp-headers scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/security/csp-headers/SKILL.md · 442 lines

How it starts

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

🛡️ CSP Headers: Security Headers Auditor & Generator

Audit existing security headers, identify overly permissive directives, and generate a production-ready Content-Security-Policy with companion headers.

Activation

When this skill activates, output:

🛡️ CSP Headers: Auditing your security headers...

Context Status
User says "CSP", "security headers", "Content-Security-Policy" ACTIVE
User wants to fix unsafe-inline, unsafe-eval, or wildcard directives ACTIVE
User mentions HSTS, X-Frame-Options, or Permissions-Policy ACTIVE
User wants a full OWASP security audit (not just headers) DORMANT: see owasp-top10
User wants to scan for secrets in code DORMANT: see secrets-scanner
User wants API-level security (auth, rate limiting) DORMANT: see api-audit

Protocol

Step 1: Gather Inputs

Ask the user for:

  • Framework: Next.js, Express, Fastify, Nginx, Caddy, static hosting?
  • CDN/hosting: Vercel, Netlify, Cloudflare, self-hosted?
  • External resources: Which third-party scripts, fonts, images, or APIs are loaded? (analytics, payment widgets, CDNs)
  • Inline scripts: Does the app use inline <script> tags or inline styles?
  • Iframes: Does the app embed iframes or get embedded by others?

Step 2: Scan Existing Headers

Check for CSP and security headers in all possible locations:

Where to look:

  1. Middleware: Express/Next.js middleware setting response headers
  2. Config files: next.config.js (headers() function), nginx.conf, Caddyfile
  3. Meta tags: <meta http-equiv="Content-Security-Policy" content="..."> in HTML
  4. Hosting config: vercel.json, netlify.toml, _headers file
  5. Reverse proxy: Nginx/Caddy/Apache header directives
── EXISTING HEADERS FOUND ─────────────────

Location: [file:line or "not found"]

Content-Security-Policy:
  [current policy or "MISSING"]

Strict-Transport-Security:
  [current value or "MISSING"]

X-Content-Type-Options:
  [current value or "MISSING"]

X-Frame-Options:
  [current value or "MISSING"]

Referrer-Policy:
  [current value or "MISSING"]

Permissions-Policy:
  [current value or "MISSING"]

X-XSS-Protection:
  [current value or "MISSING, deprecated but still useful for older browsers"]

Read the full file on GitHub · 442 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 Changed ccb1908b42eb
  2. 1mo ago First seen · 442 lines · 83 tokens per session scan A 5ea6d116302e

Subscribe to this mod's changes

memstack-security-csp-headers is a skill published in the GitHub repository cwinvestments/memstack (425 stars, last pushed yesterday), licensed MIT. It adds 83 tokens to every session and 4,048 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.