Cloudflare Workers Best Practices

•
2.1k
•

Reviews and authors Cloudflare Workers code, configurations, and bindings against production-ready development standards.

Accelerate and secure your edge development with this specialized skill designed for writing and reviewing Cloudflare Workers. It systematically audits your TypeScript code, wrangler.jsonc configurations, and resource bindings against the latest official Cloudflare documentation. The skill helps you prevent common serverless pitfalls like memory exhaustion, global state leaks, timing side-channels, and unhandled floating promises, ensuring your edge deployments are highly performant and secure.

主な機能

01Validates wrangler.jsonc configuration settings like compatibility dates, observability, and Node.js compatibility.
02Retrieves and validates code against the latest Cloudflare API types and developer schemas dynamically.
03Optimizes request handling with streaming support, structured JSON logging, and proper context waitUntil handling.
04Identifies critical worker anti-patterns, including global state leaks and unawaited floating promises.
052,089 GitHub stars
06Enforces secure practices such as cryptographic timing-safe comparisons, Web Crypto APIs, and secret binding patterns.

ユースケース

01Auditing and optimizing wrangler configuration files for compatibility, service bindings, and observability.
02Performing automated code reviews on existing serverless functions to eliminate performance and security risks.
03Writing high-performance, production-ready Cloudflare Workers from scratch using current platform types.