skills/deployment-strategies/SKILL.md
Core Cloudflare Pages/Workers deployment workflow, environment variable configuration, and secrets management. Use when deploying code, configuring environments, or managing secrets.
npx skillsauth add bkinsey808/songshare-effect deployment-strategiesInstall 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.
Requires: file-read, terminal (Wrangler/Cloudflare CLI). No network access needed.
Use this skill when:
Execution workflow:
Output requirements:
Core deployment patterns for SongShare Effect:
npm run deploy, npm run deploy:full (with cache purge)wrangler secret putnpm run dev:all # Frontend: http://localhost:5173 | API: http://localhost:8787
Always run before pushing to production:
npm run lint
npm run test:unit
# Standard deploy
npm run deploy
# Deploy + purge CDN cache (use this for any user-facing change)
npm run deploy:full
# Staging
npm run deploy:staging
Use deploy:full whenever updating UI components, API behavior, or fixing bugs — ensures users see new code immediately rather than cached versions.
# Check API is healthy
curl https://<your-domain>/api/health
# Tail live logs for errors
wrangler tail --env production
Set in .env (dev) or Cloudflare Pages environment (staging/prod):
VITE_API_URL=http://localhost:8787 # Development
VITE_API_URL=https://staging-api.app.com # Staging
VITE_API_URL=https://api.app.com # Production
VITE_SUPABASE_URL=https://project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
Non-secret config in wrangler.toml:
[env.production.vars]
ENVIRONMENT = "production"
SUPABASE_URL = "https://project.supabase.co"
Never commit secrets to git. Use Cloudflare Worker secrets instead:
# Set a secret in production
wrangler secret put SUPABASE_SERVICE_KEY --env production
# (paste value, press Enter)
# List current secrets
wrangler secret list --env production
Local development secrets go in .env files (gitignored).
docs/ai/rules.md.deployment-operations.cloudflare-cache-cicd.tools
Zustand state management patterns for this project — store creation, selectors, Immer middleware, async actions with loading states, devtools, persist, and testing. Use when authoring or editing Zustand stores (use*Store files) or components that subscribe to stores. Do NOT use for React component structure or TypeScript-only utilities.
testing
How to write, update, or split skill files in this repo. Use when creating a new SKILL.md, updating an existing one, or deciding whether to put content in a skill vs. docs/.
development
Complete guide for testing React hooks — renderHook, Documentation by Harness, installStore, fixtures, subscription patterns, lint/compiler traps, and pre-completion checklist. Read docs/testing/unit-test-hook-best-practices.md for the full reference.
development
Vitest unit test authoring for this repo — setup, mocking, API handler testing, and common pitfalls for non-hook code. Use when the user asks to add, update, fix, or review unit tests for utilities, components, API handlers, or scripts. Do NOT use for React hook tests — load unit-test-hook-best-practices instead.