workers-best-practices

Reviews Cloudflare Workers code and configuration for compliance with best practices and wrangler schema validation.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/kage1020/dotfiles --skill workers-best-practices-kage1020
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workers-best-practices
Source: https://github.com/kage1020/dotfiles/tree/main/dot_claude/skills/workers-best-practices
Command: npx skills add https://github.com/kage1020/dotfiles --skill workers-best-practices-kage1020

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

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.

Core Features & Use Cases

  • Retrieval-driven guidelines for code, configuration, and observability.
  • Structured review workflow checks for bindings, streaming, and error handling.
  • Guidance across Wrangler config schemas and Worker types to ensure correct usage.

Quick Start

Review a sample Worker script against the latest best-practices docs to surface issues and recommended fixes.

Frequently Asked Questions about workers-best-practices

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

FAQPage Schema
What are the best practices for writing Cloudflare Workers code?

Cloudflare Workers best practices involve proper handling of bindings, streaming responses, avoiding global state, and ensuring correct secrets management. This Skill reviews your code against the latest documentation to enforce these production standards.

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

Validate wrangler.jsonc configuration by checking it against the latest Wrangler config schema and Worker types. This Skill retrieves current schema definitions to ensure your bindings and environment configurations are correctly structured.

How do I check my Cloudflare Workers script for common anti-patterns?

Check Workers scripts for anti-patterns like floating promises, improper streaming, and global state usage. This Skill analyzes your code against current Cloudflare guidelines to surface issues and recommend necessary fixes.

Does this code review tool use pre-trained knowledge or live Cloudflare docs?

This code review tool biases towards retrieval from live Cloudflare documentation rather than pre-trained knowledge. It fetches the latest best-practices pages, Worker types, and wrangler config schemas to guide accurate validation.

What should I check when reviewing a Cloudflare Workers pull request?

When reviewing a Cloudflare Workers pull request, check for correct bindings usage, streaming implementations, and error handling. This Skill provides a structured review workflow to ensure compliance with observability and security standards.

Can I use this for new Cloudflare Worker development or only for code review?

You can use this for both new Cloudflare Worker development and code review. It provides retrieval-driven guidelines for authoring code, configuring wrangler.jsonc, and remediating anti-patterns during the initial build phase.