wrangler

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

Updated Dec 9, 2025
One-click install
npx skills add https://github.com/Aki2022/skills --skill wrangler-aki2022
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wrangler
Source: https://github.com/Aki2022/skills/tree/main/wrangler
Command: npx skills add https://github.com/Aki2022/skills --skill wrangler-aki2022

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires wrangler.

What problem does it solve? Wrangler CLI flags, config fields, and subcommands change frequently, so relying on memorized syntax leads to outdated commands and broken deployments. This Skill ensures correct, current Wrangler usage by biasing toward retrieval from official Cloudflare docs and the local config schema before running any command. ## Core Features & Use Cases - Deployment & Development: Initialize projects, run local dev servers with remote bindings, deploy Workers, manage versions, and roll back releases. - Resource Management: Create and configure KV namespaces, R2 buckets, D1 databases, Vectorize indexes, Hyperdrive configs, Queues, Containers, Workflows, Pipelines, and Secrets Store via CLI commands and wrangler.jsonc bindings. - Secrets & Security: Handle secrets safely using interactive prompts, file-based input, or bulk JSON without exposing values in command arguments. - Use Case: You need to deploy a Worker with a D1 database and R2 bucket. The Skill guides you to write a correct wrangler.jsonc with bindings, run wrangler types to generate TypeScript definitions, test locally with wrangler dev, and deploy with wrangler deploy --dry-run first. ## Quick Start Ask the AI to create a new Cloudflare Worker with a D1 database binding and deploy it 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 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 configure D1, KV, or R2 bindings in wrangler.jsonc?

Add binding arrays in wrangler.jsonc: d1_databases with database_name and database_id, kv_namespaces with the namespace id, or r2_buckets with bucket_name. Run wrangler types afterward to regenerate TypeScript definitions for the new bindings.

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 autocompletion and validation of config fields.

How do I set secrets in Wrangler without exposing them?

Run wrangler secret put API_KEY and enter the value at the interactive prompt, or pipe from a file with wrangler secret put KEY < file.pem. Never pass secret values as command arguments, and use .dev.vars for local development secrets.

Why is my binding undefined inside my Worker?

The binding name in your code must exactly match the binding name in wrangler.jsonc. After changing config, run wrangler types to update TypeScript definitions and restart wrangler dev so the new bindings load.

Can I use real Cloudflare resources during local development?

Yes, set remote: true on specific bindings in wrangler.jsonc to connect to real resources while running wrangler dev locally. This is recommended for Workers AI, Vectorize, and Browser Rendering, which cannot be fully simulated locally.