plugins/astro-expert/skills/astro-security/SKILL.md
Use when configuring Content Security Policy (CSP) in Astro 6, setting security headers, managing script/style hashes, using nonces, or implementing experimentalStaticHeaders for adapter deployments.
npx skillsauth add fusengine/agents astro-securityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
security.csp in astro.config.mjsexperimentalStaticHeaders for adapter-based CSP headersAstro 6 ships Content Security Policy as a stable feature (previously experimental). When enabled:
<meta http-equiv="content-security-policy"> in each page's <head>script-src and style-src directives by defaultLimitations:
dev mode — test with build + preview<ClientRouter /> view transitions (use native View Transition API)| Topic | Reference | When to Consult | |-------|-----------|-----------------| | CSP overview | csp-overview.md | Understanding CSP in Astro 6 | | Configuration | csp-config.md | All config options | | Script directive | script-directive.md | script-src configuration | | Style directive | style-directive.md | style-src configuration | | Nonces | nonces.md | Dynamic script injection | | Static headers | static-headers.md | Adapter-based CSP headers |
| Template | When to Use | |----------|-------------| | csp-basic.md | Basic CSP enable with algorithm | | csp-advanced.md | Full config with directives + static headers |
'self' explicitly — not included by default in resourcesexperimentalStaticHeaders for Vercel/Netlifydev mode (doesn't work — always use build + preview)<ClientRouter /> with CSP enabled'self' when using resources arrayunsafe-inline (defeats purpose of CSP)development
Use when optimizing entity-based / semantic SEO 2026. Covers entity maps, Google Knowledge Graph resolution, salience scoring, passage-level ranking, about/sameAs/knowsAbout schema, Cloud Natural Language API validation.
development
Use when running SEO, GEO, schema, Core Web Vitals, sitemap, hreflang, E-E-A-T, AI Overviews, technical SEO, or structured data tasks. Covers full-site audits, single-page analysis, schema markup, content quality, AI search optimization, local SEO, sitemap/robots, internal linking, semantic clustering, and search experience.
development
Use when optimizing search experience (SXO). Covers intent matching, user personas, user stories, page-type analysis, dwell time, scroll depth, pogo-sticking prevention.
development
Use when optimizing local SEO. Covers Google Business Profile, NAP consistency, citations, reviews acquisition, Local Pack ranking, location pages, LocalBusiness schema.