workers-best-practices

Reviews Cloudflare Workers code for streaming, security, and binding compliance.

7|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/Cobalt-Money/Cobalt --skill workers-best-practices-cobalt-money
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workers-best-practices
Source: https://github.com/Cobalt-Money/Cobalt/tree/main/.agents/skills/workers-best-practices
Command: npx skills add https://github.com/Cobalt-Money/Cobalt --skill workers-best-practices-cobalt-money

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the complexity of maintaining high-performance, secure, and reliable Cloudflare Workers by providing a standardized framework for code reviews and architectural best practices.

Core Features & Use Cases

  • Automated Best Practice Review: Validates code against critical patterns like streaming, proper binding usage, and observability.
  • Security Guardrails: Enforces secure crypto usage and prevents common vulnerabilities like secret leakage or timing side-channels.
  • Use Case: When refactoring a legacy Worker, use this skill to ensure your new implementation correctly uses service bindings, implements structured logging, and avoids floating promises.

Quick Start

Load the workers-best-practices skill to review the current codebase for floating promises and incorrect binding access patterns.

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

Prevent floating promises in Cloudflare Workers by ensuring all asynchronous operations are properly awaited or handled. Code review practices identify these orphaned promises to avoid silent failures and maintain reliable serverless execution.

How do I prevent secret leakage and timing side-channels in serverless code?

Implement structured logging and observability in Cloudflare Workers by validating your code against production standards. This approach ensures consistent telemetry output, enabling effective monitoring and debugging of serverless applications.

Do I need TypeScript type definitions for Cloudflare Workers development?

Refactor legacy Cloudflare Workers by reviewing the codebase for incorrect binding access patterns and floating promises. Apply architectural guidance to correctly use service bindings and implement production-grade standards.

What are common issues when configuring service bindings in Cloudflare Workers?

Common issues include incorrect binding access patterns and floating promises. Validate your Worker configuration against official type definitions and ensure binding consistency to resolve these architectural problems.