cloudflaresolid
Install: claude install-skill intentic/intentic
# Cloudflare (connected)
Token in `$CLOUDFLARE_API_TOKEN`; `$CLOUDFLARE_ACCOUNT_ID` may be set too (when empty, list accounts below).
Base is `https://api.cloudflare.com/client/v4`. Define this helper once per shell:
`cf <METHOD> <path> [-d '<json>']`:
```sh
cf() { local m="$1" p="$2"; shift 2; curl -s -X "$m" -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-H "Content-Type: application/json" "https://api.cloudflare.com/client/v4/$p" "$@"; }
```
Every response is an envelope `{success, errors, result, result_info}`: check `.success` and on `false` read
`.errors[] | {code, message}` instead of assuming the shape of `.result`. The token is scoped: an empty list or
a 403 often means the permission or zone was never granted, so say which grant is missing rather than "it's not
there". **DNS edits and cache purges change live traffic: say what you are about to do first, then report.**
- Token ok?: `cf GET user/tokens/verify | jq '.result.status'`
- Accounts: `cf GET accounts | jq -c '.result[] | {id, name}'`
- Zones (domains): `cf GET "zones?per_page=50" | jq -c '.result[] | {id, name, status, paused}'`
- A zone id by name: `cf GET "zones?name=example.com" | jq -r '.result[0].id'`
- DNS records: `cf GET "zones/<ZONE_ID>/dns_records?per_page=100" | jq -c '.result[] | {id, type, name, content, proxied, ttl}'`
- Create a record: `cf POST zones/<ZONE_ID>/dns_records -d '{"type":"A","name":"app.example.com","content":"203.0.113.7","proxied":true,"ttl":1}'`, `ttl: 1` means autom