workers-best-practices

Review Cloudflare Workers code and wrangler configuration against production best practices.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/Rayzerrek/dotfiles --skill workers-best-practices-rayzerrek
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workers-best-practices
Source: https://github.com/Rayzerrek/dotfiles/tree/main/.pi/agent/skills/workers-best-practices
Command: npx skills add https://github.com/Rayzerrek/dotfiles --skill workers-best-practices-rayzerrek

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you write and review Cloudflare Workers code with current best practices so you can avoid outdated APIs, binding mistakes, memory issues, and security bugs.

Core Features & Use Cases

  • Production Code Review: Check Workers handlers, Durable Object patterns, bindings, and error handling for correctness and safety.
  • Config Validation: Validate wrangler configuration, compatibility dates, observability, secrets, and nodejs_compat usage.
  • Best-Practice Guidance: Flag anti-patterns such as floating promises, global request state, unsafe crypto, and pass-through error handling.
  • Use Case: A team preparing a new Worker can use this Skill to verify the code, generated types, and config before deployment.

Quick Start

Ask for a Cloudflare Workers review of the attached code and config, and include any concerns about bindings, streaming, secrets, observability, and anti-patterns.

Frequently Asked Questions about workers-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review Cloudflare Workers code for production safety and anti-patterns?

Validate Cloudflare Workers code by checking handlers, Durable Object patterns, and error handling against current best practices to catch outdated APIs, floating promises, and broken configuration. This process ensures your code avoids memory issues and security bugs before deployment.

What are common Cloudflare Workers anti-patterns to check before deployment?

Common Cloudflare Workers anti-patterns include floating promises, global request state, unsafe crypto, and pass-through error handling. Checking for these risky patterns during code review prevents memory issues and security bugs in production.

How do I validate wrangler.jsonc configuration and bindings for Cloudflare Workers?

Validate wrangler.jsonc configuration by verifying compatibility dates, observability settings, secrets, nodejs_compat usage, and Env bindings. Accurate wrangler schema validation confirms your handler signatures and configuration are correct for production.

Does my Cloudflare Workers project need generated type information for code review?

Your Cloudflare Workers project needs generated type information and up-to-date Cloudflare docs to accurately verify Env bindings and handler signatures during code review. This ensures the review catches binding mistakes and outdated APIs effectively.

Why does my Cloudflare Workers code review fail to catch binding mistakes?

Cloudflare Workers code reviews fail to catch binding mistakes when lacking up-to-date Cloudflare docs and wrangler schema validation. Accurately verifying Env bindings requires current generated type information to identify outdated APIs and broken configuration.