Cloudflare Workers Deploy
End-to-end workflow for shipping a Worker safely: validate config, check bindings, dry-run deploy, and post-deploy smoke test.
When to activate
- User wants to deploy a Worker, Pages Function, or full-stack app on Cloudflare
- Reviewing
wrangler.jsonc/wrangler.tomlbefore production - Setting up KV, R2, D1, Hyperdrive, Queues, or Durable Objects bindings
- CI/CD pipeline needs a repeatable deploy checklist
Workflow
- Discover — Identify project root, wrangler config, and entry
mainfile. - Preflight — Run
scripts/preflight.shto verify wrangler CLI and required env vars. - Validate — Run
scripts/validate-config.shagainst the config file. - Bindings review — Compare config against
references/bindings-checklist.md. - Template — If starting fresh, copy
assets/wrangler.template.jsoncand adapt. - Dry run —
wrangler deploy --dry-runbefore real deploy. - Deploy —
wrangler deploywith production config when user confirms. - Smoke test — Hit
/healthor documented endpoint; log status and latency.
Progressive disclosure
| Stage | Load |
|---|---|
| Discovery | This file metadata only |
| Activation | Full SKILL.md |
| Execution | scripts + references as needed |
Output template
## Deploy report — {worker-name}
- Config: {path}
- Bindings: KV ✓ R2 ✓ Hyperdrive ✓
- Dry-run: passed
- Deploy URL: https://…
- Smoke test: 200 OK ({ms}ms)
Safety rules
- Never print or commit API tokens,
BETTER_AUTH_SECRET, or database URLs. - Confirm target environment (preview vs production) before deploy.
- Use
--dry-runfirst unless user explicitly skips. - Do not deploy from unreviewed diffs when
validate-config.shfails.
Bundled resources
scripts/preflight.sh— CLI and auth checksscripts/validate-config.sh— JSONC/TOML sanity checksreferences/bindings-checklist.md— binding types and gotchasreferences/deploy-runbook.md— step-by-step runbookassets/wrangler.template.jsonc— starter configplugin.json— Cursor/plugin manifest for bundled context