cloudflare-domain-launch
Installation
SKILL.md
cloudflare-domain-launch
Everything below is CLI/API; the dashboard is touched exactly once (the registrant contact, §1). Auth for all API calls: Authorization: Bearer $CLOUDFLARE_API_TOKEN, base URL https://api.cloudflare.com/client/v4, account id from the dashboard URL or GET /accounts.
1. Buy the domain (Registrar API)
- Check availability + price:
POST /accounts/{account_id}/registrar/domain-checkwith{"domains": ["example.dev", ...]}— returns per-domain availability and price. - Register:
POST /accounts/{account_id}/registrar/registrationswith a minimal body:{"domain_name": "example.dev", "years": 1, "auto_renew": true}. The minimal body relies on the account's default address-book contact for the registrant — and there is no API to set that contact; it must be configured once in the dashboard before you script registrations. This is the one mandatory non-CLI step. - Registration is async. A 200 from the POST means accepted, not owned. Poll the registration status until
stateissucceededbefore wiring anything against the domain.
2. Deploy the static site (Pages via wrangler)
wrangler pages project create <name> --production-branch=release
wrangler pages deploy . --project-name=<name> --branch=release
Live immediately at <name>.pages.dev. Then attach the custom domain: