workers-best-practices

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write, review, and configure Cloudflare Workers with current production best practices, reducing bugs, outages, and security mistakes caused by outdated assumptions.

Core Features & Use Cases

  • Best-practice guidance: Applies current Cloudflare recommendations for compatibility dates, Node.js compatibility, observability, secrets, and request handling.
  • Code review support: Flags common Workers anti-patterns such as floating promises, module-level request state, unsafe crypto usage, and misuse of platform classes.
  • Configuration validation: Checks wrangler configuration patterns and binding usage so code and config stay aligned.
  • Use case: A team preparing a Worker for production can use this Skill to review the codebase, catch performance and security issues, and align implementation with Cloudflare’s latest guidance.

Quick Start

Use the workers-best-practices skill to review this Cloudflare Worker for production issues and recommend fixes.

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?

Review Cloudflare Workers code by validating wrangler configuration, checking bindings, and flagging anti-patterns like floating promises or unsafe crypto usage against current production best practices to reduce bugs and security risks.

What are common Cloudflare Workers anti-patterns I should avoid?

Common Cloudflare Workers anti-patterns include floating promises, module-level request state, unsafe crypto usage, and misuse of platform classes. Catching these issues early prevents outages and security mistakes caused by outdated platform assumptions.

How do I validate wrangler configuration for Cloudflare Workers?

Validate wrangler configuration by checking binding usage, secrets, and compatibility dates so code and config stay aligned. This ensures your Worker follows current Cloudflare recommendations for streaming and state management.

Does this approach support Cloudflare Workers observability and secrets management?

Yes, production best practices for Cloudflare Workers include configuring observability, managing secrets securely, and setting compatibility dates. These steps ensure your Worker is production-ready and aligned with Cloudflare's latest guidance.

When do I need to check compatibility dates for Cloudflare Workers?

Check compatibility dates when writing or reviewing Cloudflare Workers to ensure Node.js compatibility and current platform behavior. Outdated compatibility dates cause bugs and security mistakes from deprecated runtime assumptions.

Why does my Cloudflare Worker have floating promises and state management issues?

Floating promises and module-level request state occur when asynchronous operations are unhandled or state persists across requests. Reviewing your Worker code against current best practices flags these anti-patterns and recommends fixes.