Agent skill

Workers Best Practices

by swyxio in swyxio/skills

Author or review Cloudflare Workers code for Workers-specific runtime, binding, streaming, concurrency, lifecycle, and configuration mistakes.

MITAuto-check passed

Install Workers Best Practices

skills CLI
$ npx skills add swyxio/skills --skill workers-best-practices -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install swyxio/skills workers-best-practices --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/swyxio/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/workers-best-practices .claude/skills/workers-best-practices && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
workers-best-practices
GitHub stars
176
Token cost
~724 tokens
SKILL.md length
330 words
Files
3 (incl. references)
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Author or review Cloudflare Workers code for Workers-specific runtime, binding, streaming, concurrency, lifecycle, and configuration mistakes.

  • Works in 5 steps: Retrieve only the docs and types… → Verify Wrangler configuration and code… → Trace serialization boundaries, body… → …
  • The user explicitly asks for Workers best-practice review
  • SKILL.md covers Inspect the Workers boundary and Review proportionally
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Workers Best Practices is an agent skill from swyxio/skills. Author or review Cloudflare Workers code for Workers-specific runtime, binding, streaming, concurrency, lifecycle, and configuration mistakes. Use when the user explicitly asks for Workers best-practice review or when implementing a new Worker entrypoint or binding boundary. Do not trigger for generic TypeScript review, ordinary application logic, deployment operations, or product selection.

