Cloudflare/workers-best-practices — Agent Skills | officialskills.sh
Back to skills

workers-best-practices

Reviews and authors Cloudflare Workers code against production best practices, including wrangler.jsonc and common anti-patterns.

Setup & Installation

npx skills add https://github.com/cloudflare/skills --skill workers-best-practices
or paste the link and ask your coding assistant to install it
https://github.com/cloudflare/skills/tree/main/skills/workers-best-practices
View on GitHub

What This Skill Does

A guide for writing and reviewing Cloudflare Workers code against production best practices — streaming, floating promises, global state, secrets, bindings, observability, and wrangler.jsonc configuration. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

Workers has runtime-specific pitfalls that look fine in standard Node.js code but fail at the edge — this skill encodes the current, validated anti-patterns and fixes so reviews and new code avoid them.

When to use it

  • Reviewing a Worker PR for floating promises or missing streaming
  • Refactoring a Worker that caches data in module-level globals
  • Auditing a wrangler.jsonc for misconfigured bindings or observability gaps
  • Teaching a team the Workers-specific anti-patterns to avoid
  • Verifying a new Worker follows current Cloudflare-recommended patterns