Local Workers development

Runs and debugs Workers locally with cf dev, wrangler dev or the Vite plugin, using Local Explorer to read and seed binding data and query traces. Use when a local request fails or you need to see what a binding returned.

DevOpsPack: Cloudflare skills25 linesworkers-development
Author
Source
cloudflare/skills/skills/workers-development @ 5108325
License
Apache-2.0

About this skill

What it does

The skill covers running and debugging a Worker on your machine. It uses the dev command the project already has: cf dev in a cf project, otherwise the Wrangler or Cloudflare Vite plugin script. Its main tool is Local Explorer, a UI and API that the dev server serves at /cdn-cgi/local/explorer. It reads and seeds local KV, R2, D1, SQLite-backed Durable Objects and Workflows, can trigger Cron handlers, and records traces and logs of every local invocation, binding calls included, without code changes. Hence the rule: check traces before adding logging.

When the dev server detects an AI agent, it prints the API URL; the agent fetches the OpenAPI spec from /cdn-cgi/local/explorer/api and uses only the operations it needs instead of guessing endpoints. If the API is missing, it checks the Wrangler or Vite plugin version against the Local Explorer requirements. Before seeding or writing data it checks which bindings are set to remote: true, because those reach the real deployed resource even while the Worker runs locally.

For a deployed Worker the skill only routes: to the Workers observability docs, or, with the Cloudflare MCP server connected, to its search and execute tools against the Workers Observability API, scoped to the account, Worker and time window. The folder also has references/skill-feedback.md for reporting a fault in the skill to Cloudflare.

When to use it, and when not

Use it to find out why a local request fails or what a binding returned, or to seed test data.

It does not set up projects or write tests, and it mentions a cloudflare skill with an observability reference and a Cloudflare MCP server bundled with the author's plugin; neither comes with this folder.

How to run it

The install command below puts the folder in place. Start the dev server as usual, then call the skill:

  • Claude Code: /workers-development, or ask for the skill by name.
  • Codex: $workers-development.
  • Cursor: type / in the Agent chat and pick workers-development.

Example: /workers-development POST /orders returns 500 locally. Use the Local Explorer traces to find which binding call fails.

How it differs from similar skills

Wrangler CLI treats local development as one task among many; this skill inspects what the running Worker did. Log triage reads log files with grep and jq to find the first failure; here the runtime has recorded traces already, and the agent queries them. Sentry issues and events reads production errors from Sentry, which this skill does not touch.

Install

Run one command — it saves SKILL.md and the files it uses into your agent's skills folder. Claude Code and Codex pick up a new skill without a restart; if it does not show up, restart the agent.

Claude Code — macOS, Linux
curl -fsSL --create-dirs -o ~/.claude/skills/workers-development/SKILL.md https://anymodel.org/en/skills/cloudflare/workers-development/SKILL.md -o ~/.claude/skills/workers-development/LICENSE https://anymodel.org/en/skills/cloudflare/workers-development/LICENSE -o ~/.claude/skills/workers-development/references/skill-feedback.md https://anymodel.org/en/skills/cloudflare/workers-development/references/skill-feedback.md
Codex, Cursor — macOS, Linux
curl -fsSL --create-dirs -o ~/.agents/skills/workers-development/SKILL.md https://anymodel.org/en/skills/cloudflare/workers-development/SKILL.md -o ~/.agents/skills/workers-development/LICENSE https://anymodel.org/en/skills/cloudflare/workers-development/LICENSE -o ~/.agents/skills/workers-development/references/skill-feedback.md https://anymodel.org/en/skills/cloudflare/workers-development/references/skill-feedback.md
Claude Code — Windows PowerShell
foreach ($f in 'SKILL.md','LICENSE','references/skill-feedback.md') { $p = Join-Path "$HOME\.claude\skills\workers-development" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/cloudflare/workers-development/$f" -UseBasicParsing -OutFile $p }
Codex, Cursor — Windows PowerShell
foreach ($f in 'SKILL.md','LICENSE','references/skill-feedback.md') { $p = Join-Path "$HOME\.agents\skills\workers-development" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/cloudflare/workers-development/$f" -UseBasicParsing -OutFile $p }

Any other agent: save the file into its skills folder, or give it the link to the file: https://anymodel.org/en/skills/cloudflare/workers-development/SKILL.md

SKILL.md

Raw

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.

Need Tools and discovery
Run locally Use 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 data Local 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 requests Local Explorer captures traces and logs from every local invocation, including binding operations, without code changes. Check traces before adding logging.
Debug a deployed Worker Choose 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.

Connect through AnyModel API

This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.

More from the pack Cloudflare skills

Cloudflare Workers best practices

Checks Cloudflare Workers code and config against production rules: current compatibility dates, logs and traces, streaming, waitUntil, bindings over REST calls, Web Crypto, generated Env types. Use when writing, reviewing or shipping a Worker.

Wrangler CLI

Guides Wrangler commands and config in projects with wrangler.jsonc or wrangler.toml, checking installed help and current docs and guarding secrets, environments and Previews. Use when deploying, configuring or debugging a Worker with Wrangler.

Cloudflare Durable Objects

Builds and reviews Cloudflare Durable Objects: one object per entity, SQLite storage and migrations, RPC methods, alarms, WebSockets and Vitest tests, with links to current docs. Use when a Workers app needs shared state or coordination.

Cloudflare Agents SDK

Builds and reviews apps on Cloudflare's Agents SDK: stateful agents on Durable Objects, callable RPC, scheduling, queues, Workflows, AIChatAgent chat, MCP and email. Use when building an AI agent or chat app on Workers.

Web frameworks on Cloudflare Workers

Sets up Astro, SvelteKit, React Router, TanStack Start, Nuxt, Hono and SPA apps on Cloudflare Workers, choosing C3, Wrangler or cf by the project's state. Use when creating, migrating or deploying a framework app on Workers.

Cloudflare cf CLI

Finds and runs commands of Cloudflare's beta cf CLI through cf cli search, cf schema and dry runs, and picks cf or Wrangler per project. Use when managing DNS, zones, D1, KV or R2 from the terminal or starting a new Workers project.

Web performance audit

Audits a web page's loading performance through Chrome DevTools MCP: a trace, Core Web Vitals against thresholds, network, an accessibility snapshot and bundle config, with ranked fixes. Use when a page is slow or its Lighthouse score is low.