CodeQL, Semgrep and SARIF static-analysis toolkit from Trail of Bits: taint tracking, fast pattern scans and merged, deduplicated security findings for coding agents.
Workers Best PracticesSkill
Summary
Production review rules for Cloudflare Workers — compatibility dates, observability wiring, and the runtime anti-patterns that only bite at the edge.
Features
- Anti-pattern table pairing each mistake with its runtime consequence
- Catches the traces flag that the top-level observability setting misses
- Keeps compatibility_date current for new and existing Workers
- Retrieval-first: verifies APIs and limits against live docs, not memory
Install This Skill
Add this skill to your favorite AI agent in a few steps.
Skill Content
Description
Workers code that looks correct in review can still fail in production, because the failure modes are runtime-specific: a buffered response body that exhausts an isolate's memory, async work started but never awaited, a compatibility date frozen years in the past. This official Cloudflare skill is the checklist for writing, reviewing and configuring Workers meant to carry real traffic.
It opens with a stance rather than a rule: prefer retrieval over pre-training. The project's installed package versions, generated types and Wrangler compatibility settings are the baseline for existing code, and claims about APIs, limits and runtime behaviour are verified against current Cloudflare documentation instead of recalled. Three reference files carry the detail — configuration and observability, runtime patterns, and platform API checks — and the skill directs the agent to read only the one the task needs.
Two operational defaults are called out. Compatibility dates should be current, set to today's date for new Workers and reviewed periodically for existing ones against the flags they already run under. Observability should be switched on before production: both observability.enabled and observability.traces.enabled, since the top-level setting alone does not turn on traces — a detail that silently costs teams their tracing.
The anti-pattern table is where the skill earns its place in a code review. Unbounded await response.text() buffering should be streaming. Hardcoded secrets belong in Wrangler secrets. Math.random() for security-sensitive tokens or IDs should be crypto.randomUUID() or crypto.getRandomValues(). Each entry pairs the mistake with its consequence and the preferred pattern, so the agent can flag it with a reason attached. Apache-2.0, and the longest-running skill in Cloudflare's collection.
Related Skills
Microsoft's official Playwright skill — drives a real browser from the command line using accessibility snapshots and element refs, and plans, generates and heals Playwright tests.
Google's official agent skill for writing production Maps Platform code — grounded in freshly fetched docs, with a demo key path that needs no billing account.
Railway's official agent skill: create projects, provision databases and buckets, deploy, manage variables and domains, and read build failures back — from the CLI, API or MCP server.