Kipt

Cloudflare Workers skill: workers-best-practices for coding agents

The Cloudflare Workers skill makes your agent check current docs and flag 15 Workers anti-patterns, from floating promises to leaked secrets. How to install it.

By the Kipt team · Updated 24 October 2026

Source: cloudflare/skills · Maintainer: Cloudflare · License: Apache-2.0 · Checked: 24 October 2026

What is the Cloudflare Workers skill?

The Cloudflare Workers skill is workers-best-practices, an official Agent Skill from Cloudflare that makes your coding agent write and review Workers against current documentation and a list of known anti-patterns. Install it with npx skills add https://github.com/cloudflare/skills --skill workers-best-practices or through Cloudflare's Claude Code plugin.

Its SKILL.md description reads: "Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers."

The opening line sets the tone: "Your knowledge of Cloudflare Workers APIs, types, and configuration may be outdated." The skill then tells the agent to "Prefer retrieval over pre-training" and to treat the project's installed versions, generated types and Wrangler compatibility settings as the baseline. As of 24 October 2026, its skills.sh page listed 123.8K installs (snapshot, 24 October 2026), making it one of the three most installed skills in the repo.

What does it do?

The skill loads when you write, review or configure a Worker. Cloudflare's README sums up the repo's behavior: "Skills are contextual and auto-loaded based on your conversation."

The folder holds four files:

  • SKILL.md: the rules, the anti-pattern table, validation and scope.
  • references/configuration.md: compatibility dates, nodejs_compat, generated binding types with wrangler types, secrets with wrangler secret, wrangler.jsonc, and Workers Logs and Traces.
  • references/runtime-patterns.md: streaming bodies, waitUntil, bindings over REST APIs, Queues and Workflows for background work, service bindings, Hyperdrive, global state, platform limits, Web Crypto, and testing with @cloudflare/vitest-pool-workers.
  • references/platform-apis.md: the Env interface, handler and class signatures, binding access, and serialization boundaries.

Three rules stand out in the SKILL.md:

  • Keep compatibility dates current. "Use today's date for new Workers," and review compatibility changes when updating older ones.
  • Turn on observability. Set both observability.enabled and observability.traces.enabled to true. The skill notes that "the top-level setting alone does not enable traces."
  • Flag anti-patterns. It lists 15, each with its consequence and the preferred pattern.

A sample of those anti-patterns:

Anti-pattern What the skill says to do instead
await response.text() on unbounded data Stream large or unbounded bodies
Hardcoded secrets in source or config Use Wrangler secrets
Math.random() for tokens or IDs Use crypto.randomUUID() or crypto.getRandomValues()
Async work not awaited, returned or passed to ctx.waitUntil() Tie it to the request or background lifetime
Module-level mutable request state Pass request state explicitly
REST API calls for things a binding can do Use the binding
Hand-written Env types Generate them with wrangler types
Destructuring const { waitUntil } = ctx Call ctx.waitUntil(...)

When evidence is missing, the skill sends the agent to Cloudflare's Workers best practices page or the Cloudflare docs directory.

Scope is deliberately narrow. For Durable Objects it says to load the durable-objects skill, for Workflows it links Cloudflare's Rules of Workflows, and for CLI commands it points to cf-cli or, in a project with a Wrangler config file, wrangler.

How do you install it?

The README lists several routes. Pick one per agent.

Just this skill, with the skills CLI. This is the command on skills.sh:

npx skills add https://github.com/cloudflare/skills --skill workers-best-practices

Add -g to install for all projects. The folder lands in .claude/skills/workers-best-practices/ in your project, or ~/.claude/skills/workers-best-practices/ globally, the standard Claude Code skill locations. Leave off --skill to choose from the whole repo.

Claude Code plugin (all Cloudflare skills plus the MCP server). From the README:

/plugin marketplace add cloudflare/skills
/plugin install cloudflare@cloudflare

The plugin bundles Cloudflare's main remote MCP server, which the README describes as giving access to "the Cloudflare API and current developer documentation."