Its SKILL.md is about 720 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/review.md` and `references/rules.md`).

It works with Cloudflare Workers and TypeScript. The repository describes itself as: Agent skills for Claude Code and other AI agents. The licence is MIT.

When your agent uses it

  • The user explicitly asks for Workers best-practice review
  • Implementing a new Worker entrypoint
  • Binding boundary
  • Generic TypeScript review

Example prompts

  • “/workers-best-practices”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Retrieve only the docs and types relevant to the touched APIs.
  2. Verify Wrangler configuration and code agree.
  3. Trace serialization boundaries, body consumption, and background work.
  4. Run the narrow typecheck, test, lint, or local Worker exercise that can falsify
  5. Report concrete defects with file/line evidence and the smallest correction.

What it can do on your machine

Read from SKILL.md and the folder at commit 038ef34. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Workers Best Practices loads about 724 tokens when it runs, and up to ~6.9k if it reads all its reference files. Until then it costs about 104 tokens; SKILL.md has 330 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~724
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from swyxio/skills at commit 038ef34, republished under its MIT licence (© swyxio). 330 words, ~724 tokens.

Download SKILL.mdSave it as .claude/skills/workers-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
workers-best-practices
description
Author or review Cloudflare Workers code for Workers-specific runtime, binding, streaming, concurrency, lifecycle, and configuration mistakes. Use when the user explicitly asks for Workers best-practice review or when implementing a new Worker entrypoint or binding boundary. Do not trigger for generic TypeScript review, ordinary application logic, deployment operations, or product selection.

Workers Best Practices

Retrieve current Cloudflare docs, installed Workers types, and the project's Wrangler schema before asserting an API signature or configuration rule.

Load references selectively:

  • review.md for a structured Workers review and current type/config retrieval.
  • rules.md for examples of specific runtime patterns.

Inspect the Workers boundary

Read the full affected entrypoint, binding types, Wrangler environment, and the callers of changed handlers. Check only Workers-specific risks supported by the code:

  • binding names and generated types match the selected environment;
  • secrets are not stored in source or ordinary vars;
  • request-scoped mutable state does not leak through module globals;
  • request and response bodies are streamed when their size is not safely bounded;
  • every promise is awaited, returned, deliberately detached with waitUntil, or explicitly discarded when safe;
  • platform base classes use their current inheritance and this.env contract;
  • Cloudflare services use bindings or service bindings when those are the intended application boundary; and
  • cryptographic identifiers and secret comparisons use current Web Crypto APIs.

Do not flag a pattern merely because it differs from a preferred template. Confirm that it is incorrect for the installed types, compatibility date, and runtime path.

When serving static assets or an SPA, trace which requests reach the Worker under the actual assets configuration. Worker middleware may not run for static pages. Check that canonical-host/HTTPS redirects and required origin controls cover the affected pages and APIs; choose routing or edge redirects deliberately rather than defaulting every project to run_worker_first: true.

Review proportionally

  1. Retrieve only the docs and types relevant to the touched APIs.
  2. Verify Wrangler configuration and code agree.
  3. Trace serialization boundaries, body consumption, and background work.
  4. Run the narrow typecheck, test, lint, or local Worker exercise that can falsify the finding.
  5. Report concrete defects with file/line evidence and the smallest correction.

Route Durable Object design to durable-objects, exact CLI work to wrangler, and material production rollout decisions to cloudflare-production-builder. Do not turn a Workers code review into a general architecture or production readiness program.

© swyxio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in workers-best-practices of swyxio/skills.

  • SKILL.md
  • references/review.md
  • references/rules.md

Open the folder on GitHubat commit 038ef34

Compare with similar skills

Workers Best Practices next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Workers Best Practices compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Workers Best Practices this skillswyxio/skills176—~724Automated safety check: PassMIT
Spiceflowremorses/spiceflow167—~1.9kAutomated safety check: PassMIT
Deploycyanfish-x/tellux207—~1.1kAutomated safety check: NotesMIT
Pinme Uniwebpayglitternetwork/pinme3.8k—~7.3kAutomated safety check: PassMIT
Review Logging Patternsactivepieces/activepieces25k—~8.2kAutomated safety check: PassMIT
Writing Unit TestsAsvarox/allkaraoke261—~358Automated safety check: PassNone

Similar skills

  • Spiceflow

    remorses/spiceflow

    Spiceflow is a super simple, fast, and type-safe API and React Server Components framework for TypeScript.

    167 GitHub stars~1.9k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Deploy

    cyanfish-x/tellux

    Deploy tellux examples/docs sites via project scripts — one local command (pnpm run deploy) rclone-syncs to the self-hosted site then Wrangler Direct Uploads to Cloudflare Pages.

    207 GitHub stars~1.1k tokensUpdated 19 days ago
    Game DevelopmentAuto-check: notes
  • Pinme Uniwebpay

    glitternetwork/pinme

    A skill your agent uses when generating, modifying, or reviewing PinMe Worker (Cloudflare Worker TypeScript) code that accepts payments through UniwebPay — payment links, products/prices, checkout…

    3.8k GitHub stars~7.3k tokensUpdated 28 days ago
    Backend & APIsAuto-check passed
  • Review Logging Patterns

    activepieces/activepieces

    Review code for logging patterns and suggest evlog adoption.

    25k GitHub stars~8.2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Writing Unit Tests

    Asvarox/allkaraoke

    A skill your agent uses when Codex updates, fixes, or adds unit tests in this project.

    261 GitHub stars~358 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Hono Idioms

    irahardianto/awesome-agv

    Hono lightweight web framework patterns: type-safe route handlers, middleware composition, Zod validation, and RPC clients for Cloudflare Workers, Node, or Bun.

    156 GitHub stars~3k tokensUpdated 5 days ago
    DevelopmentAuto-check passed

More from swyxio/skills

All 89 skills in this repo
  • Programmatic Agents

    swyxio/skills

    Run a selected coding-agent CLI programmatically, with latency, error, usage, cost, and trace logging.

    176 GitHub stars~2.2k tokensUpdated 5 days ago
    Auto-check passed
  • Design, implement, audit, or refresh protected username and handle namespaces for public products.

    176 GitHub stars~1.1k tokensUpdated 5 days ago
    Auto-check passed
  • New Mac Setup

    swyxio/skills

    Fully automated new Mac setup for fullstack web developers and AI engineers.

    176 GitHub stars~4.3k tokensUpdated 5 days ago
    Auto-check passed
  • Youtube API

    swyxio/skills

    Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info…

    176 GitHub stars~2.2k tokensUpdated 5 days ago
    Auto-check passed
  • Batch YouTube Studio upload workflow for videos sourced from Airtable, Google Drive, Loom, YouTube, or local files.

    176 GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check: warnings
  • Reconstruct and visually analyze paired agent, game, or policy trajectories to determine whether changed actions produced their intended effects.

    176 GitHub stars~1.8k tokensUpdated 5 days ago
    Auto-check passed

Questions about Workers Best Practices

What does Workers Best Practices do?

Author or review Cloudflare Workers code for Workers-specific runtime, binding, streaming, concurrency, lifecycle, and configuration mistakes. Workers Best Practices is an agent skill from swyxio/skills. Author or review Cloudflare Workers code for Workers-specific runtime, binding, streaming, concurrency, lifecycle, and configuration mistakes.

When should I use Workers Best Practices?

Workers Best Practices fits situations like: the user explicitly asks for Workers best-practice review; implementing a new Worker entrypoint; binding boundary; generic TypeScript review.

How do I install Workers Best Practices in Claude Code?

Run `npx skills add swyxio/skills --skill workers-best-practices -a claude-code`. Or copy the skill folder (workers-best-practices in swyxio/skills) into .claude/skills/workers-best-practices in your project. Claude Code loads it when a task matches its description.

How do I install Workers Best Practices in Codex?

Run `npx skills add swyxio/skills --skill workers-best-practices -a codex`. Or copy the skill folder (workers-best-practices in swyxio/skills) into .agents/skills/workers-best-practices in your project. Codex loads it when a task matches its description.

Can I use Workers Best Practices in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add swyxio/skills --skill workers-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/workers-best-practices, .gemini/skills/workers-best-practices, .github/skills/workers-best-practices and .opencode/skills/workers-best-practices in your project.

What does Workers Best Practices need to run?

SKILL.md names no scripts, command-line tools or credentials: Workers Best Practices is instructions for the agent only.

Does Workers Best Practices access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Workers Best Practices safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Workers Best Practices use?

Workers Best Practices is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Workers Best Practices use?

About 724 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.2k tokens, read only when the agent opens those files.

What are the alternatives to Workers Best Practices?

Skills that share tags, products or a category with Workers Best Practices: Spiceflow (remorses/spiceflow, 167 stars), Deploy (cyanfish-x/tellux, 207 stars), Pinme Uniwebpay (glitternetwork/pinme, 3.8k stars) and Review Logging Patterns (activepieces/activepieces, 25k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Workers Best Practices?

swyxio (a GitHub user) maintains it in swyxio/skills, which has 176 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 5, 2026.

Source: swyxio/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.