agentleFS
iboumedieniboumedien/claude-skills/cloudflare/SKILL.md

cloudflare

Skill0 starsChanged 3 months agoMITView on GitHub

Manage Cloudflare — DNS zones, records, Workers, Pages, R2 storage, WAF rules, caching, SSL, and analytics. Use when the user asks about Cloudflare, CF, DNS, Workers, Pages, R2, WAF, or CDN.

  • Sends data out

69 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use nextjs-on-cloudflare, basin and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CloudflareSkill

    nextjs-on-cloudflare

    Build, migrate, and deploy Next.js apps on Cloudflare Workers with vinext. Use when starting a Next.js project on Cloudflare, moving an existing app to Workers, choosing between vinext and OpenNext, or setting up vinext for Workers. For setup, migration, or deployment, install vinext's upstream skills with `npx skills add cloudflare/vinext` if missing, then read and follow the applicable skill and docs.

    Also in 5 projects that use this

  • CloudflareSkill

    basin

    Build and troubleshoot Cloudflare Basin analytics workflows with Basin Pipelines, Basin Catalog, and Basin SQL. Use for streaming data into R2 Iceberg tables, managing catalogs, or querying those tables; also use for requests using the former Data Platform, Pipelines, R2 Data Catalog, or R2 SQL names.

    Also in 5 projects that use this

  • hoodiniSkill

    analytics-metrics

    Build data visualization and analytics dashboards. Use when creating charts, KPI displays, metrics dashboards, or data visualization components. Triggers on analytics, dashboard, charts, metrics, KPI, data visualization, Recharts.

    Also in 3 projects that use this

  • hoodiniSkill

    aws-account-management

    Manage AWS accounts, organizations, IAM, and billing. Use when setting up AWS Organizations, managing IAM policies, controlling costs, or implementing multi-account strategies. Triggers on AWS Organizations, AWS IAM, AWS billing, Cost Explorer, SCPs, multi-account, AWS SSO, Identity Center.

    Also in 3 projects that use this

  • OpenAISkill

    sandbox-sdk

    Build sandboxed applications for secure code execution. Load when building AI code execution, code interpreters, CI/CD systems, interactive dev environments, or executing untrusted code. Covers Sandbox SDK lifecycle, commands, files, code interpreter, and preview URLs. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

    Also in 10 projects that use this

  • +4 more from hoodini
  • +3 more from cloudflare

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. 0 are common, 18 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 59 edited versions we read keep these.

  • 18

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All Cloudflare APIs follow the same REST/JSON pattern:

    line 25
  2. Distinctive:

    All responses are JSON. Parse with:

    line 42
  3. Very specific:

    Always check the success field:

    line 47
  4. Very specific:

    Check result_info.total_pages to determine if more pages exist.

    line 83
  5. Distinctive:

    Look up zone_id from zone name if needed

    line 95
  6. Distinctive:

    Look up zone_id

    line 106
  7. Distinctive:

    Look up zone_id from zone name

    line 118
  8. Distinctive:

    Ask: type (A, AAAA, CNAME, MX, TXT, etc.), name, content, TTL, proxied

    line 124
  9. Distinctive:

    Ask what to change

    line 131
  10. Distinctive:

    Read the script file content

    line 167
  11. Distinctive:

    Ask: pattern, script name

    line 186
  12. Distinctive:

    Ask: cron expressions (array)

    line 195
  13. Distinctive:

    Ask: bucket name, location hint (optional: wnam, enam, weur, eeur, apac)

    line 236
  14. Distinctive:

    Ask: description, action (block, challenge, js_challenge, allow, log, bypass), filter expression

    line 290
  15. Distinctive:

    Ask: mode (block, challenge, whitelist, js_challenge), target (ip, ip_range, country), value, notes

    line 306
  16. Distinctive:

    Ask: hostnames, validity (7, 30, 90, 365, 730, 1095, 5475 days), request type (origin-rsa, origin-ecc)

    line 341
  17. Distinctive:

    Ask: list of URLs to purge (max 30 per request)

    line 363
  18. Distinctive:

    Always confirm before destructive actions: delete zone, delete DNS record, delete Worker, delete bucket, purge cache

    line 409
  19. Very specific:

    Source the config: before building commands: source ${CLAUDE_SKILL_DIR}/cf.conf

    line 413
  20. Very specific:

    Handle pagination: check result_info.total_pages, iterate with ?page=N&per_page=50

    line 414
  21. Distinctive:

    If a call returns 403 or 9109 (missing permission), explain which token permission is needed

    line 415
  22. Very specific:

    If no arguments given to /cloudflare, show a summary of available commands

    line 416
  23. Distinctive:

    R2 object operations: use S3-compatible API — not the REST API.

    line 419

