csp-gen
Generate Content Security Policy headers from your codebase
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/lxgicstudios/ai-cspCSP Generator
Scan your app and generate a proper Content Security Policy. Stop breaking your site with overly strict rules.
Quick Start
npx ai-csp ./src
What It Does
- Scans for external resources (scripts, styles, images)
- Identifies inline scripts that need hashes
- Generates a working CSP header
- Explains each directive
Usage Examples
# Scan and generate CSP
npx ai-csp ./public ./src
# Generate for specific strictness
npx ai-csp ./src --strict
# Output as meta tag
npx ai-csp ./src --format meta
Output Formats
- HTTP header format
- HTML meta tag
- Next.js config
- Nginx config snippet
Requirements
Node.js 18+. OPENAI_API_KEY required.
License
MIT. Free forever.
Built by LXGIC Studios
- GitHub: github.com/lxgicstudios/ai-csp
- Twitter: @lxgicstudios
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-lxgicstudios-ai-csp": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
script-gen
Generate package.json scripts with AI. Use when setting up npm scripts.
email-template-gen
Generate responsive email templates. Use when building transactional emails.
branch-namer
Generate descriptive git branch names from plain English. Use when you need a branch name that follows conventions.
cloudflare-gen
Generate Cloudflare Workers configuration and code. Use when building on the edge.
adr-writer
Generate Architecture Decision Records with AI. Use when documenting technical decisions.