Cloudflare API (Direct REST)
Generates curl/script workflows that hit the Cloudflare REST API directly for bulk, fleet-wide and wrangler-unsupported operations.
What it does
This skill teaches Claude to call the Cloudflare REST API (api.cloudflare.com/client/v4) directly with curl + jq or generated scripts, for the cases where wrangler CLI or MCP servers are the wrong tool — bulk operations, fleet-wide changes, and features wrangler doesn't expose.
- Decision table: wrangler vs MCP vs direct API for each use case
- Auth setup: scoped API tokens, token verification, zone/account ID lookup
- Bulk DNS: create from CSV, export to CSV, find-and-replace an IP across records
- Custom hostnames for white-label SaaS domains; Email Routing rules and catch-all
- Cache purge (everything / URLs / tags / prefixes); bulk redirect rules generated from CSV via Python
- WAF custom rules, rate-limiting rules, Worker route management, GraphQL analytics queries
- Fleet-wide zone settings loops, plus a rate-limit table (1200 req / 5 min) and
sleep 0.25guidance - Separate reference file for D1, R2, KV, Vectorize and Queues patterns
Generated scripts are required to read the token from the environment, handle pagination, check .success, log actions, and support --dry-run where possible.
Who it's for
- Agencies and freelancers managing many client zones
- Developers doing domain migrations, IP changes, or hundreds of 301 redirects
- SaaS teams onboarding customer-owned domains via custom hostnames
- Infra engineers auditing or standardizing settings across a whole Cloudflare account
Examples
- Server migration: "Find every DNS record pointing at 203.0.113.1 and repoint it to 198.51.100.1" → produces a query + PATCH loop script.
- White-label onboarding: "Create a custom hostname for app.client.com with DV SSL and poll its certificate status."
- Fleet hardening: "Set SSL to full strict, min TLS 1.2 and always_use_https on all active zones" → rate-limit-aware fleet script.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/jezweb/claude-skills/HEAD/plugins/cloudflare/skills/cloudflare-api/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the plugins/cloudflare/skills/cloudflare-api folder from the GitHub repo jezweb/claude-skills into my ~/.claude/skills/cloudflare-api/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/jezweb/claude-skills.git && mkdir -p ~/.claude/skills && cp -r claude-skills/plugins/cloudflare/skills/cloudflare-api ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and cd into a folder where you keep source code.
- Clone the repo:
git clone https://github.com/jezweb/claude-skills.git - Make sure the skills folder exists:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r claude-skills/plugins/cloudflare/skills/cloudflare-api ~/.claude/skills/ - Verify the
references/subfolder came along (it holds the D1/R2/KV API patterns). - In the Cloudflare dashboard go to My Profile → API Tokens, create a token with least-privilege scopes, then run
export CLOUDFLARE_API_TOKEN="...". - Install
jqif needed (macOS:brew install jq, Ubuntu:sudo apt install jq). - Restart Claude Code and try a prompt like "use the cloudflare api to export all DNS records for example.com".