wrangler

Deploy and manage Cloudflare Workers, KV, R2, D1, and other bindings using Wrangler CLI commands.

5|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/nuggocto/dotfiles --skill wrangler-nuggocto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wrangler
Source: https://github.com/nuggocto/dotfiles/tree/main/opencode/skills/wrangler
Command: npx skills add https://github.com/nuggocto/dotfiles --skill wrangler-nuggocto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Wrangler CLI flags, config fields, and subcommands change frequently, so relying on memorized knowledge leads to outdated commands and invalid configurations when deploying or managing Cloudflare Workers and their bindings. ## Core Features & Use Cases - Deployment & Development: Run local dev servers, deploy Workers, manage versions, and roll back releases with correct Wrangler syntax. - Resource Management: Create and manage KV namespaces, R2 buckets, D1 databases, Vectorize indexes, Hyperdrive configs, Queues, Workflows, Pipelines, Containers, and Secrets Store. - Configuration Guidance: Write valid wrangler.jsonc configs with bindings, environments, compatibility dates, and generate TypeScript types. - Use Case: You need to add a D1 database to an existing Worker, run migrations, and deploy to a staging environment. This Skill ensures you use the current wrangler d1 migrations apply syntax and correct binding shapes instead of outdated flags. ## Quick Start Ask the AI to help you create and deploy a new Cloudflare Worker with a KV namespace binding using Wrangler.

Frequently Asked Questions about wrangler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a Cloudflare Worker with Wrangler?

Run `wrangler deploy` from your project directory after configuring wrangler.jsonc with your Worker name, main entry point, and compatibility date. Use `wrangler deploy --dry-run` to validate first, or `wrangler deploy --env staging` for a specific environment.

How do I manage secrets in Cloudflare Workers?

Use `wrangler secret put API_KEY` with the interactive prompt to set secrets securely without exposing values in commands. For bulk operations, use `wrangler secret bulk secrets.json`, and never commit the file to version control.

Should I use wrangler.jsonc or wrangler.toml for configuration?

Prefer wrangler.jsonc because newer Wrangler features are JSON-only. Add the `$schema` field pointing to node_modules/wrangler/config-schema.json for autocompletion and validation of config fields and binding shapes.

Does wrangler dev use real Cloudflare resources locally?

By default, `wrangler dev` uses local storage simulation for bindings. Set `"remote": true` on specific bindings in your config to connect to real resources, which is required for Workers AI and recommended for Vectorize.

Why is my Worker binding undefined at runtime?

The binding name in your Worker code must exactly match the binding name in wrangler.jsonc. After changing config, run `wrangler types` to regenerate TypeScript definitions and catch mismatches.

How do I run D1 database migrations with Wrangler?

Create migrations with `wrangler d1 migrations create my-database migration_name`, then apply them with `wrangler d1 migrations apply my-database --local` for development or `--remote` for production.