skills/deploy/SKILL.md
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.
npx skillsauth add curiositech/windags-skills deployInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run this checklist before every deployment. Each step catches a specific class of failure that has burned us before.
npx tsc --noEmit — fix ALL type errors before proceedingnpm run build — confirm clean build with zero warningswrangler d1 migrations apply <DB> --remote — local-only migrations don't exist in productionfetch(), NOT the Stripe SDK (it hangs on Workers due to Node.js dependencies)npx wrangler pages deploy or npm run pages:deploy| 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 |
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:
.env.local coverage means production secrets are configured in Cloudflarecurl success as sufficient proof that browser-authenticated flows still workdata-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.