
Cloudflare Manager
- 196 repo stars
- Updated July 25, 2026
- secondsky/claude-skills
Manage a Cloudflare account end to end: deploy Workers, configure KV/R2 storage, Pages, DNS, and Routes.
About
Cloudflare Manager provides comprehensive account management for deploying Workers, configuring KV and R2 storage, Pages, DNS, and Routes. A developer uses it to provision and operate Cloudflare services for a project, requiring a CLOUDFLARE_API_KEY and the Bun runtime with dependencies installed.
- Deploy Workers, Pages, KV & R2
- Configure DNS & Routes
- Manage worker containers
- Requires CLOUDFLARE_API_KEY + Bun
Cloudflare Manager by the numbers
- Data as of Jul 28, 2026 (Skillselion catalog sync)
/plugin marketplace add secondsky/claude-skills/plugin install cloudflare-manager@claude-skillsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| repo stars | ★ 196 |
|---|---|
| Last updated | July 25, 2026 |
| Repository | secondsky/claude-skills ↗ |
What it does
Manage a Cloudflare account end to end: deploy Workers, configure KV/R2 storage, Pages, DNS, and Routes.
README.md
Cloudflare Manager Skill
A comprehensive Claude Code skill for managing Cloudflare services including Workers, KV Storage, R2 buckets, Pages, DNS, and routing.
Features
- Workers Deployment: Deploy and manage Cloudflare Workers with automatic URL extraction
- KV Storage: Create namespaces, read/write data, bulk operations
- R2 Storage: Manage buckets and objects (S3-compatible storage)
- Pages: Deploy static sites and configure environments
- DNS & Routing: Configure DNS records and worker routes
- API Validation: Validate credentials and check permissions
- Error Handling: Automatic retries with exponential backoff
- URL Auto-Extraction: Automatically captures and returns deployment URLs
Quick Start
1. Installation
# Install dependencies
cd ~/.claude/skills/cloudflare-manager
bun install
2. Configuration
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:
- Visit https://dash.cloudflare.com/profile/api-tokens
- Click "Create Token"
- Use "Edit Cloudflare Workers" template or create custom token
- Required permissions:
- Account > Workers Scripts > Edit
- Account > Workers KV Storage > Edit
- Account > Workers R2 Storage > Edit
- Account > Cloudflare Pages > Edit
- Zone > DNS > Edit (if using custom domains)
3. Validation
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
Usage Examples
Deploy a Worker
# 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
Use with Claude Code
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 KV Storage
# 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"
Manage R2 Buckets
# 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
Documentation
- SKILL.md - Main skill documentation with quick start guide
- examples.md - Comprehensive examples and advanced patterns
- templates/ - Worker and configuration templates
Project Structure
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
Requirements
- Bun: Runtime for executing scripts
- Cloudflare Account: Free or paid account
- API Token: With appropriate permissions
- Internet Connection: For API calls
Best Practices
Security
- Never commit
.envfiles - add to.gitignore - Use token-based authentication (not API keys)
- Rotate tokens every 90 days
- Use least-privilege permissions
- Store secrets via
wrangler secret put
Performance
- Keep worker scripts under 1MB
- Use KV for read-heavy workloads
- Use R2 for large files (>25MB)
- Set appropriate cache TTLs
- Enable compression for text responses
Development
- Test locally with
wrangler dev - Use staging before production
- Version your workers:
api-v1,api-v2 - Monitor logs:
wrangler tail worker-name - Document namespace IDs and bucket names
Troubleshooting
"CLOUDFLARE_API_KEY not found in environment"
Solution: Create .env file in your project root:
cd /path/to/your/project
echo "CLOUDFLARE_API_KEY=your_token_here" > .env
"Worker deployment failed"
Solutions:
- Check script syntax:
node --check ./worker.js - Verify file exists:
ls -lh ./worker.js - Re-validate API key:
bun scripts/validate-api-key.ts --no-cache - Check worker name (alphanumeric, hyphens, underscores only)
"API rate limit exceeded (429)"
Solution: Scripts automatically retry with exponential backoff. Wait 1-2 minutes before manual retry.
"KV namespace not found"
Solutions:
- List namespaces:
bun scripts/kv-storage.ts list-namespaces - Verify using namespace ID (not name)
- Check namespace wasn't deleted
- Ensure API token has KV permissions
For more troubleshooting, see SKILL.md.
Performance Tips
- Minimize worker size: Keep scripts small for faster cold starts
- Cache strategically: Use KV for frequently-read data
- Parallel operations: Use Promise.all for concurrent tasks
- Edge caching: Set Cache-Control headers appropriately
- Monitor usage: Check Cloudflare dashboard regularly
Resources
- Cloudflare Workers Documentation
- KV Storage Guide
- R2 Storage Documentation
- Pages Documentation
- API Reference
- Wrangler CLI
Contributing
This skill is part of the Claude Code Skills ecosystem. For issues or improvements:
- Test changes thoroughly
- Update documentation
- Follow existing code patterns
- Validate with
bun scripts/validate-api-key.ts
License
This skill is provided as-is for use with Claude Code.
Support
- Documentation: See SKILL.md and examples.md
- Validation:
bun scripts/validate-api-key.ts - Cloudflare Docs: https://developers.cloudflare.com/
- Cloudflare Community: https://community.cloudflare.com/
Version: 1.0.0 Last Updated: 2025-10-19 Skill Score: 8.7/10 (Validated)