Skip to content
Back to skills

Ai Csp

ASecurity

Generate Content Security Policy headers from your codebase

  • 14 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 7, 2026
content-marketingbashnextjsnodegitapisecurity

Works with

  • api

Security analysis

A100/100

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill ai-csp --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai Csp?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ai Csp
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-ai-csp/badge)](https://www.skillsdirectory.com/skills/modbender-ai-csp)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: csp-gen
description: Generate Content Security Policy headers from your codebase
---

# CSP Generator

Scan your app and generate a proper Content Security Policy. Stop breaking your site with overly strict rules.

## Quick Start

```bash
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

```bash
# 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](https://github.com/lxgicstudios/ai-csp)
- Twitter: [@lxgicstudios](https://x.com/lxgicstudios)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…