Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问clear审计通过

cloudflare-managerCloudflare manager 搜索

Agent Skill

cloudflare-manager 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,432

周安装

98

GitHub Stars

1,239

下载量

1,370
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cloudflare-manager(Cloudflare manager 搜索)
来源仓库:https://github.com/qdhenry/claude-command-suite
仓库路径:skills/cloudflare-manager
安装命令:
npx skills add https://github.com/qdhenry/claude-command-suite --skill 'Cloudflare Manager'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/qdhenry/claude-command-suite --skill 'Cloudflare Manager'

简介

用于 Cloudflare 相关资源的查询与管理辅助,适合处理 DNS、CDN、防火墙及边缘配置等任务。

  • 可协助检查规则状态、生成部署脚本或分析流量模式,侧重基础设施层面的信息整合。
  • 通过 npx 命令从指定仓库安装,需确保宿主环境具备 API 访问权限和网络连通性。
  • 涉及变更操作时应谨慎验证影响范围,建议先在沙箱环境测试后再应用于生产。
  • cloudflare-manager 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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.

Initial Setup

Before using this skill for the first time:

  1. Install Dependencies cd ~/.claude/skills/cloudflare-manager bun install
  2. Configure API Key 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:

- 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)

  1. Validate Credentials 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:

- If validation fails with 401/403: Check your API token is correct in .env - If validation fails with network error: Check internet connection - Use --no-cache flag to force fresh validation: bun scripts/validate-api-key.ts --no-cache

Current API Permissions

Run bun scripts/validate-api-key.ts to populate this section with your current permissions.

Quick Start Guide

Deploy a Worker Container

To deploy a new worker container sandbox:

# Using the skill
bun scripts/workers.ts deploy worker-name ./worker-script.js

