wrangler

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

3|Updated Nov 8, 2014
One-click install
npx skills add https://github.com/mintuz/.dotfiles --skill wrangler-mintuz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wrangler
Source: https://github.com/mintuz/.dotfiles/tree/main/agents/.agents/skills/wrangler
Command: npx skills add https://github.com/mintuz/.dotfiles --skill wrangler-mintuz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires wrangler.

What problem does it solve? Wrangler CLI flags, config fields, and subcommands change frequently, so relying on outdated knowledge leads to broken deployments and invalid configurations. This Skill ensures correct, current Wrangler syntax by prioritizing retrieval from official Cloudflare docs and the local config schema over pre-trained knowledge. ## Core Features & Use Cases - Deployment & Development: Run local dev servers, deploy Workers, manage versions, and roll back releases with correct commands. - Resource Management: Create and configure KV namespaces, R2 buckets, D1 databases, Vectorize indexes, Hyperdrive configs, Queues, Workflows, Pipelines, Containers, and Secrets Store. - Configuration Best Practices: Write wrangler.jsonc configs with proper bindings, environments, compatibility dates, and generate TypeScript types. - Use Case: You need to deploy a Worker with a D1 database and R2 bucket. The Skill provides the exact wrangler.jsonc binding syntax, migration commands, and secure secret-handling workflow. ## Quick Start Ask the AI to help you create and deploy a new Cloudflare Worker with a KV namespace using the latest Wrangler commands.

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, and wrangler deploy --env staging to target 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, or wrangler secret bulk secrets.json for multiple values. Never pass secret values as command arguments or commit them to wrangler.jsonc; use .dev.vars for local development secrets.

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

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

How do I run D1 database migrations with Wrangler?

Create migrations with wrangler d1 migrations create, then apply them locally using wrangler d1 migrations apply my-database --local or to production with --remote. List pending migrations with wrangler d1 migrations list before applying.

Why is my binding undefined in my Worker during local development?

The binding name in your code must exactly match the binding name in wrangler.jsonc. Run wrangler types to regenerate TypeScript definitions after config changes, and note that some bindings like Workers AI require remote: true to work locally.

Can I test cron triggers locally with Wrangler?

Yes, start the dev server with wrangler dev --test-scheduled, then visit http://localhost:8787/__scheduled to trigger the scheduled handler manually. This simulates cron events without deploying to Cloudflare.