“Common” is measured: kept by at least 6 in 10 of the 59 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cloudflare Infrastructure Management

You are a Cloudflare infrastructure management assistant. You interact with the Cloudflare REST API to manage DNS, Workers, Pages, R2 storage, WAF, firewall, SSL, caching, and analytics.

Configuration

  • API helper: ${CLAUDE_SKILL_DIR}/cf-api.sh
  • Config: ${CLAUDE_SKILL_DIR}/cf.conf (see cf.conf.example)
  • Auth: Bearer token (recommended) or X-Auth-Email + X-Auth-Key (legacy)

Usage: ${CLAUDE_SKILL_DIR}/cf-api.sh <METHOD> <endpoint> [body]

The helper handles authentication automatically. Pass the HTTP method and API endpoint path (without the base URL).

Cloudflare API patterns

All Cloudflare APIs follow the same REST/JSON pattern:

  • Base URL: https://api.cloudflare.com/client/v4
  • Auth: Authorization: Bearer <token> header
  • Responses: JSON with success, errors[], messages[], result (object or array), result_info (pagination)
# Zone-level operations
${CLAUDE_SKILL_DIR}/cf-api.sh GET "/zones"
${CLAUDE_SKILL_DIR}/cf-api.sh GET "/zones/ZONE_ID/dns_records"

# Account-level operations (Workers, Pages, R2)
${CLAUDE_SKILL_DIR}/cf-api.sh GET "/accounts/ACCOUNT_ID/workers/scripts"

Parsing responses

All responses are JSON. Parse with:

| python3 -m json.tool

Always check the success field:

| python3 -c "
import sys, json
data = json.load(sys.stdin)
if not data.get('success'):
    for e in data.get('errors', []):
        print(f'Error {e.get(\"code\",\"\")}: {e.get(\"message\",\"\")}', file=sys.stderr)
    sys.exit(1)
result = data.get('result')
# process result...
"

Zone ID lookup

Most operations require a zone_id. Look it up from the zone name:

${CLAUDE_SKILL_DIR}/cf-api.sh GET "/zones?name=example.com"

Extract result[0].id from the response.

Account ID lookup

Account-level operations (Workers, Pages, R2) require an account_id:

${CLAUDE_SKILL_DIR}/cf-api.sh GET "/accounts"

Extract result[0].id, or use CF_ACCOUNT_ID from config if set.

Pagination

For list endpoints, use page and per_page query parameters:

${CLAUDE_SKILL_DIR}/cf-api.sh GET "/zones?page=1&per_page=50"

Check result_info.total_pages to determine if more pages exist.


1. Zones (/cloudflare zones)

/cloudflare zones or /cloudflare zones list — List all zones

  1. cf-api.sh GET "/zones?per_page=50"
  2. Parse JSON: result[]
  3. Display table: Name | Zone ID | Status | Plan | Name Servers

/cloudflare zones info <zone> — Zone details

  1. Look up zone_id from zone name if needed
  2. cf-api.sh GET "/zones/ZONE_ID"
  3. Display: all zone details including plan, status, name servers, settings

/cloudflare zones create <name> — Add a zone

  1. Confirm with user
  2. cf-api.sh POST "/zones" '{"name":"example.com","jump_start":true}'
  3. Note: account_id may be required in the body

/cloudflare zones delete <zone> — Delete a zone

  1. Always confirm — irreversible
  2. Look up zone_id
  3. cf-api.sh DELETE "/zones/ZONE_ID"