Codex plugin.

codex plugin marketplace add cloudflare/skills
codex plugin add cloudflare@cloudflare

The README says to start a new Codex session afterward.

Cursor, VS Code and manual copy. Cursor can install from its marketplace or as a remote rule pointing at cloudflare/skills. VS Code with GitHub Copilot installs from source after you enable chat.plugins.enabled. You can also clone the repo and copy the folder into your agent's skills directory. Codex and Cursor read the same SKILL.md format; see Codex skills and Cursor skills.

How do you use it?

Once installed, ask for Workers work in plain words. Example prompts (suggestions, not quotes from the repo):

  • Review src/index.ts for Workers anti-patterns and list each one with the fix.
  • Set up a new Worker that serves JSON from KV, with logs and traces turned on.
  • This Worker sometimes drops analytics events after the response. Find out why.
  • Replace our hand-written Env interface with generated types and fix whatever breaks.
  • Our upload endpoint runs out of memory on big files. Rewrite it to stream.

For validation, the skill asks the agent to "type-check binding or handler contract changes, and run relevant runtime tests for behavior changes," using checks your project already has. It also says "a narrow edit does not require a full Workers audit," so a small fix should not turn into a full review.

Requirements: a Workers project with Wrangler, and network access if you want the agent to fetch Cloudflare docs. There are no API keys in the skill itself.

Tips and limits

  • It expects retrieval. The skill is short on purpose and leans on live docs. An agent with no web access gets the rules and anti-pattern table but not the source pages they link to.
  • Pair it with the right sibling. Commands and deploys belong to the wrangler skill, Durable Objects to durable-objects, and front-end speed to web-perf.
  • No scripts. The folder is Markdown only and writes nothing on its own.
  • Audits. On 24 October 2026, skills.sh showed Pass from Gen Agent Trust Hub, Socket and Snyk.
  • License. Apache-2.0 lets you copy and change it; keep the license and notices when you redistribute.

Save it in your Kipt library

In Kipt, open Skills and paste the skill's GitHub folder link into the import box. Kipt reads the SKILL.md and its references/ files; for a repo with many skills, like this one, it shows a list so you can also pick wrangler or durable-objects. Your skills live in your own private GitHub repo and install into Claude Code or Codex with one command:

npx skills add https://github.com/<you>/<repo>.git --all -g

Kipt is not affiliated with Cloudflare.

Similar skills

Questions

What is the Cloudflare Workers skill?

It is workers-best-practices, an Agent Skill in Cloudflare's official cloudflare/skills repo. It tells your coding agent to check current Cloudflare docs instead of relying on training data, and lists anti-patterns to flag when writing or reviewing Workers code. It is Apache-2.0 licensed.

How do I install the Cloudflare Workers skill?

For just this skill, run npx skills add https://github.com/cloudflare/skills --skill workers-best-practices. In Claude Code you can instead add the marketplace with /plugin marketplace add cloudflare/skills and run /plugin install cloudflare@cloudflare, which installs every Cloudflare skill plus Cloudflare's MCP server.

Is workers-best-practices the same as the wrangler skill?

No. workers-best-practices covers how to write and review Worker code and configuration. The wrangler skill covers deploying and managing Workers, KV, R2, D1 and other resources from the CLI. The Workers skill points the agent to wrangler or cf-cli when a task is about commands.

Does the skill run any code?

No. The folder has a SKILL.md and three Markdown reference files, with no scripts. It asks the agent to run your project's own type checks and tests to validate changes.

Does it work with Codex and Cursor?

Yes. The skill uses the standard SKILL.md format, and the repo README gives install routes for Codex, Cursor, VS Code with GitHub Copilot, and other agents, plus folder paths for a manual copy.

More in Skill directory

All guides

Keep your prompts and skills in one place, in your own GitHub. Install every skill with one command.

Get started

Kipt is an independent product, not affiliated with or endorsed by Anthropic, OpenAI, Cursor or GitHub. Claude, ChatGPT, Codex, Cursor and GitHub are trademarks of their owners.