← Explore all skills

CLOUD DEVELOPMENT / Cloudflare

Cloudflare Workers Best Practices

Reviews Workers code against its configured runtime, focusing on request lifetime, state isolation, streaming and binding contracts.

“Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.”

01 / THE REASONING

Why this made the selection.

  • Uses installed types and compatibility settings instead of assuming the newest package defines the current runtime.
  • Links concrete anti-patterns to their operational consequence and asks for checks relevant to the changed behavior.

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • skills/workers-best-practices/SKILL.md
  • skills/workers-best-practices/references/runtime-patterns.md
  • LICENSE

Our findings

  • The source warns against unbounded response buffering and async work detached from request/background lifetime.
  • It rejects module-level mutable request state and hand-written binding types that can drift from configuration.
  • It distinguishes serialization behavior by API rather than applying one rule to queues, storage and WebSockets.

Not established by this review

  • Source inspection only; no skill installation or workflow execution was performed.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Add a skill to your workflow.

Upstream setup instructions ↗

DOCUMENTED COMMAND

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

Copying does not execute this command. It may retrieve a newer version than the reviewed source.

  1. Install the complete skill directory with its references and helpers; a copied SKILL.md alone may be incomplete.
  2. Choose the intended agent and project scope in the installer, then review its permissions before using the skill.

Before you start

  • Node.js/npm for this installer
  • An agent that supports the Agent Skills format
  • Installed Wrangler types, compatibility configuration and relevant runtime tests

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. https://github.com/cloudflare/skills/blob/b052c32bab7dd493513260228a36c88294f343f1/skills/workers-best-practices/SKILL.md

    Supports: summary, upstreamDescription, whySelected, bestFor, limitations, review, compatibility, access

  2. https://github.com/cloudflare/skills/blob/b052c32bab7dd493513260228a36c88294f343f1/skills/workers-best-practices/references/runtime-patterns.md

    Supports: review, limitations, access

  3. https://github.com/cloudflare/skills/blob/b052c32bab7dd493513260228a36c88294f343f1/LICENSE

    Supports: license

  4. https://github.com/cloudflare/skills/blob/b052c32bab7dd493513260228a36c88294f343f1/README.md

    Supports: install, compatibility, access

  5. https://github.com/vercel-labs/skills/blob/7407f3893ad4dceab546ac002c3ef806e4000c73/README.md

    Supports: install

  6. https://github.com/vercel-labs/skills/blob/7407f3893ad4dceab546ac002c3ef806e4000c73/src/git.ts

    Supports: install