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 withwrangler types, secrets withwrangler 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: theEnvinterface, 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.enabledandobservability.traces.enabledtotrue. 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
wranglerskill, Durable Objects todurable-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
- Cloudflare Agents SDK skill: from the same repo, for stateful agents that run on Workers.
- Web performance skill: Cloudflare's Core Web Vitals audit for the pages your Worker serves.
- Code review skill: a general review pass to run alongside the Workers-specific checks.
- Security hardening skill: broader security rules beyond the Workers anti-patterns.