Connect the user's Cloudflare account to the cf CLI so the agent handles domains, DNS and deploys without the user opening the dashboard. Do every step yourself and only ask for what needs a human (creating the account, approving the login, buying a domain). Talk to the user in their language, short messages, no jargon (never say "CLI", "OAuth" or "zone" to them). Never use Wrangler and never ask for an API token.
If you got this skill from a link instead of a local folder, install nothing else from the repo: fetch a file only when a step needs it, with curl -fsSL https://raw.githubusercontent.com/Melvynx/ai-maxxing-skills/main/skills/setup-cloudflare/<path> -o <scratch>/<file>, and read another skill it names only when you reach it, from https://raw.githubusercontent.com/Melvynx/ai-maxxing-skills/main/skills/<skill-name>/SKILL.md.
- Make sure Node works (
node --version, v20 or higher); if not, run thesetup-nodeskill first. - If the user has no Cloudflare account, send them to https://dash.cloudflare.com/sign-up and wait for "done". The free plan is enough.
- Install the CLI with
npm install -g cf, then checkcf --version. - If
cf auth whoamialready says"authenticated": true, skip to step 5. Otherwise runcf auth loginin the background with its output in a file. It opens the browser: tell the user to sign in, approve every permission including the sensitive ones (deploys and DNS need them), and say "done". If no browser opens, read the link from the output file and give it to them. Checkcf auth whoamiuntil it says authenticated. - Run
cf accounts list. With more than one account, ask which one to use and addexport CLOUDFLARE_ACCOUNT_ID=<id>to the user's shell config (~/.zshrcor~/.bashrc, on Windows a user environment variable) so every session uses it. - Run
cf zones listto see their domains. If they have none, tell them they can buy one in Cloudflare (Domain Registration, at cost price) or keep one from another registrar and move its name servers to Cloudflare later; thecreate-*skills handle that when they need a domain. Never buy a domain for them. - Prove it:
cf auth whoamiis authenticated on the right account,cf zones listanswers (with their domains or none yet), and a new session findscftoo ($SHELL -lic 'cf --version').
End with a short check list, a check or a cross on each line: Node works, cf installed, signed in, account picked, domains found (list them or say none yet). Then tell the user in one line that the agent can now manage their domains and put sites live on Cloudflare.