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 and routing. Requires CLOUDFLARE_API_KEY in .env and the Bun runtime with dependencies installed.
A comprehensive Claude Code skill for managing Cloudflare services including Workers, KV Storage, R2 buckets, Pages, DNS, and routing.
# Install dependencies
cd ~/.claude/skills/cloudflare-manager
bun install
Create a .env file in your project root (not in the skill directory):
CLOUDFLARE_API_KEY=your_api_token_here
CLOUDFLARE_ACCOUNT_ID=your_account_id # Optional, auto-detected
Getting your API token:
Verify your setup:
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
# Create worker script
cat > hello-worker.js << 'EOF'
addEventListener('fetch', event => {
event.respondWith(new Response('Hello World!'));
});
EOF
# Deploy
bun scripts/workers.ts deploy hello-worker ./hello-worker.js
# Returns: https://hello-worker.username.workers.dev
User: "Deploy a new Cloudflare worker named 'api-handler' and return the URL"
Claude: [Uses cloudflare-manager skill]
Deployed worker: https://api-handler.username.workers.dev
# Create namespace
bun scripts/kv-storage.ts create-namespace user-sessions
# Returns: Namespace ID (save this!)
# Write data
bun scripts/kv-storage.ts write <namespace-id> "user:123" '{"name":"John"}'
# Read data
bun scripts/kv-storage.ts read <namespace-id> "user:123"
# Create bucket
bun scripts/r2-storage.ts create-bucket my-files
# Upload file
bun scripts/r2-storage.ts upload my-files ./photo.jpg images/photo.jpg
# List objects
bun scripts/r2-storage.ts list-objects my-files
cloudflare-manager/
├── SKILL.md # Main skill documentation
├── README.md # This file
├── examples.md # Advanced examples and patterns
├── package.json # Dependencies
├── scripts/ # Deployment scripts
│ ├── validate-api-key.ts # API key validation
│ ├── workers.ts # Worker management
│ ├── kv-storage.ts # KV namespace operations
│ ├── r2-storage.ts # R2 bucket operations
│ ├── pages.ts # Pages deployment
│ ├── dns-routes.ts # DNS and routing
│ └── utils.ts # Shared utilities
└── templates/ # Starter templates
├── worker-template.js # Basic worker template
└── wrangler.toml.template # Wrangler config template
.env files - add to .gitignorewrangler secret putwrangler devapi-v1, api-v2wrangler tail worker-nameSolution: Create .env file in your project root:
cd /path/to/your/project
echo "CLOUDFLARE_API_KEY=your_token_here" > .env
Solutions:
node --check ./worker.jsls -lh ./worker.jsbun scripts/validate-api-key.ts --no-cacheSolution: Scripts automatically retry with exponential backoff. Wait 1-2 minutes before manual retry.
Solutions:
bun scripts/kv-storage.ts list-namespacesFor more troubleshooting, see SKILL.md.
This skill is part of the Claude Code Skills ecosystem. For issues or improvements:
bun scripts/validate-api-key.tsThis skill is provided as-is for use with Claude Code.
bun scripts/validate-api-key.tsVersion: 1.0.0 Last Updated: 2025-10-19 Skill Score: 8.7/10 (Validated)
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer