workers-best-practices

Review Cloudflare Workers code against production best practices and anti-patterns.

132|22|Updated May 24, 2025
One-click install
npx skills add https://github.com/cyanheads/pubmed-mcp-server --skill workers-best-practices-cyanheads
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workers-best-practices
Source: https://github.com/cyanheads/pubmed-mcp-server/tree/main/.agents/skills/cloudflare/workers-best-practices
Command: npx skills add https://github.com/cyanheads/pubmed-mcp-server --skill workers-best-practices-cyanheads

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps development teams ensure their Cloudflare Workers code adheres to production-grade best practices, reducing bugs, security risks, and observability gaps.

Core Features & Use Cases

  • Comprehensive code-review framework for Cloudflare Workers, covering architecture, bindings, security, and observability.
  • Retrieval-backed guidance with latest Cloudflare docs, types, and wrangler schema.
  • On-demand audits of wrangler.jsonc config and bindings for correctness.

Quick Start

Review a sample Worker project against the rules in the guide and generate a prioritized list of 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 audit Cloudflare Workers for security and observability best practices?

Cloudflare Workers best practices are enforced by validating wrangler configs, bindings, architecture, security, and observability setups. The audit checks code against production-grade rules to reduce bugs, security risks, and observability gaps during code reviews or PR checks.

What should I check in a wrangler.jsonc config during a Cloudflare Workers code review?

A wrangler.jsonc config review checks bindings and configuration correctness against the latest schema. The audit validates architecture, security, and observability setups to ensure Cloudflare Workers adhere to production anti-patterns and best practices.

How do I prevent anti-patterns in Cloudflare Workers before deploying to production?

Prevent Cloudflare Workers anti-patterns by running on-demand audits and PR checks against production best practices. This validates wrangler configs, bindings, and observability setups, catching architecture and security issues before deployment.

Can I use this to check my Cloudflare Workers bindings for correctness?

Yes, you can check Cloudflare Workers bindings for correctness. The audit retrieves the latest types and wrangler schema to validate bindings and configuration setups, ensuring alignment with production-grade architecture and security best practices.

What are the limitations of automated best-practices audits for Cloudflare Workers?

Automated Cloudflare Workers best-practices audits are limited to validating wrangler configs, bindings, and observability setups against known rules. They require retrieval of the latest docs for accuracy and do not replace manual review of complex architectural logic.