workers-best-practices

Review Cloudflare Workers code against production best practices.

Updated Dec 17, 2024
One-click install
npx skills add https://github.com/LAF-US/IDAHO-VAULT --skill workers-best-practices-laf-us
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: workers-best-practices
Source: https://github.com/LAF-US/IDAHO-VAULT/tree/main/.codex/plugins/cache/openai-curated/cloudflare/314574a046f21938025ae443f9c6dbbd0c2c9b7a/skills/workers-best-practices
Command: npx skills add https://github.com/LAF-US/IDAHO-VAULT --skill workers-best-practices-laf-us

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Reviews and enforces production-grade Cloudflare Workers code against best practices. It helps developers write and review Worker scripts, wrangler configurations, and bindings with up-to-date guidance and safety checks.

Core Features & Use Cases

  • Guidance for code reviews and live validation against Workers best practices.
  • Procedures for checking bindings, secrets, and observability configurations.
  • Retrieval-based verification using the latest Cloudflare docs and type definitions to avoid outdated knowledge.

Quick Start

Fetch the latest references and run a production-best-practices review against your Worker project.

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 my Cloudflare Workers code against production best practices?▼

To review Cloudflare Workers code against production best practices, fetch the latest Cloudflare docs and type definitions to validate API usage, configuration fields, and binding shapes. This process audits Worker scripts, wrangler configurations, and observability setups with retrieval-based verification.

What are the best practices for configuring bindings and secrets in Cloudflare Workers?▼

Configuring bindings and secrets in Cloudflare Workers requires validating their shapes against the latest type definitions. A production-grade audit checks your wrangler.jsonc configuration to ensure bindings, secrets, and observability setups align with current Cloudflare documentation and safety standards.

How do I set up observability for my Cloudflare Worker?▼

Observability for a Cloudflare Worker is set up by auditing your wrangler configuration and code against current Cloudflare docs. This verifies that logging, monitoring, and tracing configurations follow production-grade best practices and utilize the correct API usage patterns.

Does this Cloudflare Workers audit work with existing wrangler.jsonc configurations?▼

Yes, this Cloudflare Workers audit works with existing wrangler.jsonc configurations by retrieving the latest documentation to validate your configuration fields. It checks your bindings, secrets, and observability setups to enforce production-grade code standards during reviews.

Why does my Cloudflare Workers code review fail due to outdated API usage?▼

A Cloudflare Workers code review fails due to outdated API usage when validation relies on stale knowledge instead of the latest Cloudflare docs. Retrieving up-to-date type definitions and documentation prevents this by verifying current API usage, binding shapes, and configuration fields.

What's the best way to validate wrangler configuration fields for a Worker project?▼

The best way to validate wrangler configuration fields for a Worker project is using retrieval-based verification against the latest Cloudflare docs. This ensures your wrangler.jsonc fields, bindings, and secrets match current type definitions and production-grade safety checks.