Agent skill · Documentation

workers-best-practices

Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

Cloudflare18,481★ · +13/wk · 4 repos on radarProfile →
claude-codeApache-2.0
Install
npx skills add cloudflare/skills --skill workers-best-practices --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 7 KB
Bundled scripts: none
Path: skills/workers-best-practices/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 2,539
Language: Shell
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

Your knowledge of Cloudflare Workers APIs, types, and configuration may be outdated. **Prefer retrieval over pre-training** for any Workers code task — writing or reviewing. ## Retrieval Sources Fetch the **latest** versions before writing or reviewing Workers code. Do not rely on baked-in knowledge for API signatures, config fields, or binding shapes. | Source | How to retrieve | Use for | |--------|----------------|---------| | Workers best practices | Fetch `https://developers.cloudflare.com/workers/best-practices/workers-best-practices/` | Canonical rules, patterns, anti-patterns | | Workers types | See `references/review.md` for retrieval steps | API signatures, handler types, binding types | | Wrangler config schema | `node_modules/wrangler/config-schema.json` | Config fields, binding shapes, allowed values | | Cloudflare docs | Search tool or `https://developers.cloudflare.com/workers/` | API reference, compatibility dates/flags | ## FIRST: Fetch Latest References Before reviewing or writing Workers code, retrieve the current best practices page and relevant type definitions. If the project's `node_modules` has an older version, **prefer the latest published version**. ```ba

What's inside
Steps it walks through
  1. Retrieval Sources
  2. FIRST: Fetch Latest References
  3. Reference Documentation
  4. Rules Quick Reference
  5. Configuration
  6. Request & Response Handling
  7. Architecture
  8. Observability
  9. Code Patterns
  10. Security
  11. Anti-Patterns to Flag
  12. Review Workflow
  13. Scope
  14. Principles
Ships with 2 files
  • references/review.md
  • references/rules.md
Commands it runs
Fetch latest workers types
mkdir -p /tmp/workers-types-latest && \
npm pack @cloudflare/workers-types --pack-destination /tmp/workers-types-latest && \
tar -xzf /tmp/workers-types-latest/cloudflare-workers-types-*.tgz -C /tmp/workers-types-latest
Types at /tmp/workers-types-latest/package/index.d.ts
More from skills
All skills →
About this skill
What does the workers-best-practices skill do?

Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

How do I install it?

Run `npx skills add cloudflare/skills --skill workers-best-practices --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From cloudflare/skills, a repository with 2,539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going