/major-ai-skills:cloudflare-dnsfrom major-ai-skills
Manage Cloudflare DNS with correct proxy (orange/grey) mode, TTL cutovers, zone backups, and scoped API tokens—avoid mail/ACME breakage and mixed proxied-record traps.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Cloudflare DNS is authoritative for a zone. Proxied (orange cloud) A/AAAA/CNAME records send HTTP(S) through Cloudflare’s edge (anycast IPs to clients; origin hidden). DNS-only (grey cloud) returns origin addresses. Only A / AAAA / CNAME can be proxied; MX/TXT/etc. are always DNS-only. Proxied records use Auto TTL (~300s, not editable). Agents inventory/export before edits, choose proxy mode by traffic type, lower TTL ahead of grey-record migrations, and use zone-scoped API tokens—never Global API keys in automation.
┌─────────────────────────────────────────────────────────────┐
│ Cloudflare DNS resolution │
│ │
│ Registrar NS → Cloudflare authoritative zone │
│ │
│ Record types │
│ ├── A / AAAA / CNAME → Proxied (orange) → CF edge → origin │
│ ├── A / AAAA / CNAME → DNS-only (grey) → origin IP/name │
│ └── MX / TXT / CAA / NS … → always DNS-only │
│ │
│ Ops controls │
│ ├── TTL: editable when DNS-only; Auto when proxied │
│ ├── API: Bearer token (Zone DNS Edit) — not Global Key │
│ └── Mixed A/AAAA on same name: one proxied ⇒ all treated │
│ as proxied │
└─────────────────────────────────────────────────────────────┘
Use when
Do not use when
@lets-encrypt (still coordinate DNS-01 / HTTP-01 with proxy mode).CLOUDFLARE_API_TOKEN + ZONE_ID in secrets—never commit. Prefer Bearer tokens over Global API Key + email.dig against 1.1.1.1 and another resolver; confirm CAA/MX unchanged after web edits.Common record set:
| Type | Name | Content | Proxy |
|---|---|---|---|
| A | @ | origin IPv4 | Proxied (public web) |
| AAAA | @ | origin IPv6 | Match A mode |
| CNAME | www | @ or apex target | Proxied |
| TXT | @ | SPF / verification | DNS-only |
| MX | @ | mail provider | DNS-only |
| CNAME | _acme-challenge | CA validation target | DNS-only |
API (token from env—placeholder zone/IP only):
# List (backup-friendly)
curl -s -X GET "https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records?per_page=100" \
-H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \
-H "Content-Type: application/json" \
| jq '.result[] | {id,type,name,content,proxied,ttl}'
# Create DNS-only A for cutover lab (documentation IP)
curl -s -X POST "https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records" \
-H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \
-H "Content-Type: application/json" \
--data '{"type":"A","name":"api","content":"203.0.113.10","ttl":120,"proxied":false}'
Cutover sequence:
1) Export current records
2) Lower TTL on DNS-only records that will change (e.g. 120)
3) Add parallel target / validate dig + curl from multiple networks
4) Flip content or proxy mode during change window
5) Watch origin logs / synthetic checks
6) Raise TTL after soak; restore any temporary grey records carefully
Verification:
dig +short example.com @1.1.1.1
dig +short api.example.com A
dig MX example.com
dig CAA example.com
| Signature | Likely cause | Fix path |
|---|---|---|
| Mail delivery breaks after “CDN enable” | Proxied records affecting mail-related names; MX/TXT edits | Keep MX/DKIM DNS-only; restore grey where required |
| ACME / domain verification fails | Proxied CNAME flattened / challenge not reaching expected party | DNS-only for validation records; match CA docs |
| “I set one A grey but still see CF IPs” | Sibling A/AAAA on same name is proxied | Align all records on that name; understand mix rule |
| TTL change ignored | Record is proxied (Auto TTL) | Expect ~300s Auto; use DNS-only if you must control TTL |
| Origin IP exposed during onboard | Zone still pending | Wait for active zone; consider rotating origin IPs |
API Unauthorized / wrong zone | Token scope or wrong ZONE_ID | Recreate zone-scoped token; verify zone id |
| WebSockets / odd ports fail via orange | Proxy limitations / need Spectrum | Confirm plan features; Spectrum for non-HTTP |
| DNSSEC SERVFAIL after NS change | DS/DNSKEY mismatch | Follow multi-signer migration; do not half-apply |
staging. / canary. subdomains with clear proxy policy.comment) for human intent—why proxied vs grey.@lets-encrypt; origin TLS with @nginx-hardening when grey or flexible SSL is in play.@lets-encrypt — certificates when DNS-01 / HTTP-01 interacts with proxy mode@nginx-hardening — origin TLS when not fully terminated at Cloudflare@wireguard — private access when origin should not be public@gcloud-cli / @azure-cli — origin infrastructure behind the zone@vercel — often the origin/target behind CNAME recordsMANDATORY: Backup the zone before edits. Keep MX and validation records DNS-only. Treat mixed proxied/unproxied A/AAAA on the same name as all proxied. Use zone-scoped API tokens from the environment—never Global API keys in git. Verify with
digfrom multiple resolvers before declaring a cutover done.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.Other plugins' skills for the same job