workers-best-practices

workers-best-practices is a skill for Claude Code from YuDefine/nuxt-supabase-starter. It costs 72 tokens per session (1,585 once invoked), scanned A, a copy of workers-best-practices, MIT.

A review and writing guide for Cloudflare Workers, which are small programs that run on Cloudflare’s network.

In plain words
What is it for?
It helps write or review Workers code, configure wrangler.jsonc, and check streaming, error handling, secrets, bindings, and observability.
Why use it?
It reduces mistakes caused by outdated Workers APIs or common production problems involving promises, state, secrets, bindings, and monitoring.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit It helps write or review Workers code, configure wrangler.jsonc, and check streaming, error handling, secrets, bindings, and observability.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yudefine/nuxt-supabase-starter/workers-best-practices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add YuDefine/nuxt-supabase-starter --skill workers-best-practices
Clone the repo
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starter

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for workers-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/yudefine/nuxt-supabase-starter/workers-best-practices/github.svg)](https://agentmods.dev/skills/yudefine/nuxt-supabase-starter/workers-best-practices)
Your own site
<a href="https://agentmods.dev/skills/yudefine/nuxt-supabase-starter/workers-best-practices"><img src="https://agentmods.dev/badge/skills/yudefine/nuxt-supabase-starter/workers-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for workers-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/yudefine/nuxt-supabase-starter/workers-best-practices"><img src="https://agentmods.dev/badge/skills/yudefine/nuxt-supabase-starter/workers-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,585 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00072 $0.01585
Opus 5 $0.00036 $0.00792
Sonnet 5 $0.00014 $0.00317
Haiku 4.5 $0.00007 $0.00159

Measured 11d ago against content hash 099432ff265f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

workers-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to workers-best-practices — 135 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

template/.claude/skills/workers-best-practices/SKILL.md · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Your knowledge of Cloudflare Workers APIs, types, and configuration may be outdated. Prefer retrieval over pre-training for any Workers code task — writing or reviewing.

Retrieval Sources

Fetch the latest versions before writing or reviewing Workers code. Do not rely on baked-in knowledge for API signatures, config fields, or binding shapes.

Source How to retrieve Use for
Workers best practices Fetch https://developers.cloudflare.com/workers/best-practices/workers-best-practices/ Canonical rules, patterns, anti-patterns
Workers types See references/review.md for retrieval steps API signatures, handler types, binding types
Wrangler config schema node_modules/wrangler/config-schema.json Config fields, binding shapes, allowed values
Cloudflare docs Search tool or https://developers.cloudflare.com/workers/ API reference, compatibility dates/flags

FIRST: Fetch Latest References

Before reviewing or writing Workers code, retrieve the current best practices page and relevant type definitions. If the project's node_modules has an older version, prefer the latest published version.

# Fetch latest workers types
mkdir -p /tmp/workers-types-latest && \
  npm pack @cloudflare/workers-types --pack-destination /tmp/workers-types-latest && \
  tar -xzf /tmp/workers-types-latest/cloudflare-workers-types-*.tgz -C /tmp/workers-types-latest
# Types at /tmp/workers-types-latest/package/index.d.ts

Reference Documentation

  • references/rules.md — all best practice rules with code examples and anti-patterns
  • references/review.md — type validation, config validation, binding access patterns, review process

Rules Quick Reference

Configuration

Rule Summary
Compatibility date Set compatibility_date to today on new projects; update periodically on existing ones
nodejs_compat Enable the nodejs_compat flag — many libraries depend on Node.js built-ins
wrangler types Run wrangler types to generate Env — never hand-write binding interfaces
Secrets Use wrangler secret put, never hardcode secrets in config or source
wrangler.jsonc Use JSONC config for non-secret settings — newer features are JSON-only

Read the full file on GitHub · 128 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 128 lines · 72 tokens per session scan A 099432ff265f

Subscribe to this mod's changes

workers-best-practices is a skill published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 1,585 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to workers-best-practices, differing in 135 lines, and is treated as a copy.

Related

Other skills, from other repositories

prd-v07-implementation-loop

Execute implementation within EPICs following test-first development, continuous SoT updates, and code traceability during PRD v0.7 Build Execution. Triggers on requests to start building, implement an epic, begin coding, or when user asks "start building", "implement epic", "coding", "development", "build execution"…

mattgierhart/PRD-driven-context-engineering · 113 tokens

prd-v07-test-planning

Define test cases BEFORE implementation, ensuring every API, business rule, and user journey has verifiable acceptance criteria during PRD v0.7 Build Execution. Triggers on requests to define tests, plan test coverage, create test cases, or when user asks "define tests", "test planning", "what to test?", "test cases"…

mattgierhart/PRD-driven-context-engineering · 125 tokens

strict-tdd

Strict RED->GREEN->REFACTOR test-driven development with enforcement. Never write production code before a failing test. Atomic commits per TDD cycle.

a5c-ai/babysitter · 34 tokens

prd-v04-user-journey-mapping

Map user missions from trigger to value moment, organizing features into coherent paths during PRD v0.4 User Journeys. Triggers on requests to map user journeys, define user flows, describe how users accomplish goals, or when user asks "map user journeys", "define user flows", "user missions", "how do users accomplish…

mattgierhart/PRD-driven-context-engineering · 145 tokens

atomic-tdd

Test-first discipline. Auto-triggers on "let's implement X", "add feature Y", "fix bug Z", "write a test for", "implement", "build out", and similar pre-code-change phrases. Iron rule: failing test exists before production code. Skip only for pure docs/config changes with an explicit "skipped because:" note. Explicit…

damusix/atomic-claude · 142 tokens

use-tdd

Implement a requested increment with red-green-refactor. Use when the user types /use-tdd.

blockmatic/basilic · 24 tokens