Comprehensive Cloudflare account management for deploying Workers, KV Storage, R2, Pages, DNS, and Routes. Use when deploying cloudflare services, managing worker containers, configuring KV/R2 storage, or setting up DNS/routing. Requires CLOUDFLARE_API_KEY in .env and Bun runtime with dependencies installed.
npx skills add https://github.com/Microck/ordinary-claude-skills --skill Cloudflare Manager
Comprehensive Cloudflare service management skill that enables deployment and configuration of Workers, KV Storage, R2 buckets, Pages, DNS records, and routing. Automatically validates API credentials, extracts deployment URLs, and provides actionable error messages.
Before using this skill for the first time:
cd ~/.claude/skills/cloudflare-manager
bun install
Create a .env file in your project root:
CLOUDFLARE_API_KEY=your_api_token_here
CLOUDFLARE_ACCOUNT_ID=your_account_id # Optional, auto-detected
Getting your API token:
Run validation to verify your API key and check permissions:
cd ~/.claude/skills/cloudflare-manager
bun scripts/validate-api-key.ts
Expected output:
✅ API key is valid!
ℹ️ Token Status: active
ℹ️ Account: Your Account Name (abc123...)
🔑 Granted Permissions:
✅ Workers Scripts: Edit
✅ Workers KV Storage: Edit
✅ Workers R2 Storage: Edit
Troubleshooting validation:
.env--no-cache flag to force fresh validation: bun scripts/validate-api-key.ts --no-cache<!-- PERMISSIONS_START -->
Run bun scripts/validate-api-key.ts to populate this section with your current permissions.
<!-- PERMISSIONS_END -->
To deploy a new worker container sandbox:
# Using the skill
bun scripts/workers.ts deploy worker-name ./worker-script.js
What happens:
https://worker-name.username.workers.dev)Example conversation:
User: "Set up and deploy a new cloudflare worker container sandbox named 'api-handler' and return the URL"
Claude: [Deploys worker using bun scripts/workers.ts deploy api-handler ./worker.js]
Returns URL: https://api-handler.username.workers.dev
Exit codes:
0: Success - worker deployed and URL returned1: Failure - check error message for detailsPerformance: Deployment typically completes in 2-5 seconds
To create a KV namespace and store data:
# Create namespace
bun scripts/kv-storage.ts create-namespace user-sessions
# Returns: Namespace ID (e.g., abc123def456)
# Save this ID for binding to workers
# Write key-value pair
bun scripts/kv-storage.ts write <namespace-id> "session:user123" '{"userId":"123","token":"abc"}'
# Read value
bun scripts/kv-storage.ts read <namespace-id> "session:user123"
# Returns: {"userId":"123","token":"abc"}
# List all keys (useful for debugging)
bun scripts/kv-storage.ts list-keys <namespace-id>
# Delete a key
bun scripts/kv-storage.ts delete <namespace-id> "session:user123"
Important: KV storage uses eventual consistency. Writes may take up to 60 seconds to propagate globally. For immediate reads, use the same edge location where you wrote the data.
To create an R2 bucket and manage objects:
# Create bucket
bun scripts/r2-storage.ts create-bucket media-assets
# Upload file
bun scripts/r2-storage.ts upload media-assets ./images/logo.png logo.png
# List objects
bun scripts/r2-storage.ts list-objects media-assets
# Download object
bun scripts/r2-storage.ts download media-assets logo.png ./downloaded-logo.png
To deploy a static site or application to Pages:
# Create Pages project (or get existing project info)
bun scripts/pages.ts deploy my-app ./dist
# Returns: https://my-app.pages.dev
# Set environment variable
bun scripts/pages.ts set-env my-app API_URL https://api.example.com
# Set environment variable for specific environment
bun scripts/pages.ts set-env my-app DEBUG true --env preview
# Get deployment URL
bun scripts/pages.ts get-url my-app
Auto-extracted URLs: The Pages script automatically extracts and returns the Cloudflare-generated URL (e.g., https://my-app.pages.dev) from the deployment response.
Note: The API creates the project structure, but for actual file uploads, you'll need Wrangler CLI:
npx wrangler pages deploy ./dist --project-name=my-app
Why this works: The skill creates/verifies the Pages project and returns the URL. For the initial deployment with files, Wrangler handles the complex multipart upload process.
To create DNS records and configure worker routes:
# Create DNS A record
bun scripts/dns-routes.ts create-dns example.com A api 192.168.1.1
# Route pattern to worker
bun scripts/dns-routes.ts create-route example.com "*.example.com/api/*" api-handler
To set up a complete application with worker, KV storage, and R2 bucket:
bun scripts/kv-storage.ts create-namespace app-cache
bun scripts/r2-storage.ts create-bucket app-media
bun scripts/workers.ts deploy app-worker ./worker.js --kv-binding app-cache --r2-binding app-media
bun scripts/dns-routes.ts create-route example.com "example.com/*" app-worker
To update an existing worker's code or bindings:
# Update worker code
bun scripts/workers.ts update worker-name ./new-worker-script.js
# Get worker details
bun scripts/workers.ts get worker-name
# List all workers
bun scripts/workers.ts list
To perform bulk operations on KV storage:
# Bulk write from JSON file
bun scripts/kv-storage.ts bulk-write namespace-name ./data.json
# Delete multiple keys
bun scripts/kv-storage.ts bulk-delete namespace-name key1 key2 key3
If .env file is missing or CLOUDFLARE_API_KEY is not set:
Error: CLOUDFLARE_API_KEY not found in environment
Solution: Create .env file in project root:
echo "CLOUDFLARE_API_KEY=your_token_here" > .env
If API token lacks required permissions:
Error: Insufficient permissions for Workers deployment
Required: Workers Scripts: Edit
Current: Workers Scripts: Read
Solution: Update token permissions at:
https://dash.cloudflare.com/profile/api-tokens
If too many requests are made:
Error: Rate limit exceeded (429)
Solution: Retry automatically with exponential backoff (3 attempts)
If API is unreachable:
Error: Failed to connect to Cloudflare API
Solution: Check internet connection and retry
Security:
.env files - always add to .gitignorewrangler secret put SECRET_NAMEPerformance:
Development Workflow:
wrangler dev for local testingbun scripts/validate-api-key.tswrangler tail worker-nameapi-v1, api-v2Naming Conventions:
user-auth-worker not worker1)app-sessions, api-cache)media-assets-prod)Resource Management:
For advanced scenarios including:
See examples.md for comprehensive examples and patterns.
All scripts are located in ~/.claude/skills/cloudflare-manager/scripts/:
Starter templates are available in ~/.claude/skills/cloudflare-manager/templates/:
Issue: "Worker deployment failed with unknown error"
Symptoms: Deployment command exits with error code 1, no specific error message
Solutions:
node --check ./worker.jsls -lh ./worker.jsbun scripts/validate-api-key.ts --no-cacheIssue: "KV namespace not found"
Symptoms: Error when trying to read/write to namespace
Solutions:
bun scripts/kv-storage.ts list-namespacesIssue: "R2 bucket already exists" or "Bucket name taken"
Symptoms: Cannot create bucket with chosen name
Solutions:
my-app-media-2024 instead of mediabun scripts/r2-storage.ts list-bucketsIssue: "Pages deployment timeout" or "Deployment pending"
Symptoms: Deployment doesn't complete, stays in pending state
Solutions:
bun scripts/pages.ts list-deployments project-nameIssue: "DNS record creation failed"
Symptoms: Cannot create DNS records or routes
Solutions:
bun scripts/dns-routes.ts list-zonesdig NS yourdomain.comIssue: "API rate limit exceeded (429)"
Symptoms: Commands fail with "Too many requests"
Solutions:
Issue: "CLOUDFLARE_API_KEY not found in environment"
Symptoms: Commands fail immediately with environment error
Solutions:
.env file in project root (not skill directory)cat .env | grep CLOUDFLARE_API_KEYCLOUDFLARE_API_KEY=token (no spaces around =).env existsQuick Fix:
cd /path/to/your/project
echo "CLOUDFLARE_API_KEY=your_token_here" > .env
bun scripts/validate-api-key.ts
Assess Kubernetes workloads and cluster configuration for AKS Automatic compatibility. Identifies incompatibilities, generates fixes, and guides migration from AKS Standard to AKS Automatic. WHEN: migrate to AKS Automatic, check AKS Automatic readiness, validate manifests for Automatic, assess cluster for Automatic compatibility, fix deployment for Automatic compatibility, identify AKS Automatic migration blockers, is my cluster ready for AKS Automatic.
Discovers available Azure OpenAI model capacity across regions and projects. Analyzes quota limits, compares availability, and recommends optimal deployment locations based on capacity requirements. USE FOR: find capacity, check quota, where can I deploy, capacity discovery, best region for capacity, multi-project capacity search, quota analysis, model availability, region comparison, check TPM availability. DO NOT USE FOR: actual deployment (hand off to preset or customize after discovery), quota increase requests (direct user to Azure Portal), listing existing deployments.
Interactive guided deployment flow for Azure OpenAI models with full customization control. Step-by-step selection of model version, SKU (GlobalStandard/Standard/ProvisionedManaged), capacity, RAI policy (content filter), and advanced options (dynamic quota, priority processing, spillover). USE FOR: custom deployment, customize model deployment, choose version, select SKU, set capacity, configure content filter, RAI policy, deployment options, detailed deployment, advanced deployment, PTU deployment, provisioned throughput. DO NOT USE FOR: quick deployment to optimal region (use preset).
Unified Azure OpenAI model deployment skill with intelligent intent-based routing. Handles quick preset deployments, fully customized deployments (version/SKU/capacity/RAI policy), and capacity discovery across regions and projects. USE FOR: deploy model, deploy gpt, create deployment, model deployment, deploy openai model, set up model, provision model, find capacity, check model availability, where can I deploy, best region for model, capacity analysis. DO NOT USE FOR: listing existing deployments (use foundry_models_deployments_list MCP tool), deleting deployments, agent creation (use agent/create), project creation (use project/create).
Intelligently deploys Azure OpenAI models to optimal regions by analyzing capacity across all available regions. Automatically checks current region first and shows alternatives if needed. USE FOR: quick deployment, optimal region, best region, automatic region selection, fast setup, multi-region capacity check, high availability deployment, deploy to best location. DO NOT USE FOR: custom SKU selection (use customize), specific version selection (use customize), custom capacity configuration (use customize), PTU deployments (use customize).
This skill should be used when working with LaminDB, an open-source data framework for biology that makes data queryable, traceable, reproducible, and FAIR. Use when managing biological datasets (scRNA-seq, spatial, flow cytometry, etc.), tracking computational workflows, curating and validating data with biological ontologies, building data lakehouses, or ensuring data lineage and reproducibility in biological research. Covers data management, annotation, ontologies (genes, cell types, diseases, tissues), schema validation, integrations with workflow managers (Nextflow, Snakemake) and MLOps platforms (W&B, MLflow), and deployment strategies.
Latch platform for bioinformatics workflows. Build pipelines with Latch SDK, @workflow/@task decorators, deploy serverless workflows, LatchFile/LatchDir, Nextflow/Snakemake integration.
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.
Take microck/cloudflare manager from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npx.
Without those the skill loads but fails at the first command.