Preface

When doing edge computing on Cloudflare, you cannot live without Wrangler in your daily work: local wrangler dev, deployment wrangler deploy, as well as the creation and binding of resources such as KV, R2, D1, etc. There are many commands and configuration fields that are constantly being updated. If an AI programming assistant only relies on outdated knowledge from its training phase, it is very likely to generate outdated flags, incorrect binding structures, or even put secrets that should be entered interactively into command line arguments.

The official Cloudflare repository cloudflare/skills provides an Agent Skill named wrangler. It does not replace the Wrangler CLI itself, but rather a set of operational guidelines loaded before executing related tasks: it requires the assistant to first cross-check the official documentation and local configuration schema, then generate commands and wrangler.jsonc according to current best practices.

What is this

wrangler is an Agent Skill maintained by Cloudflare (in the universal SKILL.md format), designed for scenarios that require deploying and managing Cloudflare Workers and related platform resources. Its official description covers: Workers, KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Containers, Queues, Workflows, Pipelines, Secrets Store, etc.

This Skill has a clear principle: Prefer retrieval over pre-training. That is to say, when writing or reviewing Wrangler commands, configuration fields, and binding structures, you should prioritize fetching the latest information from the following sources instead of relying on the model’s built-in memory:

Source Purpose
https://developers.cloudflare.com/workers/wrangler/ CLI commands, flags, configuration references
node_modules/wrangler/config-schema.json Configuration fields, binding structures, allowed values
https://developers.cloudflare.com/workers/ APIs, compatibility date/flags, etc.

It follows the open Agent Skills standard and can be used in tools that support this standard, such as Claude Code, Cursor, OpenCode, OpenAI Codex, Pi, etc.

Core Features and Highlights

According to the official SKILL.md, this Skill mainly guides assistants to the following capabilities:

  1. Installation and version check: First run wrangler --version (requires v4.x+), use npm install -D wrangler@latest if not installed; use Wrangler whenever possible instead of writing Cloudflare API requests manually.
  2. Configuration conventions: Prioritize using wrangler.jsonc (most new features are JSON-exclusive); set a recent compatibility_date; run wrangler types to generate TypeScript binding types after configuration changes.
  3. Local development: Use local storage emulation by default; set remote: true on bindings when connecting to real resources; put local secrets in .dev.vars.
  4. Deployment and operations: deploy / --dry-run, secret management, version listing and rollback, wrangler tail for real-time logs, wrangler check startup for startup latency analysis.
  5. Multi-resource lifecycle: KV, R2, D1, Vectorize, Hyperdrive, Queues, Containers, Workflows, Pipelines, Secrets Store, Pages, etc., all have corresponding subcommands and configuration binding examples.
  6. Security habits: Do not use secrets as command line arguments or pass them via echo pipes; prioritize interactive wrangler secret put, or read from files or via secret bulk.

Installation and Enablement

The Skill itself is an instruction file; executing commands still relies on the locally installed Wrangler (usually a devDependency in Node.js projects).

1. Install Cloudflare Skills (including wrangler)

There are multiple ways provided in the official README, choose any one:

Install the entire repository using npx skills (you can also specify --skill wrangler according to the skills.sh documentation):

npx skills add https://github.com/cloudflare/skills
# To install only wrangler:
# npx skills add https://github.com/cloudflare/skills --skill wrangler

Claude Code (plugin marketplace):

/plugin marketplace add cloudflare/skills
/plugin install cloudflare@cloudflare

Cursor: You can install it from the Cursor Marketplace, or add cloudflare/skills in Settings > Rules > Add Rule > Remote Rule (Github).

Manual copy (official directory mapping):

Tool Skill Directory
Claude Code ~/.claude/skills/
Cursor ~/.cursor/skills/
OpenCode ~/.config/opencode/skills/
OpenAI Codex ~/.codex/skills/
Pi ~/.pi/agent/skills/

For example:

