wrangler
Run or troubleshoot Wrangler CLI commands in projects that have a wrangler.jsonc, wrangler.json, or wrangler.toml file, including local development, Previews, deployment, and resource management. For new projects and projects without a Wrangler configuration file, use the cf CLI instead.
- Installs
- 565
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://developers.cloudflare.com --skill wrangler- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads wrangler automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Wrangler CLI
Use this skill only when the project has wrangler.jsonc, wrangler.json, or wrangler.toml and no cloudflare.config.ts, or when the user asks for Wrangler. For a new project, a project with cloudflare.config.ts, or a project with no Cloudflare configuration, use the Cloudflare CLI (cf) instead: load the cf-cli skill if it is installed, or follow Use cf with coding agents. Do not add Wrangler to those projects.
Use the project's Wrangler version and retrieve the relevant documentation before writing commands or configuration. CLI flags and configuration fields change; do not rely on memorized examples.
Inspect the Project
- Find the package manager, installed Wrangler version, package scripts, framework, and Wrangler config. Run commands through the project's scripts or package manager so they use its local version. Install dependencies using the existing lockfile when needed; do not silently upgrade Wrangler to match current docs. If the project has a Wrangler configuration file but Wrangler is not a dependency, follow the installation guide to add it locally.
- Identify the config used by the build or deploy command, including framework-generated config. Edit its source rather than generated output.
- Establish the target account, Worker, environment, and resource before running commands that change them. For data operations, determine whether the target is local or remote.
Retrieve What the Task Needs
Use the Cloudflare MCP docs tool if available, or fetch the relevant linked page directly. Follow links to the specific command or product involved; avoid loading the entire reference. If a page moves, rediscover it through the Wrangler command index or Cloudflare docs search.
| Task | Source |
|---|---|
| Discover commands and flags, including resource management, deployments, rollback, and diagnostics | Project-local wrangler --help and wrangler <command> --help; command reference |
| Edit config or add a binding | Installed wrangler/config-schema.json (usually under node_modules); configuration reference |
| Deploy a framework application | Framework guides; follow the guide for the project's existing framework and adapter |
| Migrate an application to Workers when requested | Pages to Workers; Vercel to Workers |
| Configure staging or production | Environments |
| Set secrets locally, in CI, or on a deployed Worker | Secrets |
| Generate binding and runtime types | TypeScript |
| Run locally or choose a testing approach | Local development; testing |
| Choose roles, scopes, or API token permissions for Wrangler | Roles and permissions; Workers roles and permissions |
| Create or manage a branch or pull request environment | Previews overview; get started; configuration |
| Decide whether Preview resources are isolated or shared | Resources and isolation, including its current limitations |
| Configure Preview URLs, access, debugging, or CI | Custom domains; test and debug; examples |
| Choose between Previews, Version URLs, and Wrangler environments | Compare workflows |
| Diagnose authentication or select an account | General commands, including whoami; authentication profiles |
| Deploy an unauthenticated prototype | Claim deployments for eligibility, expiry, and claim URL handling; use a permanent account for production or CI |
Use installed help and schema to check whether documented features exist in the project's version. If a required feature needs an upgrade, make that dependency explicit. If retrieval is unavailable, state the gap and use available local evidence rather than inventing syntax.
Apply the Change
- Prefer
wrangler.jsoncfor new config. Set a new project's compatibility date to today; review runtime changes and test when advancing an existing project's date. Preserve existing project conventions and avoid incidental format migrations. - Check environment inheritance before adding bindings or variables. Some fields must be specified separately for each environment; a working default config does not establish that staging is configured.
- With the Cloudflare Vite plugin, select the environment via
CLOUDFLARE_ENVat dev or build time. Deploy the resulting build; setting an environment at deploy time does not retarget its flattened config. See Vite environments. - Reconcile dashboard changes with the config before deploying: Wrangler can overwrite dashboard variables and routes. When binding existing resources, verify their identifiers; omitted identifiers can trigger automatic provisioning.
- Distinguish local simulation from remote bindings during development. A locally running Worker can still access real resources; check the selected bindings before testing writes.
- Before a remote command, identify the authenticated member or API token and retrieve the current role and scope required for the exact operation. Prefer the narrowest scope that satisfies the user's intent. The
wrangler loginOAuth flow does not support granular authorization; use an account-owned API token when granular access is required, and never ask the user to paste its value into chat. - Keep secret values out of command arguments, source code, and logs. Use the documented interactive input or protected file/stdin mechanism for the command. Local secret files must be ignored by version control and are not automatically uploaded as deployed secrets. For missing local secrets, check file precedence and any
secrets.requireddeclaration in the secrets docs. - Treat
wrangler secret putandsecret deleteas deployments: they create a version and deploy it immediately. Use the documentedwrangler versions secretworkflow when the change must be staged. - Before a rollback, check rollback limitations: connected resources and their data are not rolled back with Worker code.
Work with Workers Previews
- Workers Previews requires project-local Wrangler 4.135.0 or later; project commands do not use a newer global installation. Check the project's pinned version and make any required dependency upgrade explicit.
- Use Previews for branch and pull request environments under the same Worker. Use Version URLs to inspect a specific uploaded version with production resources, and Wrangler environments for persistent, separately deployed Workers. Follow Compare workflows rather than adapting an older aliased Version URL workflow.
- First inspect how the user manages production configuration and deployments. Configure Preview domains through the same configuration system as production, such as Wrangler, the dashboard, or Terraform. Run Preview deployments through the user's existing path, such as the local CLI, Workers Builds, or external CI, unless the user requests a different workflow. Mirror the management approach, not production resource bindings or data.
- Before deploying, follow the current configuration placement table and resource matrix and limitations. Do not infer isolation from the Preview name or allow writes to production resources unless the user explicitly intends to share them.
- Tell the user that Preview URLs are public unless access controls are configured, then let them decide whether to protect the URLs. Follow the custom domain and access guidance for the chosen setup.
- Confirm which Worker or Wrangler environment the user intends to target. When targeting a Wrangler environment, pass the same
--envvalue to every Preview command; omitting it targets the top-level Worker.
Validate
After changing config or bindings in a TypeScript project, regenerate types with the project's wrangler types command rather than hand-editing generated declarations. Run the relevant existing typecheck or tests.
For deployment changes, use the project's build workflow and wrangler deploy --dry-run where supported, with the intended config and environment. A successful dry run checks the build and packaging; it does not prove remote resources or runtime behavior work. Use task-specific local or remote checks as appropriate to the requested work.
For Previews, a returned URL does not validate behavior that depends on bindings Wrangler reports as missing. Validate the behavior the user requested, using Preview-specific logs and configuration when needed. Writes to production resources, destructive testing, and deletion of named Previews must match the user's explicit intent.
Report what changed, the target environment, checks performed, and any unresolved validation gaps. Link the documentation used when the result depends on current command or configuration behavior.
FAQ
What does the wrangler skill do?
Run or troubleshoot Wrangler CLI commands in projects that have a wrangler.jsonc, wrangler.json, or wrangler.toml file, including local development, Previews, deployment, and resource management. For new projects and projects without a Wrangler configuration file, use the cf CLI instead.
How do I install wrangler?
Run npx skills add https://developers.cloudflare.com --skill wrangler in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/wrangler/ (personal) or .claude/skills/wrangler/ (project).
Which AI agents can use wrangler?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is wrangler safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains wrangler?
It is published by developers.cloudflare.com in developers.cloudflare.com. It has 565 recorded installs.
More from developers.cloudflare.com
cloudflare
developers.cloudflare.com
Discover and choose Cloudflare products for apps, APIs, AI agents, storage, networking, and security. Use for architecture and product selection, including when the user describes a need without naming a Cloudflare product; then find the relevant skill or documentation.
workers-best-practices
developers.cloudflare.com
Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.
durable-objects
developers.cloudflare.com
Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.
agents-sdk
developers.cloudflare.com
Build, debug, or review Cloudflare Agents SDK applications using the agents package.
web-perf
developers.cloudflare.com
Audit, diagnose, or optimize website loading and interaction performance, Core Web Vitals, and Lighthouse performance scores.
sandbox-sdk
developers.cloudflare.com
Open the skill to read its SKILL.md instructions.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.