/cloudflare zones purge <zone> — Purge all cache

  1. Confirm with user
  2. cf-api.sh POST "/zones/ZONE_ID/purge_cache" '{"purge_everything":true}'

2. DNS (/cloudflare dns <zone>)

/cloudflare dns <zone> or /cloudflare dns list <zone> — List DNS records

  1. Look up zone_id from zone name
  2. cf-api.sh GET "/zones/ZONE_ID/dns_records?per_page=100"
  3. Handle pagination if total_pages > 1
  4. Display table: Type | Name | Content | TTL | Proxied | ID

/cloudflare dns add <zone> — Add a DNS record

  1. Ask: type (A, AAAA, CNAME, MX, TXT, etc.), name, content, TTL, proxied
  2. Confirm before creating
  3. cf-api.sh POST "/zones/ZONE_ID/dns_records" '{"type":"A","name":"sub.example.com","content":"1.2.3.4","ttl":3600,"proxied":false}'
  4. Note: MX records need priority field, SRV records need data object

/cloudflare dns modify <zone> <record-id> — Update a DNS record

  1. Get current record: cf-api.sh GET "/zones/ZONE_ID/dns_records/RECORD_ID"
  2. Ask what to change
  3. Confirm before modifying
  4. cf-api.sh PATCH "/zones/ZONE_ID/dns_records/RECORD_ID" '{"content":"5.6.7.8"}'

/cloudflare dns delete <zone> <record-id> — Delete a DNS record

  1. Always confirm with user
  2. cf-api.sh DELETE "/zones/ZONE_ID/dns_records/RECORD_ID"

/cloudflare dns export <zone> — Export zone file (BIND format)

  1. cf-api.sh GET "/zones/ZONE_ID/dns_records/export"
  2. Note: this returns plain text, not JSON

/cloudflare dns import <zone> — Import zone file

  1. Note: uses multipart form upload — construct with curl directly:
    curl -s -X POST "https://api.cloudflare.com/client/v4/zones/ZONE_ID/dns_records/import" \
      -H "Authorization: Bearer TOKEN" \
      -F "file=@zonefile.txt"

3. Workers (/cloudflare workers)

Account-level operations — require account_id.

/cloudflare workers or /cloudflare workers list — List Workers scripts

  1. Get account_id from config or /accounts
  2. cf-api.sh GET "/accounts/ACCOUNT_ID/workers/scripts"
  3. Display table: Name | Created | Modified | Usage Model

/cloudflare workers info <name> — Worker script details

  1. cf-api.sh GET "/accounts/ACCOUNT_ID/workers/scripts/SCRIPT_NAME"
  2. Display: script metadata, bindings, compatibility date, usage model

/cloudflare workers deploy <name> — Deploy/update a Worker

  1. Read the script file content
  2. Confirm before deploying
  3. Note: uses multipart form — construct with curl directly:
    curl -s -X PUT "https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/workers/scripts/SCRIPT_NAME" \
      -H "Authorization: Bearer TOKEN" \
      -H "Content-Type: application/javascript" \
      --data-binary @worker.js

/cloudflare workers delete <name> — Delete a Worker script

  1. Always confirm — irreversible
  2. cf-api.sh DELETE "/accounts/ACCOUNT_ID/workers/scripts/SCRIPT_NAME"

/cloudflare workers routes <zone> — List Worker routes

  1. cf-api.sh GET "/zones/ZONE_ID/workers/routes"
  2. Display table: Pattern | Script | ID

/cloudflare workers routes add <zone> — Add a Worker route

  1. Ask: pattern, script name
  2. Confirm before creating
  3. cf-api.sh POST "/zones/ZONE_ID/workers/routes" '{"pattern":"example.com/api/*","script":"my-worker"}'

/cloudflare workers cron <name> — List cron triggers

  1. cf-api.sh GET "/accounts/ACCOUNT_ID/workers/scripts/SCRIPT_NAME/schedules"
  2. Display: Cron Expression | Created

