跳到正文
cccskills
免费在 GitHub 公开

wrangler

Deploy and manage Cloudflare Workers, Pages, R2, D1, KV. Use when working with wrangler, Cloudflare Workers, or edge deployments.

中文简介正在准备中。当前显示原文说明。

集成工具Cloudflare

实测评分 未实测

查看安装方法

包含的文件(5)

  • SKILL.md4.8 KB
  • references/COMMANDS.md7.4 KB
  • references/CONFIG.md5.5 KB
  • references/PAGES.md4.3 KB
  • SELF-TEST.md569 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Using Wrangler

<!-- TOC: Quick Start | THE EXACT PROMPT | Core Commands | Config | Auto-Provisioning | Common Patterns | AGENTS.md Blurb | Gotchas | References -->

Version: 4.59.2+ (Jan 2026). Config format: wrangler.jsonc recommended over .toml.

Quick Start

# Create new project
npx create-cloudflare@latest my-worker

# Local dev
wrangler dev

# Deploy
wrangler deploy

# View logs
wrangler tail

THE EXACT PROMPT — Deploy a Worker

Deploy Worker to Cloudflare:
1. Check wrangler.jsonc exists with name, main, compatibility_date
2. wrangler deploy (auto-provisions KV/R2/D1 bindings if IDs missing)
3. wrangler tail to verify

Core Commands

TaskCommand
Local devwrangler dev
Deploywrangler deploy
View logswrangler tail
Add secretwrangler secret put NAME
List secretswrangler secret list
Generate typeswrangler types
Check configwrangler check startup

Config (wrangler.jsonc)

{
  "name": "my-worker",
  "main": "src/index.ts",
  "compatibility_date": "2025-01-01",

  // Routes
  "routes": [
    { "pattern": "example.com/*", "zone_name": "example.com" }
  ],

  // Bindings (IDs optional - auto-provisioned on deploy)
  "kv_namespaces": [{ "binding": "KV", "id": "..." }],
  "r2_buckets": [{ "binding": "BUCKET", "bucket_name": "my-bucket" }],
  "d1_databases": [{ "binding": "DB", "database_id": "..." }],

  // Environment variables
  "vars": { "ENV": "production" }
}

Auto-Provisioning (v4.57+)

Add bindings WITHOUT IDs — Wrangler creates resources on deploy:

{
  "kv_namespaces": [{ "binding": "CACHE" }],  // No id - auto-created
  "r2_buckets": [{ "binding": "ASSETS" }],    // No bucket_name - auto-created
  "d1_databases": [{ "binding": "DB" }]       // No database_id - auto-created
}

Hidden/Experimental Flags

FlagPurpose
--x-provisionForce auto-provision resources
--x-auto-createAuto-create bindings with new resources
--x-autoconfigAuto-detect framework (Next.js, Remix, etc.)

Environment Variables

VariablePurpose
CLOUDFLARE_API_TOKENAuth for CI/CD
CLOUDFLARE_ACCOUNT_IDOverride account

Decision Tree

What to do?
├─ New project → npx create-cloudflare@latest
├─ Local dev → wrangler dev
├─ Deploy → wrangler deploy
├─ Add secret → wrangler secret put NAME
├─ View logs → wrangler tail
├─ Database ops → wrangler d1 ...
├─ Storage ops → wrangler r2 ... or wrangler kv ...
└─ Scheduled jobs → Add [triggers] to config

Common Patterns

Add a Secret

wrangler secret put API_KEY
# Enter value when prompted (or pipe: echo "value" | wrangler secret put API_KEY)

Multiple Environments

{
  "name": "my-worker",
  "env": {
    "staging": {
      "vars": { "ENV": "staging" },
      "routes": [{ "pattern": "staging.example.com/*" }]
    },
    "production": {
      "vars": { "ENV": "production" },
      "routes": [{ "pattern": "example.com/*" }]
    }
  }
}
wrangler deploy --env staging
wrangler deploy --env production

D1 Database

wrangler d1 create my-db
wrangler d1 execute my-db --file schema.sql
wrangler d1 execute my-db --command "SELECT * FROM users"

R2 Storage

wrangler r2 bucket create my-bucket
wrangler r2 object put my-bucket/file.txt --file ./local.txt
wrangler r2 object get my-bucket/file.txt

AGENTS.md Blurb

Copy this to your project's AGENTS.md:

### Cloudflare Wrangler

Wrangler is installed and authenticated.

R2 bucket: `<BUCKET_NAME>`
Account ID: `<ACCOUNT_ID>`

Common commands:

\`\`\`bash
wrangler r2 object put <BUCKET>/<path> --file ./local-file
wrangler r2 object get <BUCKET>/<path> --file ./downloaded
wrangler r2 bucket list
wrangler d1 execute <DB> --command "SELECT * FROM users"
wrangler deploy
\`\`\`

Reference Index

TopicReference
All commandsCOMMANDS.md
Config optionsCONFIG.md
Pages deploymentPAGES.md

Gotchas

  • Dashboard changes overwritten: Add "keep_vars": true to preserve dashboard edits
  • Secrets not in config: Use wrangler secret put, never put secrets in config
  • Types outdated: Run wrangler types after config changes
  • Old compatibility_date: Update yearly for new features

Sources

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

The philosophy and practical benefits of agent fungibility in multi-agent software development. Why homogeneous, interchangeable agents outperform specialized role-based systems at scale.

中文简介正在准备中。当前显示原文说明。

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026年9月6日 更新

MCP Agent Mail for multi-agent coordination. Use when agents need file locks, messaging, inboxes, or conflict prevention. Handles macro_start_session, file_reservation_paths, send_message, threading, pre-commit guards.

中文简介正在准备中。当前显示原文说明。

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026年9月6日 更新

Jeffrey Emanuel's multi-agent implementation workflow using NTM, Agent Mail, Beads, and BV. The execution phase that follows planning and bead creation. Includes exact prompts used.

中文简介正在准备中。当前显示原文说明。

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026年9月6日 更新

Convert markdown plans into beads with dependencies using br CLI. Use when creating task graphs, polishing beads before implementation, or bridging planning to agent swarm execution.

中文简介正在准备中。当前显示原文说明。

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026年9月6日 更新

bv

免费

Beads Viewer - Graph-aware triage engine for Beads projects. Computes PageRank, betweenness, critical path, and cycles. Use --robot-* flags for AI agents.

中文简介正在准备中。当前显示原文说明。

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026年9月6日 更新

caam

免费

Manage AI coding CLI accounts with sub-100ms switching. Use when hitting rate limits on Claude Max, GPT Pro, or Gemini Ultra subscriptions and need instant account swapping without browser OAuth.

中文简介正在准备中。当前显示原文说明。

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026年9月6日 更新

查看 Dicklesworthstone 的全部技能

报告此技能的问题