Hardens web apps against XSS, clickjacking, and referrer leakage by configuring CSP, X-Frame-Options, Referrer-Policy, and other browser-enforced HTTP headers.
Response headers are the cheapest defense a web app has: a few lines tell every browser what your pages are allowed to do, and browsers enforce them for free. Skip them and a single injected script runs with full origin privileges, your page loads inside an attacker's iframe, and full URLs with tokens leak to third parties through the referrer.
Content-Security-Policy-Report-Only with a report-uri or
report-to endpoint first, watch what breaks for a week, then switch to
the enforcing Content-Security-Policy. Enforcing blind guarantees a
production outage.unsafe-inline. Set
script-src 'self' 'nonce-<random>' and stamp the same nonce on every
legitimate inline script per request. unsafe-inline on script-src
defeats the entire header, so treat it as not shipping CSP at all.frame-ancestors 'none'. Prefer the CSP
directive over the legacy X-Frame-Options: DENY, and set both while old
browsers linger. This is what stops clickjacking, where your page is
overlaid invisibly on an attacker's site.strict-origin-when-cross-origin. This sends
the full path same-origin, only the origin cross-origin over HTTPS, and
nothing when downgrading to HTTP, so query-string tokens and internal
paths stop leaking to external sites and analytics.X-Content-Type-Options: nosniff. This stops the browser from
MIME-sniffing a response into a script, closing the trick where an upload
served as text gets reinterpreted and executed.Permissions-Policy. Disable what the
app never uses: Permissions-Policy: camera=(), microphone=(), geolocation=(). A compromised script then cannot reach hardware you were
never going to touch.unsafe-inline or unsafe-eval on
script-src, or a written reason it must?Referer request header?Headers constrain the browser: they do nothing for non-browser clients and do not sanitize the input that caused an injection in the first place. CSP is defense in depth behind output encoding, not a replacement for it. Where a framework or edge platform injects headers, configure them in one place and verify the actual response rather than trusting the setting.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
http-headers, csp, content-security-policy, xss-prevention, clickjacking
Not loaded · from ai-skills-commands
Claude Code won't load this skill
It ships in ai-skills-commands at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
npx claudepluginhub amey-thakur/ai-skills --plugin ai-skills-commands1,000 skills in this plugin
/ab-test-designDesign product experiments with real hypotheses, honest sample-size math, guardrails, and peeking discipline. Use when validating a change by experiment or reviewing a test before believing its result./accessibility-reviewAudit a UI for real accessibility, keyboard-first, with concrete failures and fixes rather than checkbox compliance. Use when reviewing or building any user interface./accessibility-specialist-roleOperate as an accessibility specialist who audits against WCAG, trains teams to stop shipping the same defects, and owns the compliance sign-off. Use when a product needs to be usable with a keyboard, a screen reader, or magnification and someone must certify it before launch.Other plugins' skills for the same job