Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
alphaonedev avatar

Cloudflare

  • 35 installs
  • 6 repo stars
  • Updated March 13, 2026
  • alphaonedev/openclaw-graph

cloudflare is an OpenClaw skill that provides programmatic access to the Cloudflare API for managing DNS, zones, Pages, Access, Workers, and R2.

About

cloudflare is an OpenClaw skill for managing Cloudflare infrastructure through its API. It handles DNS records, zones, Pages sites, Access policies, Workers scripts, and R2 object storage. Developers use it to automate infrastructure tasks such as updating DNS during deployments, deploying edge Workers, or managing storage in CI/CD pipelines.

  • Programmatic access to the Cloudflare API: DNS, Zones, Pages, Access, Workers, R2
  • Automates DNS updates, zone management, and Workers/Pages deployment
  • Uses Wrangler CLI and REST endpoints with Bearer-token auth

Cloudflare by the numbers

  • 35 all-time installs (skills.sh)
  • Ranked #774 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
  • Data as of Jul 7, 2026 (Skillselion catalog sync)
At a glance

cloudflare capabilities & compatibility

Requires CLOUDFLARE_API_TOKEN environment variable

Capabilities
dns management · edge deploy · object storage
Works with
cloudflare
Use cases
devops · ci cd
Pricing
Bring your own API key
From the docs

What cloudflare says it does

This skill provides programmatic access to Cloudflare's API for managing DNS records, zones, Pages sites, Access policies, Workers scripts, and R2 storage.
SKILL.md
Use this skill for automating infrastructure tasks like updating DNS records during deployments, securing applications with Access, deploying static sites via Pages
SKILL.md
npx skills add https://github.com/alphaonedev/openclaw-graph --skill cloudflare

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs35
repo stars6
Last updatedMarch 13, 2026
Repositoryalphaonedev/openclaw-graph

What it does

Automate Cloudflare DNS, Workers, Pages, and R2 operations through the Cloudflare API and Wrangler CLI.

Who is it for?

Developers automating Cloudflare infrastructure in scripts and CI/CD

When should I use this skill?

Updating DNS during deployments, deploying Workers or Pages, or managing R2 storage

By the numbers

  • Covers 6 Cloudflare products: DNS, Zones, Pages, Access, Workers, R2

Files

SKILL.mdMarkdownGitHub ↗

cloudflare

Purpose

This skill provides programmatic access to Cloudflare's API for managing DNS records, zones, Pages sites, Access policies, Workers scripts, and R2 storage. It uses the specified account ID (YOUR_CLOUDFLARE_ACCOUNT_ID) to perform operations securely.

When to Use

Use this skill for automating infrastructure tasks like updating DNS records during deployments, securing applications with Access, deploying static sites via Pages, running edge compute with Workers, managing object storage in R2, or creating/deleting zones. Apply it in scripts, CI/CD pipelines, or when integrating Cloudflare with other services.

Key Capabilities

  • DNS: Manage records (A, CNAME, TXT) within zones.
  • Zones: Create, list, update, or delete zones using the account ID.
  • Pages: Deploy and manage static sites with custom domains.
  • Access: Enforce policies for authentication and authorization.
  • Workers: Script edge logic for requests and responses.
  • R2: Handle object storage operations like uploads and deletions.

Authentication requires an API token set as $CLOUDFLARE_API_TOKEN; include the account ID in API requests.

Usage Patterns

Always authenticate requests with $CLOUDFLARE_API_TOKEN. Use HTTP headers for API calls (e.g., Authorization: Bearer $CLOUDFLARE_API_TOKEN). For CLI, install Wrangler and log in with wrangler login. Structure requests with JSON payloads and handle responses via status codes. Prefix API endpoints with https://api.cloudflare.com/client/v4 and include the account ID in paths, like /accounts/YOUR_CLOUDFLARE_ACCOUNT_ID/zones.

Common Commands/API

  • DNS Update: Use PUT to /zones/{zone_id}/dns_records/{record_id} with JSON body like {"type":"A","name":"example.com","content":"192.0.2.1","ttl":3600}.
  • Zone Creation: POST to /zones with body {"name":"example.com","account":{"id":"YOUR_CLOUDFLARE_ACCOUNT_ID"}}.
  • Pages Deployment: Use Wrangler CLI: wrangler pages deploy ./build --project-name=my-site.
  • Access Policy: POST to /access/policies with body {"name":"Block IP","precedence":1,"decision":"deny","request":{"ip":"1.1.1.1"}}.
  • Workers Script: Upload via PUT to /accounts/YOUR_CLOUDFLARE_ACCOUNT_ID/workers/scripts/my-worker with script content.
  • R2 Object Upload: PUT to /accounts/YOUR_CLOUDFLARE_ACCOUNT_ID/r2/buckets/my-bucket/objects/my-file with file data.

Code snippet for DNS update:

curl -X PUT "https://api.cloudflare.com/client/v4/zones/zone_id/dns_records/record_id" \
  -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"type":"A","name":"example.com","content":"192.0.2.1"}'

Config format: Store API token in .env as CLOUDFLARE_API_TOKEN=your_token, and load it in scripts.

Integration Notes

Integrate by exporting $CLOUDFLARE_API_TOKEN in your environment. For Node.js, use the @cloudflare/workers SDK: install via npm i @cloudflare/workers, then import and initialize with the token. In Python, use cloudflare library: pip install cloudflare, and authenticate with Cloudflare(api_token=os.environ['CLOUDFLARE_API_TOKEN']). Always validate responses for the account ID to avoid cross-account errors. For Wrangler, run wrangler whoami to verify login before commands.

Error Handling

Check HTTP status codes: 200-299 for success, 4xx for client errors (e.g., 401 Unauthorized if token is invalid), and 5xx for server issues. For API errors, parse the JSON response body for "errors" array, e.g., {"errors":[{"code":1000,"message":"Bad request"}]}. Retry transient errors (e.g., 429 Rate Limit) with exponential backoff. In scripts, wrap calls in try-catch blocks:

try {
  const response = await fetch('https://api.cloudflare.com/client/v4/...', { headers: { Authorization: `Bearer ${process.env.CLOUDFLARE_API_TOKEN}` } });
  if (!response.ok) throw new Error(`HTTP error: ${response.status}`);
} catch (error) {
  console.error('API call failed:', error.message);
}

Log detailed error messages including the endpoint and parameters for debugging.

Concrete Usage Examples

1. Update a DNS A record for a domain: First, get the zone ID via GET /zones?name=example.com. Then, use the record ID to update: PUT /zones/zone_id/dns_records/record_id with body {"content":"new_ip_address"}. This ensures the domain points to the latest server IP. 2. Deploy a Workers script: Write your script in worker.js, then run wrangler publish --name my-worker. For API integration, upload via PUT /accounts/YOUR_CLOUDFLARE_ACCOUNT_ID/workers/scripts/my-worker with the script content, then bind it to a route with POST /zones/zone_id/workers/routes.

Graph Relationships

  • Related to: core-openclaw (cluster), skills like "dns" for record management, "workers" for edge computing, and "access" for security policies.
  • Dependencies: Requires authentication via Cloudflare API; integrates with external skills like "github" for deployment triggers or "aws" for R2 data syncing.

Related skills

FAQ

How does the cloudflare skill authenticate?

It uses a Bearer token from the CLOUDFLARE_API_TOKEN environment variable.

What Cloudflare products does it cover?

DNS, Zones, Pages, Access, Workers, and R2 storage.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.