Workers Best Practices (Cloudflare): a Claude skill for reviewing Workers code
Cloudflare's workers-best-practices skill makes Claude write and review Cloudflare Workers code against current docs and 15 known anti-patterns.
- Installs
- 133.1K
- on skills.sh
- Stars
- 3.2K
- on GitHub
- Files
- 4
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
workers-best-practices is Cloudflare's skill for production Workers code. It tells Claude to look things up in the Cloudflare docs instead of trusting its memory, then check your Worker against a table of 15 anti-patterns such as unbounded response buffering, hardcoded secrets and un-awaited async work.
It loads when you write, review or configure a Worker. It also covers three setup items: keep the compatibility date current, turn on Workers Logs and Traces, and place compute near a regional database. It bundles four reference files (three topic guides and a skill-feedback file) and fetches Cloudflare docs as needed.
Good for
- Developers building or shipping Cloudflare Workers
- Reviewers checking Workers pull requests before production
- Teams setting up logs, traces and database placement for a Worker
Install workers-best-practices
Claude Code
- 1
Copy this prompt.
Install the workers-best-practices skill in Claude Code. Run this command: npx skills add https://github.com/cloudflare/skills --skill workers-best-practices Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.
Sections in SKILL.md
- References
- Keep Compatibility Dates Current
- Enable Observability
- Place Compute Near Regional Databases
- Anti-Patterns to Flag
- Validation
- Scope
- Skill feedback
Key facts
- Author
- Cloudflare
- Skill folder
- skills/workers-best-practices
- skills.sh installs
- 133,066
- Repo stars
- 3,244
- License
- Apache-2.0
- Last repo commit
- 2026-10-31
- Bundled files
- 4 files besides SKILL.md: references/configuration.md, references/platform-apis.md, references/runtime-patterns.md, references/skill-feedback.md
- skills.sh audits
- Gen Agent Trust Hub: pass; Socket: pass; Snyk: pass
What it includes
Use today's date for new Workers; review updates for old ones
Write ·
Keep compatibility dates currentTurn on Workers Logs and Traces before production
Sets observability.enabled and observability.traces.enabled to true, uses structured JSON logs, and flags missing logs or traces during reviews.
Write ·
Enable observabilitySet explicit placement for Workers that make several queries to one regional database
Claude asks for missing location details, keeps existing placement choices, and checks request duration after deploy.
Write ·
Place compute near regional databases15 patterns with the consequence and the preferred fix
Examples: buffering unbounded bodies, hardcoded secrets, Math.random() for tokens, module-level request state, passThroughOnException as error handling, hand-written Env types.
Read ·
Anti-patterns to flagType-check contract changes and run relevant runtime tests
Runs code ·
Validationconfiguration.md, runtime-patterns.md and platform-apis.md
Read ·
Reference files
From the official docs
Permissions
Low risk
The skill can change your Worker configuration, for example logging, traces and placement, which affects what is logged and where the Worker runs. Review the diff before you deploy.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It can change Wrangler settings
Turning on traces or setting placement changes your Worker config. Check the diff and test before deploying.
Feedback can become a public GitHub issue
If you report bad guidance, references/skill-feedback.md has Claude draft an issue for cloudflare/skills and post it with gh only after you see and approve the exact title and body. Issues are public, so decline if the draft touches anything private.
It reads Cloudflare docs from the web
Claude fetches pages from developers.cloudflare.com while it works. No key is needed for that.
Security advisories
No published security advisories as of Nov 2, 2026.
Technical details
| Turning on read-only | No read-only switch. Ask for a review only and no edits. |
|---|---|
| Talks to | developers.cloudflare.com (docs fetched by Claude). github.com/cloudflare/skills (only if you approve a feedback issue) |
| Sign-in and keys | No account or key is named in SKILL.md. |
| Scopes |
|
Questions
What does the workers-best-practices skill do?
It makes Claude check and write Workers code against current Cloudflare docs. It flags 15 anti-patterns and helps set up logs, traces, compatibility dates and database placement.
How do I install workers-best-practices in Claude Code, Claude or Codex?
Use the install box at the top of the page and pick Claude Code, Claude or Codex. Claude Code and Codex read skills from a folder on your machine. In the Claude app you upload the skill folder as a zip.
Does it need an API key or a Cloudflare account?
SKILL.md names no key. It tells Claude to fetch Cloudflare documentation pages, and to use Wrangler secrets instead of hardcoding credentials in your code.
Does it cover Durable Objects?
Not in depth. SKILL.md sends Durable Objects questions to a separate durable-objects skill, Workflows questions to the Cloudflare docs, and CLI questions to the cf-cli or wrangler skills.
Is it safe to use?
It bundles no scripts. It can change your Wrangler config, for example to turn on traces or set placement, so review the diff. Claude fetches Cloudflare docs while it works. A bundled feedback file lets Claude post a public GitHub issue, but only after you approve the exact text.
Why does it keep telling Claude to look things up?
SKILL.md says Claude's knowledge of Workers APIs, types and configuration may be out of date and to prefer retrieval over memory. Your installed versions, generated types and Wrangler settings are the baseline.
Information
updated Nov 2, 2026
- Repository
- cloudflare/skills
- Folder
skills/workers-best-practices
Sources
Docs, issue trackers and discussions this page is built from.
Show all 3Hide
- workers-best-practices SKILL.md · github.com
- workers-best-practices on skills.sh · skills.sh
- workers-best-practices skill-feedback.md · github.com