git clone https://github.com/cloudflare/skills.git
cp -r skills/skills/wrangler ~/.cursor/skills/

After installation, when you ask the assistant to “deploy a Worker”, “modify wrangler.jsonc”, “create a D1 database” and other matching trigger conditions, this Skill will be automatically loaded; you can also explicitly require using the wrangler skill in the conversation.

2. Ensure Wrangler CLI is available

wrangler --version   # Requires v4.x+
# If not installed:
npm install -D wrangler@latest

Typical Usage Examples

The examples below are from the official Skill documentation and can be directly reproduced in your project.

Create a new Worker

npx wrangler init my-worker
# Or use framework scaffolding
npx create-cloudflare@latest my-app

Minimal configuration (wrangler.jsonc)

{
  "$schema": "./node_modules/wrangler/config-schema.json",
  "name": "my-worker",
  "main": "src/index.ts",
  "compatibility_date": "2026-01-01"
}

A more complete configuration can declare vars, kv_namespaces, r2_buckets, d1_databases, ai, vectorize, hyperdrive, durable_objects, triggers.crons and environment overrides such as env.staging. After modifying the configuration, it is recommended to run:

wrangler types
# Check if types are outdated in CI:
wrangler types --check

Local development and deployment

wrangler dev
wrangler deploy --dry-run
wrangler deploy
wrangler deploy --env staging

Example local secrets (.dev.vars, do not commit to version control):

API_KEY=local-dev-key
DATABASE_URL=postgres://localhost:5432/dev

Set production secrets using interactive mode:

wrangler secret put API_KEY

Quick reference of common commands

Task Command
Local development wrangler dev
Deployment wrangler deploy
Dry-run validation wrangler deploy --dry-run
Generate types wrangler types
Startup latency analysis wrangler check startup
Real-time logs wrangler tail
Account status wrangler whoami

There are also corresponding command templates in the Skill for D1 migrations, R2 object uploads, KV read/write operations, etc., for example:

wrangler d1 migrations create my-database create_users_table
wrangler d1 migrations apply my-database --local
wrangler d1 migrations apply my-database --remote

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

wrangler kv namespace create MY_KV

Applicable Scenarios and Notes

Applicable scenarios:

  • Using AI assistants to write/modify Cloudflare Workers project configurations and deployment scripts
  • Needing to manage multiple types of bindings such as KV, R2, D1, Queues, etc., and hoping commands and schemas are aligned
  • Teams using wrangler.jsonc as a single source of truth for configuration, and running wrangler types --check in CI

Notes:

  • The Skill guides “how to use Wrangler correctly”; account login (wrangler login), billing and quotas still refer to the Cloudflare console and official documentation.
  • Workers AI will also connect to the remote endpoint during local development and incur usage fees, which is explicitly noted in the Skill.
    | Local development uses emulated storage by default; when connecting to real R2 / Vectorize / AI, etc., configure remote: true on the corresponding binding.
  • Commands and configuration fields will change; one of the purposes of enabling this Skill is to have the assistant check the documentation and config-schema.json before taking action, instead of relying on memorized outdated syntax.
  • If installation commands on third-party mirror sites differ from the official README / skills.sh, refer to the Cloudflare repository and the wrangler page on skills.sh as the standard.

Summary

The Wrangler Skill solidifies Cloudflare’s latest conventions for CLI and configuration into an operable manual that Agents can load: retrieve first, then generate commands, prioritize wrangler.jsonc, type generation, secure secret management, test locally before deploying. For developers already using the Workers edge stack, installing it into tools like Cursor / Claude Code / Codex can significantly reduce issues like “outdated flags” and “incorrect bindings”.

Official links:

  • Skill directory: https://github.com/cloudflare/skills/tree/main/skills/wrangler
  • Repository description and installation: https://github.com/cloudflare/skills
  • Wrangler documentation: https://developers.cloudflare.com/workers/wrangler/
  • skills.sh installation page: https://www.skills.sh/cloudflare/skills/wrangler