Deploy

From curiositech/windags-skills · View interactive version

Deploy is an AI agent skill from the GitHub repository curiositech/windags-skills. Cloudflare Pages and Workers deployment checklist for wrangler deploys, secret audits, D1 migrations, Worker-compatible SDK checks, and browser-auth verification. Use when shipping Cloudflare changes to production. NOT for general CI/CD architecture, non-Cloudflare deployments, or post-launch UX QA.

How to use this skill

Skill file

Cloudflare Deploy Checklist

Run this checklist before every deployment. Each step catches a specific class of failure that has burned us before.

When to Use

NOT for

The Checklist

  1. Type-check: npx tsc --noEmit — fix ALL type errors before proceeding
  2. Build locally: npm run build — confirm clean build with zero warnings
  3. Check env vars: Verify all required env vars/secrets are set in the Cloudflare dashboard (not just .env.local)
  4. D1 migrations: If using D1, run wrangler d1 migrations apply <DB> --remote — local-only migrations don't exist in production
  5. SDK check: If using Stripe, use raw fetch(), NOT the Stripe SDK (it hangs on Workers due to Node.js dependencies)
  6. Deploy: npx wrangler pages deploy or npm run pages:deploy
  7. Verify: Hit the live URL, confirm 200 response
  8. Auth test: Test authenticated flows in a browser, not curl — curl doesn't carry session cookies

Common Failures

| Failure | Symptom | Fix |

|---------|---------|-----|

| Missing secret | ReferenceError: X is not defined in production | Set in Cloudflare dashboard > Settings > Variables |

| Local-only D1 | Queries fail with "table not found" | wrangler d1 migrations apply DB --remote |

| Stripe SDK hang | Worker times out on checkout | Replace new Stripe() with raw fetch('https://api.stripe.com/...') |

| Stale build | Old code deployed | Clear dist/ and rebuild: rm -rf dist && npm run build |

| CORS error | Browser blocked by CORS | Check Access-Control-Allow-Origin header in Worker response |

Decision Points

flowchart TD
  A[Incoming request for Cloudflare Deploy Checklist] --> B{Within this skill's scope?}
  B -->|No| C[Redirect using NOT-for boundaries]
  B -->|Yes| D[Assess inputs, constraints, and current state]
  D --> E{Which path fits best?}
  E -->|Plan or design| F[Choose the simplest viable pattern]
  E -->|Migration or change| G[Protect compatibility and rollout safety]
  E -->|Debug or evaluate| H[Localize the failing boundary first]
  F --> I[Apply the domain-specific guidance below]
  G --> I
  H --> I
  I --> J[Validate against the quality gates]

Use this as the first-pass routing model:

Failure Modes

Anti-Patterns

Worked Examples

Quality Gates

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.