Skip to content
Workers Development and Debugging

Workers Development and Debugging Skill

Cloudflare's official skill for running and debugging Workers locally with cf dev, wrangler dev or the Vite plugin, reading and seeding local bindings through Local Explorer, and routing production debugging to Workers observability.

GitHub Docs

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from cloudflare/skills.

$ npx skills add cloudflare/skills --skill workers-development

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

Copy the whole skill folder — SKILL.md and any scripts or references beside it — into ~/.claude/skills/workers-development/, where Claude Code picks it up in every project. Only git is needed.

tmp=$(mktemp -d) && \
  git clone --depth 1 --branch main https://github.com/cloudflare/skills.git "$tmp" && \
  mkdir -p ~/.claude/skills && \
  cp -R "$tmp"/skills/workers-development ~/.claude/skills/workers-development

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/workers-development/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • Uses the project's own dev command: cf dev, wrangler dev or the Vite plugin
  • Local Explorer UI and API for KV, R2, D1, Durable Objects and Workflows
  • Local traces and logs for every invocation without code changes
  • Can trigger Cron handlers locally
  • Flags remote: true bindings before seeding or writing data
  • Routes production debugging to Workers observability and its API

Workers Development and Debugging tells an agent how to work with a Cloudflare Worker while it runs on a developer's machine, and where to look once it is deployed. It starts from the project's own tooling: cf dev in a cf project, otherwise the existing Wrangler or Cloudflare Vite plugin dev script.

The core of the skill is Local Explorer, served at /cdn-cgi/local/explorer on the dev server. It is a UI and API over local KV, R2, D1, SQLite-backed Durable Objects and Workflows that can also trigger Cron handlers, and it captures traces and logs for every local invocation, binding operations included, with no code changes. The agent is told to check those traces before adding logging, to fetch the OpenAPI schema from the dev server and use only the operations it needs, and to compare the installed Wrangler or Vite plugin version against the Local Explorer requirements when something is missing. It also warns that bindings marked remote: true reach real deployed resources, so they must be identified before seeding or writing data.

For a deployed Worker the skill routes to Workers observability (logs, traces or metrics), and, when the Cloudflare MCP server is connected, to the Workers Observability API scoped to the right account, Worker and time window. Works whether or not the project uses Wrangler.

SKILL.md

The instructions your agent loads, as published by Cloudflare.

SKILL.md
name
workers-development
description
Run, inspect, and debug Cloudflare Workers during local development with cf dev, wrangler dev, or the Cloudflare Vite plugin, using Local Explorer to read and seed binding data and query local traces and logs. Also routes production debugging to Workers observability. Use for debugging requests whether or not the project uses Wrangler.

Workers development and debugging

Use the project's existing tooling, scripts, and configuration. Installed help, the Local Explorer API schema, and current docs describe the supported operations; read them rather than guessing endpoints or flags.

NeedTools and discovery
Run locallyUse the project's existing dev command: cf dev in a cf project, otherwise the Wrangler or Cloudflare Vite dev script. See local development.
Inspect or seed local binding dataLocal Explorer is a UI and API for local KV, R2, D1, SQLite-backed Durable Objects, and Workflows, and can trigger Cron handlers. Open /cdn-cgi/local/explorer on the dev server's origin.
Debug local requestsLocal Explorer captures traces and logs from every local invocation, including binding operations, without code changes. Check traces before adding logging.
Debug a deployed WorkerChoose logs, traces, or metrics with Workers observability, or the cloudflare skill's observability reference when installed. If the Cloudflare MCP server is connected (bundled with this plugin), use search to find the Workers Observability API operations, then execute to call them, scoped to the target account, Worker, and time window.
Use the Local Explorer API

When the dev server detects an AI agent, including under cf dev, it prints a hint with the API URL and relevant endpoints. Fetch the OpenAPI specification from /cdn-cgi/local/explorer/api on the dev server's origin, then extract only the operations the task needs. If no hint appears, request that URL directly. If the API or an operation is missing, compare the installed Wrangler or Vite plugin version against the requirements in the Local Explorer docs.

Bindings are simulated locally by default, but a binding set to remote: true reaches the real deployed resource while the Worker runs locally. Traces also capture those remote calls. Identify which bindings are remote before seeding or writing data.

Skill feedback

If the user reports that this skill gave incorrect or outdated guidance, or is missing information, read [references/skill-feedback.md](references/skill-feedback.md).

Install

Wire up Cloudflare Email Sending and Email Routing — the send_email binding, the inbound email() handler, and the deliverability setup that keeps mail out of spam.

Browse all skills →