workers-best-practices
Skill by cloudflare
Gives an AI assistant Cloudflare Workers best practices for writing, reviewing, and configuring Workers. It is aimed at developers building production Workers applications.
Install workers-best-practices
Built from the published package, never by AI.
git clone --depth 1 https://github.com/cloudflare/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/workers-best-practices ~/.claude/skills/workers-best-practicesRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/cloudflare/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/skills/workers-best-practices ~/.gemini/antigravity-cli/skills/workers-best-practicesAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install workers-best-practices in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
The workers-best-practices skill gives an AI assistant guidance for writing, reviewing, and configuring Cloudflare Workers. It tells the assistant to prefer retrieving current Cloudflare documentation over its training data, and to use the project's installed versions, generated types, and Wrangler compatibility settings as the baseline. It links to reference files on configuration and observability, runtime patterns, and platform API checks.
The skill lists anti-patterns to flag in reviews, such as unbounded buffering, hardcoded secrets, Math.random() for tokens, and unawaited async work. It recommends enabling Workers Logs and Traces for production, and explicit placement for Workers that make multiple sequential queries to one regional database. It is intended for developers building production applications on Cloudflare Workers.
Written from the project's SKILL.md and checked against it.
What it can do
- Keep compatibility dates currentAdvises using today's date for new Workers and reviewing compatibility changes for existing ones.
- Enable observabilityRecommends turning on Workers Logs and Traces when preparing a Worker for production.
- Place compute near regional databasesSuggests explicit placement matching the database's provider and region for sequential queries.
- Flag anti-patternsLists common Workers mistakes to catch in code review, such as hardcoded secrets and Math.random() for tokens.
- Check platform API usagePoints to reference checks for handler signatures, platform classes, binding access, and serialization.
- Validate changesAdvises running the project's existing type checks and runtime tests for affected Workers behavior.
What you need
- A Cloudflare Workers project
- Wrangler configuration
Try asking
- Review this Worker for the anti-patterns in the Workers best practices
- Check my wrangler config for compatibility dates and observability settings
- Help me set up Workers Logs and Traces before I deploy to production
Good to know
- Guidance only. The skill covers Workers-specific practices and code review.
- Durable Objects and Workflows are outside its scope and are referred to other resources.
- Tells the assistant to verify claims against current Cloudflare docs rather than relying on built-in knowledge.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/workers-best-practices/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md6 KB -
references/configuration.md7 KB -
references/platform-apis.md4 KB -
references/runtime-patterns.md14 KB -
references/skill-feedback.md3 KB
Alternatives to workers-best-practices
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
workers-best-practices: common questions
Does this skill cover Durable Objects?
No. The source says Durable Objects are covered by the separate durable-objects skill.
Why does the skill say to retrieve docs instead of relying on training data?
The source states that knowledge of Workers APIs, types, and configuration may be outdated, so retrieval is preferred when writing or reviewing code.
What does the skill do about hardcoded secrets?
It flags hardcoded secrets in source or config as a leak risk and recommends using Wrangler secrets instead.
How do I install workers-best-practices?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is workers-best-practices free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is workers-best-practices safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to workers-best-practices?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
