Agent skill · software engineering · secondsky

cloudflare-workers-dev-experience

Cloudflare Workers local development with Wrangler, Miniflare, hot reload, debugging. Use for project setup, wrangler.jsonc configuration, or encountering local dev, HMR, binding simulation errors.

Why this skill is useful

Provides specific commands and configurations for local development with Cloudflare Workers that the AI wouldn't reliably generate on its own.

What it needs

Requires bun installed locally. About 3k tokens when loaded. Last updated 2026-08-06. 204 stars on the source repository.

What this skill does

Cloudflare Workers Developer Experience Local development setup with Wrangler, Miniflare, and modern tooling. Quick Start Secure Installation Scaffolding tools like bunx create-cloudflare download and execute remote code. Before running, follow supply chain security best practices: Block post-install scripts — npm config set ignore-scripts true (or Bun: disabled by default) Cooldown period — Wait 7 days for new package versions to be vetted by the community Audit before installing — Run socket package score npm <pkg> or use socket npm install <pkg> to check packages Load the dependency-upgrade skill for full security configuration including Socket CLI integration, cooldown setup, lockfile validation, and CI enforcement. Essential wrangler.jsonc Critical Rules 1. Always use wrangler dev for local testing - Simulates Cloudflare runtime accurately 2. Set compatibilitydate - Controls runtime behavior, update quarterly 3. Use preview IDs for local dev - Separate from production bindings 4. Configure TypeScript properly - Use @cloudflare/workers-types 5. Enable source maps - Better error stacks in development Top 6 Errors Prevented Error Symptom Prevention ------- --------- ------------ Module not found Import errors on deploy Set "moduleResolution": "bundler" in tsconfig Binding undefined env.KV is undefined locally Add previewid to KV namespace config HMR not working Changes not reflecting Check port conflicts, use --local flag D1 schema mismatch Queries fail locally Run migrations on local DB Type errors Missing binding types Generate types with wrangler types CORS issues Browser blocking requests Add CORS headers in dev handler Local Development Workflow TypeScript Configuration tsconfig.json: Package.json Scripts Debugging Console Logging Using wrangler tail VS Code Debugging .vscode/launch.json: When to Load References Load specific references based on the task: Setting up project? → Load references/local-development.md for complete setup guide Configuring wrangler? …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills secondsky/cloudflare-workers-dev-experience

View the source on GitHub

Browse the @skills marketplace