workers-best-practices

Review and author Cloudflare Workers code against production best practices.

3|Updated Jul 5, 2021
One-click install
npx skills add https://github.com/iAziz786/dotfiles --skill workers-best-practices-iaziz786
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workers-best-practices
Source: https://github.com/iAziz786/dotfiles/tree/main/.agents/skills/workers-best-practices
Command: npx skills add https://github.com/iAziz786/dotfiles --skill workers-best-practices-iaziz786

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Reviews and authors Cloudflare Workers code against production best practices, helping teams avoid anti-patterns and misconfigurations.

Core Features & Use Cases

  • Provides up-to-date retrieval sources and references for validating Worker APIs, bindings, and Wrangler config.
  • Supports structured review workflows, code examples, and anti-pattern identification.
  • Use cases include code creation, review, and wrangler.jsonc validation.

Quick Start

Review a new or existing Worker against the latest best-practices guidance by loading the references first and applying the rules to your code.

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 best practices?

Reviewing Cloudflare Workers code against production best practices involves checking for common anti-patterns like floating promises, improper global state, and inefficient streaming. It validates Worker APIs, bindings, and Wrangler configuration to ensure type validity and code robustness.

What are common anti-patterns when writing Cloudflare Workers?

Common Cloudflare Workers anti-patterns include floating promises, improper global state usage, inefficient streaming, and incorrect secrets management. Identifying these issues during code creation or review helps avoid misconfigurations and ensures production reliability.

How do I validate wrangler.jsonc configuration for Workers?

Validating wrangler.jsonc configuration requires checking your Wrangler config schemas against updated retrieval sources and references. This ensures correct setup for Worker bindings, secrets, and observability features before deployment.

Does my Cloudflare Worker need special handling for streaming and observability?

Yes, Cloudflare Workers require proper handling for streaming and observability to meet production best practices. Checking your code ensures you avoid anti-patterns and correctly configure observability bindings for monitoring application performance.

What is the best way to manage bindings and secrets in Cloudflare Workers?

Managing bindings and secrets in Cloudflare Workers effectively means validating their configuration against production best practices and updated references. This prevents common anti-patterns and ensures secure, type-valid code.