csp-gen
Installation
SKILL.md
CSP Generator
Content Security Policy headers are one of the best defenses against XSS attacks. But writing them is confusing. This tool analyzes your site and generates the right CSP headers automatically. No more guessing which directives you need or accidentally blocking your own scripts.
One command. Zero config. Just works.
Quick Start
npx ai-csp https://mysite.com
What It Does
- Analyzes your site to determine which resources are loaded and from where
- Generates a complete Content-Security-Policy header string
- Handles script-src, style-src, img-src, connect-src, and all other directives
- Suggests report-uri configuration for monitoring violations
- Outputs both strict and relaxed policy options