What happens:

  • Creates new worker container
  • Deploys JavaScript/TypeScript code
  • Automatically extracts and returns Cloudflare-generated URL (e.g., https://worker-name.username.workers.dev)
  • Returns worker ID and configuration

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 returned
  • 1: Failure - check error message for details

Performance: Deployment typically completes in 2-5 seconds

Create and Use KV Storage

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.

Create R2 Bucket and Upload Files

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

Deploy to Cloudflare Pages

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.

Configure DNS and Routes

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

Common Workflows

Multi-Service Setup

To set up a complete application with worker, KV storage, and R2 bucket:

  1. Create KV namespace for caching bun scripts/kv-storage.ts create-namespace app-cache
  2. Create R2 bucket for media bun scripts/r2-storage.ts create-bucket app-media
  3. Deploy worker with bindings bun scripts/workers.ts deploy app-worker./worker.js --kv-binding app-cache --r2-binding app-media
  4. Configure route bun scripts/dns-routes.ts create-route example.com "example.com/*" app-worker

Update Worker Configuration

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

Bulk KV Operations

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

Error Handling

Missing API Key

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

Invalid Permissions

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

API Rate Limiting

If too many requests are made:

Error: Rate limit exceeded (429)

Solution: Retry automatically with exponential backoff (3 attempts)

Network Issues

If API is unreachable:

Error: Failed to connect to Cloudflare API

Solution: Check internet connection and retry

Best Practices

Security:

  • Never commit .env files - always add to .gitignore
  • Use token-based authentication (not API keys)
  • Rotate tokens periodically (every 90 days recommended)
  • Use least-privilege principle: only grant required permissions
  • Store secrets via Wrangler CLI: wrangler secret put SECRET_NAME

Performance:

  • Deploy workers to minimize latency (they run at Cloudflare edge)
  • Use KV storage for frequently-read data (not frequently-written)
  • Use R2 for large files (KV has 25MB limit per key)
  • Enable caching with appropriate TTLs
  • Keep worker scripts under 1MB for faster cold starts

Development Workflow:

  • Test locally first: wrangler dev for local testing
  • Use staging environment before production
  • Validate credentials after token updates: bun scripts/validate-api-key.ts
  • Monitor worker logs: wrangler tail worker-name
  • Version your workers: use names like api-v1, api-v2

Naming Conventions:

  • Workers: Use descriptive names (e.g., user-auth-worker not worker1)
  • KV namespaces: Include purpose (e.g., app-sessions, api-cache)
  • R2 buckets: Use lowercase with hyphens (e.g., media-assets-prod)
  • Be consistent across your infrastructure

Resource Management:

  • Delete unused workers, namespaces, and buckets
  • Monitor usage in Cloudflare dashboard
  • Free tier limits: 100,000 requests/day for Workers
  • Set up billing alerts to avoid surprises

Advanced Usage

For advanced scenarios including:

  • Complex routing configurations
  • Multi-region deployments
  • Custom domain setup
  • Worker-to-worker communication
  • Durable Objects integration
  • Bulk operations and migrations

See examples.md for comprehensive examples and patterns.

Script Reference

All scripts are located in ~/.claude/skills/cloudflare-manager/scripts/:

  • validate-api-key.ts: Validate API credentials and display permissions
  • workers.ts: Deploy, update, and manage Workers
  • kv-storage.ts: Create and manage KV namespaces and key-value pairs
  • r2-storage.ts: Create and manage R2 buckets and objects
  • pages.ts: Deploy and configure Cloudflare Pages projects
  • dns-routes.ts: Configure DNS records and worker routes
  • utils.ts: Shared utilities for API calls and error handling

Templates

Starter templates are available in ~/.claude/skills/cloudflare-manager/templates/:

  • worker-template.js: Basic worker template with fetch handler
  • wrangler.toml.template: Wrangler configuration template

Troubleshooting

Common Issues and Solutions

Issue: "Worker deployment failed with unknown error"

Symptoms: Deployment command exits with error code 1, no specific error message

Solutions:

  1. Check script syntax: node --check./worker.js
  2. Verify file exists: ls -lh./worker.js
  3. Re-validate API key: bun scripts/validate-api-key.ts --no-cache
  4. Check worker name is valid (alphanumeric, hyphens, underscores only)

Issue: "KV namespace not found"

Symptoms: Error when trying to read/write to namespace

Solutions:

  1. List all namespaces: bun scripts/kv-storage.ts list-namespaces
  2. Verify you're using namespace ID (not name) in commands
  3. Check namespace wasn't deleted
  4. Ensure API token has KV Storage permissions

Issue: "R2 bucket already exists" or "Bucket name taken"

Symptoms: Cannot create bucket with chosen name

Solutions:

  1. Bucket names must be globally unique across all Cloudflare accounts
  2. Try a more specific name: my-app-media-2024 instead of media
  3. Use existing bucket: bun scripts/r2-storage.ts list-buckets
  4. Names must be 3-63 characters, lowercase letters/numbers/hyphens only

Issue: "Pages deployment timeout" or "Deployment pending"

Symptoms: Deployment doesn't complete, stays in pending state

Solutions:

  1. Check deployment status: bun scripts/pages.ts list-deployments project-name
  2. View in dashboard: https://dash.cloudflare.com/pages
  3. Large deployments (>1000 files) may take 5-10 minutes
  4. Cancel and retry if stuck: Delete project and recreate

Issue: "DNS record creation failed"

Symptoms: Cannot create DNS records or routes

Solutions:

  1. Verify zone exists: bun scripts/dns-routes.ts list-zones
  2. Ensure domain is added to Cloudflare and active
  3. Check nameservers point to Cloudflare: dig NS yourdomain.com
  4. Verify API token has Zone > DNS > Edit permission

Issue: "API rate limit exceeded (429)"

Symptoms: Commands fail with "Too many requests"

Solutions:

  1. Scripts automatically retry with exponential backoff
  2. Wait 1-2 minutes before retrying manually
  3. Reduce concurrent operations
  4. Rate limits: 1200 requests per 5 minutes

Issue: "CLOUDFLARE_API_KEY not found in environment"

Symptoms: Commands fail immediately with environment error

Solutions:

  1. Create .env file in project root (not skill directory)
  2. Verify file content: cat.env | grep CLOUDFLARE_API_KEY
  3. Ensure no extra spaces: CLOUDFLARE_API_KEY=token (no spaces around =)
  4. Run commands from project root where .env exists

Quick Fix:

cd /path/to/your/project
echo "CLOUDFLARE_API_KEY=your_token_here" > .env
bun scripts/validate-api-key.ts

Security Notes

  • API keys are never logged or displayed in output
  • All API requests use HTTPS
  • User inputs are validated before API calls
  • Destructive operations (delete) require confirmation
  • Permissions are cached for 24 hours to minimize token exposure

Additional Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.33%
按下载量换算402

OpenCode

23.51%
按下载量换算322

Cursor

19.07%
按下载量换算261

Codex

12.32%
按下载量换算169

Antigravity

7.47%
按下载量换算102

Gemini CLI

3.78%
按下载量换算52

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源字段存在多来源差异,先按来源优先级自动处理,无法消解时进入异常复核队列。

来源信息

继续浏览同类 Skills