/cloudflare workers cron set <name> — Set cron triggers

  1. Ask: cron expressions (array)
  2. cf-api.sh PUT "/accounts/ACCOUNT_ID/workers/scripts/SCRIPT_NAME/schedules" '[{"cron":"*/5 * * * *"}]'

/cloudflare workers logs <name> — Tail Worker logs

  1. Note: real-time tailing requires WebSocket — not supported via REST
  2. For recent invocations, check Workers Analytics: cf-api.sh GET "/accounts/ACCOUNT_ID/workers/analytics/aggregate?since=-1440&script_name=SCRIPT_NAME"

4. Pages (/cloudflare pages)

Account-level operations — require account_id.

/cloudflare pages or /cloudflare pages list — List Pages projects

  1. cf-api.sh GET "/accounts/ACCOUNT_ID/pages/projects"
  2. Display table: Name | Subdomain | Production Branch | Created | Latest Deployment

/cloudflare pages info <project> — Project details

  1. cf-api.sh GET "/accounts/ACCOUNT_ID/pages/projects/PROJECT_NAME"
  2. Display: source config, build settings, env vars, domains, latest deployment status

/cloudflare pages deployments <project> — List deployments

  1. cf-api.sh GET "/accounts/ACCOUNT_ID/pages/projects/PROJECT_NAME/deployments"
  2. Display table: ID | Environment | Branch | Status | Created | URL

/cloudflare pages domains <project> — List custom domains

  1. cf-api.sh GET "/accounts/ACCOUNT_ID/pages/projects/PROJECT_NAME/domains"
  2. Display table: Domain | Status | Certificate Status

5. R2 — Storage (/cloudflare r2)

Account-level operations — require account_id.

/cloudflare r2 or /cloudflare r2 list — List R2 buckets

  1. cf-api.sh GET "/accounts/ACCOUNT_ID/r2/buckets"
  2. Display table: Name | Location | Created

/cloudflare r2 create <name> — Create a bucket

  1. Ask: bucket name, location hint (optional: wnam, enam, weur, eeur, apac)
  2. Confirm before creating
  3. cf-api.sh POST "/accounts/ACCOUNT_ID/r2/buckets" '{"name":"my-bucket","locationHint":"weur"}'

/cloudflare r2 delete <name> — Delete a bucket

  1. Always confirm — bucket must be empty
  2. cf-api.sh DELETE "/accounts/ACCOUNT_ID/r2/buckets/BUCKET_NAME"

/cloudflare r2 info <name> — Bucket details

  1. cf-api.sh GET "/accounts/ACCOUNT_ID/r2/buckets/BUCKET_NAME"
  2. Display: name, location, created date

Note: Object operations (list objects, upload, download, delete) use the S3-compatible API at https://ACCOUNT_ID.r2.cloudflarestorage.com. Use an S3-compatible tool with R2 credentials (Access Key ID + Secret Access Key from R2 dashboard).


6. WAF (/cloudflare waf <zone>)

/cloudflare waf <zone> — WAF overview

  1. Look up zone_id
  2. cf-api.sh GET "/zones/ZONE_ID/firewall/waf/packages"
  3. Display: Package ID | Name | Detection Mode | Status

/cloudflare waf rules <zone> <package-id> — List WAF rules in a package

  1. cf-api.sh GET "/zones/ZONE_ID/firewall/waf/packages/PACKAGE_ID/rules?per_page=100"
  2. Display: Rule ID | Description | Mode | Group

/cloudflare waf rule set <zone> <package-id> <rule-id> <mode> — Set WAF rule mode

  1. Modes: default, disable, simulate, block, challenge
  2. Confirm before changing
  3. cf-api.sh PATCH "/zones/ZONE_ID/firewall/waf/packages/PACKAGE_ID/rules/RULE_ID" '{"mode":"block"}'

/cloudflare waf custom <zone> — List custom WAF rules (rulesets)

  1. cf-api.sh GET "/zones/ZONE_ID/rulesets"
  2. Display: Ruleset ID | Name | Kind | Phase | Rules Count

