← ClaudeAtlas

cloudflare-deployment-preflightlisted

Preflight validation for Cloudflare Workers/Pages deployments via Wrangler. Run before any wrangler deploy. Dry-run builds (wrangler deploy --dry-run), gradual rollout via versions upload + deployments, secrets via wrangler secret, D1 migrations (wrangler d1 migrations), account/auth check (wrangler whoami), bindings correctness in wrangler.toml (vars/KV/R2/D1/Durable Objects/Queues), and wrangler tail for logs. Activate when the active cloud is Cloudflare and the user mentions deploying a Worker/Pages, validating wrangler config, gradual rollout, secrets, D1 migrations, bindings, or preparing for wrangler deploy.
eric-sabe/engsys · ★ 1 · DevOps & Infrastructure · score 67
Install: claude install-skill eric-sabe/engsys
# Cloudflare Deployment Preflight The Cloudflare analogue of pre-deploy validation: build and validate locally, confirm the target account and bindings, and stage the rollout *before* you push live, so users don't discover what you could have caught. Works for Workers and Pages (both run on Wrangler). Continue through all steps even if one fails — capture every issue, then fix them in a batch. > Discipline: **batch your fixes.** A Worker `deploy` is global within seconds — there's no > per-region canary by default. Read the whole config, reason about every issue, fix them > all, then deploy once behind a gradual rollout. One staged rollout, not one deploy per > error. ## When to use - Before `wrangler deploy` / `wrangler versions upload` / `wrangler pages deploy`. - When preparing or reviewing `wrangler.toml` (bindings, vars, compatibility settings). - To preview what a deploy will produce (`--dry-run`). - Before running D1 migrations against a production database. - When a deploy "worked locally" but the live Worker errors on a missing binding/secret. ## Step 1 — Confirm the target account & auth Deploying to the wrong account is the most expensive mistake. Wrangler picks up auth from `wrangler login` (OAuth) or a `CLOUDFLARE_API_TOKEN` env var, and the account from `account_id` in `wrangler.toml` or `CLOUDFLARE_ACCOUNT_ID`. ```bash wrangler whoami # who am I, and which account(s) can I deploy to? ``` Confirm the printed account matches the intended one an