cloudflare-waf-ruleslisted
Install: claude install-skill blitzhash360-web/blitzhash-cloudflare-production-skills
# Cloudflare WAF custom rules
Run commands with `npx -y github:blitzhash360-web/blitzhash-cloudflare-production-skills <command>` or, inside a clone of the repo, `node bin/cf-skills.mjs <command>`. Below, `cf-skills` means either. Zone is `--zone <domain or zone id>` or `$CLOUDFLARE_ZONE_ID`.
## Commands
- See templates: `cf-skills waf templates`
- List rules: `cf-skills waf list`
- Add from template: `cf-skills waf add --template block-sensitive-files`
- Admin area: `cf-skills waf add --template challenge-admin --path /admin`
- Countries you do not serve: `cf-skills waf add --template challenge-countries --countries XX,YY`
- Custom: `cf-skills waf add --expression "(http.request.uri.path contains \"/internal\")" --action block --description "Block /internal"`
- Delete: `cf-skills waf delete --rule-id <id from list>`
## Guidance
- Prefer `managed_challenge` over `block` when real users could match (admin pages, countries). Use `block` for paths no human should request (`/.env`, `/.git/`).
- Do not add `block-wordpress-probes` to a WordPress site.
- Rules are appended to the `http_request_firewall_custom` phase entry point ruleset (created on first use). A rule with the same description is never duplicated.
- Free plan: 5 custom rules and no regex `matches` operator. After adding, ask the user to watch Security > Events for false positives for a few days.
- Token: Zone Read + Zone WAF Edit.
## Safety rules (always)
- The API token lives only in the environment (`CLOUDFL