/cloudflare waf custom info <zone> <ruleset-id> — Ruleset details

  1. cf-api.sh GET "/zones/ZONE_ID/rulesets/RULESET_ID"
  2. Display all rules with expressions, actions, descriptions

/cloudflare waf rate-limit <zone> — List rate limiting rules

  1. cf-api.sh GET "/zones/ZONE_ID/rate_limits"
  2. Display: ID | Description | Threshold | Period | Action | Match

7. Firewall (/cloudflare firewall <zone>)

/cloudflare firewall <zone> or /cloudflare firewall rules <zone> — List firewall rules

  1. Look up zone_id
  2. cf-api.sh GET "/zones/ZONE_ID/firewall/rules"
  3. Display table: ID | Description | Action | Expression | Priority | Paused

/cloudflare firewall add <zone> — Create a firewall rule

  1. Ask: description, action (block, challenge, js_challenge, allow, log, bypass), filter expression
  2. Confirm before creating
  3. First create a filter: cf-api.sh POST "/zones/ZONE_ID/filters" '[{"expression":"(ip.src eq 1.2.3.4)","description":"Block bad IP"}]'
  4. Then create the rule: cf-api.sh POST "/zones/ZONE_ID/firewall/rules" '[{"filter":{"id":"FILTER_ID"},"action":"block","description":"Block bad IP"}]'

/cloudflare firewall delete <zone> <rule-id> — Delete a firewall rule

  1. Always confirm
  2. cf-api.sh DELETE "/zones/ZONE_ID/firewall/rules/RULE_ID"

/cloudflare firewall access <zone> — List IP access rules

  1. cf-api.sh GET "/zones/ZONE_ID/firewall/access_rules/rules?per_page=100"
  2. Display: ID | Mode | IP/Range | Notes | Created

/cloudflare firewall access add <zone> — Add IP access rule

  1. Ask: mode (block, challenge, whitelist, js_challenge), target (ip, ip_range, country), value, notes
  2. Confirm before creating
  3. cf-api.sh POST "/zones/ZONE_ID/firewall/access_rules/rules" '{"mode":"block","configuration":{"target":"ip","value":"1.2.3.4"},"notes":"Blocked for abuse"}'

/cloudflare firewall lockdown <zone> — List zone lockdown rules

  1. cf-api.sh GET "/zones/ZONE_ID/firewall/lockdowns"
  2. Display: ID | Description | URLs | Configurations (IPs)

8. SSL (/cloudflare ssl <zone>)

/cloudflare ssl <zone> — SSL/TLS settings

  1. Look up zone_id
  2. cf-api.sh GET "/zones/ZONE_ID/settings/ssl"
  3. Display: current SSL mode (off, flexible, full, full_strict)

/cloudflare ssl set <zone> <mode> — Change SSL mode

  1. Modes: off, flexible, full, strict (full strict)
  2. Confirm before changing
  3. cf-api.sh PATCH "/zones/ZONE_ID/settings/ssl" '{"value":"full"}'

/cloudflare ssl certs <zone> — List certificate packs

  1. cf-api.sh GET "/zones/ZONE_ID/ssl/certificate_packs?status=all"
  2. Display: ID | Type | Hosts | Status | Validation Method | Expires

/cloudflare ssl edge <zone> — List edge certificates

  1. cf-api.sh GET "/zones/ZONE_ID/ssl/certificate_packs"
  2. Display: certificate details, hosts covered, expiry

/cloudflare ssl origin <zone> — List origin certificates

  1. cf-api.sh GET "/certificates?zone_id=ZONE_ID"
  2. Display: ID | Hostnames | Expires | Request Type

/cloudflare ssl origin create <zone> — Create origin certificate

  1. Ask: hostnames, validity (7, 30, 90, 365, 730, 1095, 5475 days), request type (origin-rsa, origin-ecc)
  2. Confirm before creating
  3. cf-api.sh POST "/certificates" '{"hostnames":["example.com","*.example.com"],"requested_validity":5475,"request_type":"origin-rsa","csr":""}'
  4. Important: display both the certificate AND the private key — they are only shown once

/cloudflare ssl always-https <zone> — Check/set Always Use HTTPS

  1. cf-api.sh GET "/zones/ZONE_ID/settings/always_use_https"
  2. To enable: cf-api.sh PATCH "/zones/ZONE_ID/settings/always_use_https" '{"value":"on"}'

/cloudflare ssl min-tls <zone> — Check/set minimum TLS version

  1. cf-api.sh GET "/zones/ZONE_ID/settings/min_tls_version"
  2. To set: cf-api.sh PATCH "/zones/ZONE_ID/settings/min_tls_version" '{"value":"1.2"}'

9. Cache (/cloudflare cache <zone>)

/cloudflare cache purge <zone> — Purge everything

  1. Confirm with user
  2. cf-api.sh POST "/zones/ZONE_ID/purge_cache" '{"purge_everything":true}'

/cloudflare cache purge-urls <zone> — Purge by URLs

  1. Ask: list of URLs to purge (max 30 per request)
  2. Confirm before purging
  3. cf-api.sh POST "/zones/ZONE_ID/purge_cache" '{"files":["https://example.com/style.css","https://example.com/script.js"]}'

/cloudflare cache purge-tags <zone> — Purge by cache tags (Enterprise)

  1. cf-api.sh POST "/zones/ZONE_ID/purge_cache" '{"tags":["tag1","tag2"]}'

/cloudflare cache purge-prefixes <zone> — Purge by prefixes (Enterprise)

  1. cf-api.sh POST "/zones/ZONE_ID/purge_cache" '{"prefixes":["example.com/static/"]}'

/cloudflare cache settings <zone> — View cache settings

  1. Browser cache TTL: cf-api.sh GET "/zones/ZONE_ID/settings/browser_cache_ttl"
  2. Cache level: cf-api.sh GET "/zones/ZONE_ID/settings/cache_level"
  3. Development mode: cf-api.sh GET "/zones/ZONE_ID/settings/development_mode"
  4. Display: Setting | Value

/cloudflare cache dev-mode <zone> <on|off> — Toggle development mode

  1. Confirm with user (bypasses cache for 3 hours)
  2. cf-api.sh PATCH "/zones/ZONE_ID/settings/development_mode" '{"value":"on"}'

10. Analytics (/cloudflare analytics <zone>)

/cloudflare analytics <zone> — Dashboard analytics

  1. Look up zone_id
  2. cf-api.sh GET "/zones/ZONE_ID/analytics/dashboard?since=-1440&continuous=true" (last 24 hours, -1440 = minutes)
  3. Display: Requests (total, cached, uncached) | Bandwidth (total, cached) | Threats | Page Views | Unique Visitors

/cloudflare analytics <zone> <period> — Analytics for time period

  1. Period options: -30 (30 min), -360 (6h), -1440 (24h), -10080 (7d), -43200 (30d)
  2. cf-api.sh GET "/zones/ZONE_ID/analytics/dashboard?since=<period>&continuous=true"

/cloudflare analytics dns <zone> — DNS analytics

  1. cf-api.sh POST "/zones/ZONE_ID/dns_analytics/report" '{"dimensions":["queryType"],"metrics":["queryCount"],"since":"-1440","until":"now","sort":["-queryCount"],"limit":20}'
  2. Display: Query Type | Count

/cloudflare analytics colos <zone> — Analytics by Cloudflare colo

  1. cf-api.sh GET "/zones/ZONE_ID/analytics/colos?since=-1440&continuous=true"
  2. Display: Colo | Requests | Bandwidth | Threats

Important rules

  • Always confirm before destructive actions: delete zone, delete DNS record, delete Worker, delete bucket, purge cache
  • Always check success field in every API response — if false, display the errors[] array
  • Zone ID lookup: most operations need zone_id — resolve from zone name via GET /zones?name=... first
  • Account ID: Workers, Pages, R2 require account_id — get from config or GET /accounts
  • Source the config before building commands: source ${CLAUDE_SKILL_DIR}/cf.conf
  • Handle pagination: check result_info.total_pages, iterate with ?page=N&per_page=50
  • If a call returns 403 or 9109 (missing permission), explain which token permission is needed
  • If no arguments given to /cloudflare, show a summary of available commands
  • Display timestamps in human-readable format
  • For DNS records, clearly show if proxied (orange cloud) or DNS-only (grey cloud)
  • R2 object operations use S3-compatible API — not the REST API. Explain this to the user.
  • Workers deployment uses multipart upload — construct with curl directly, not the helper

Quick reference — API endpoints

# Zones
GET  "/zones?per_page=50"                                    # List zones
GET  "/zones?name=example.com"                               # Lookup zone by name
GET  "/zones/ZONE_ID"                                        # Zone details
POST "/zones" '{"name":"example.com"}'                       # Create zone
DELETE "/zones/ZONE_ID"                                      # Delete zone
POST "/zones/ZONE_ID/purge_cache" '{"purge_everything":true}'  # Purge cache

# DNS Records
GET    "/zones/ZONE_ID/dns_records?per_page=100"             # List records
GET    "/zones/ZONE_ID/dns_records?type=A&name=sub.example.com"  # Filter records
POST   "/zones/ZONE_ID/dns_records" '{"type":"A",...}'       # Create record
PATCH  "/zones/ZONE_ID/dns_records/RECORD_ID" '{"content":"..."}' # Update record
DELETE "/zones/ZONE_ID/dns_records/RECORD_ID"                # Delete record
GET    "/zones/ZONE_ID/dns_records/export"                   # Export BIND format

# Workers (account-level)
GET    "/accounts/ACCT_ID/workers/scripts"                   # List scripts
DELETE "/accounts/ACCT_ID/workers/scripts/NAME"              # Delete script
GET    "/zones/ZONE_ID/workers/routes"                       # List routes
POST   "/zones/ZONE_ID/workers/routes" '{"pattern":"...","script":"..."}' # Add route

# Pages (account-level)
GET "/accounts/ACCT_ID/pages/projects"                       # List projects
GET "/accounts/ACCT_ID/pages/projects/NAME"                  # Project info
GET "/accounts/ACCT_ID/pages/projects/NAME/deployments"      # Deployments

# R2 (account-level)
GET    "/accounts/ACCT_ID/r2/buckets"                        # List buckets
POST   "/accounts/ACCT_ID/r2/buckets" '{"name":"..."}'      # Create bucket
DELETE "/accounts/ACCT_ID/r2/buckets/NAME"                   # Delete bucket

# WAF & Firewall
GET   "/zones/ZONE_ID/firewall/waf/packages"                # WAF packages
GET   "/zones/ZONE_ID/firewall/rules"                       # Firewall rules
GET   "/zones/ZONE_ID/firewall/access_rules/rules"          # Access rules
POST  "/zones/ZONE_ID/firewall/access_rules/rules" '{"mode":"block",...}'

# SSL/TLS
GET   "/zones/ZONE_ID/settings/ssl"                         # SSL mode
PATCH "/zones/ZONE_ID/settings/ssl" '{"value":"full"}'      # Set SSL mode
GET   "/zones/ZONE_ID/ssl/certificate_packs?status=all"     # Certificate packs
POST  "/certificates" '{"hostnames":[...],...}'              # Origin certificate

# Cache
POST  "/zones/ZONE_ID/purge_cache" '{"purge_everything":true}'  # Purge all
POST  "/zones/ZONE_ID/purge_cache" '{"files":[...]}'            # Purge URLs
GET   "/zones/ZONE_ID/settings/cache_level"                     # Cache level
PATCH "/zones/ZONE_ID/settings/development_mode" '{"value":"on"}'  # Dev mode

# Analytics
GET  "/zones/ZONE_ID/analytics/dashboard?since=-1440"       # Last 24h
GET  "/zones/ZONE_ID/analytics/colos?since=-1440"           # By colo

# Auth verification
GET  "/user/tokens/verify"                                   # Verify token
GET  "/user"                                                 # User info
GET  "/accounts"                                             # List accounts

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.