skills/deploy-flow/SKILL.md
Deploy code to production via feature branch → test → staging → PR → merge. Use when deploying changes, pushing to production, or when the user says "deploy", "push to prod", "merge to main", "stage this", or "ship it".
npx skillsauth add kennyolofsson23-netizen/claude-code-config deploy-flowInstall 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.
Safe, tested deployment from local to production. Never skip steps.
1. Branch → 2. Test Local → 3. Push → 4. CI Green → 5. Playwright vs Staging → 6. PR → 7. Merge
git checkout -b <branch-name>
# Stage ONLY relevant files — never git add -A
git add <specific-files>
git commit -m "type(scope): description"
Rules:
.env, .pkl, .png, credentials, temp scriptsfeat|fix|refactor|test|docs(scope): lowercase descriptionRun every test suite. If ANY fail, fix before proceeding.
# Backend
pytest backend/tests/ -v --tb=short --cov=backend --cov-report=term
# Frontend unit
pnpm --filter web test
# Lint
ruff check backend/ scripts/
pnpm --filter web lint
# E2E (if dev server available)
pnpm --filter web test:e2e
Gate: 0 failures across all suites. Coverage must meet threshold.
git push -u origin <branch-name>
gh pr checks <pr-number>
# Wait for ALL checks to pass
# If lint fails: fix locally, commit, push
# If tests fail: fix locally, commit, push
# NEVER merge with red CI
Run E2E tests against the Vercel preview or staging URL:
cd apps/web && BASE_URL=<preview-url> npx playwright test e2e/ --project=chromium --reporter=list
Verify:
gh pr create --title "type(scope): description" --body "$(cat <<'EOF'
## Summary
- <bullet points>
## Test plan
- [ ] pytest: X passed, 100% coverage
- [ ] vitest: X passed
- [ ] playwright: X passed
- [ ] Staging E2E verified
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
Only after ALL checks green + staging verified:
gh pr merge <number> --merge --delete-branch
git checkout main && git pull
After merge deploys to production:
# Health check
curl -s https://api.<domain>/health | jq .
# Smoke test production
cd apps/web && BASE_URL=https://<domain> npx playwright test e2e/smoke.spec.ts --project=chromium
# If model was updated: flush Redis cache
curl -X POST https://api.<domain>/api/v1/cache/flush-predictions -H "Authorization: Bearer <admin-token>"
If production breaks after merge:
# Revert the merge commit
git revert HEAD --no-edit
git push origin main
# This triggers a new deploy with the previous code
git push --force to maindevelopment
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
testing
Full QA pass: run all tests, check types, catch regressions, write missing tests. Use when the user says "run tests", "QA", "verify changes", "check for regressions", "test everything", or "make sure it works".
development
Provides guidance for property-based testing across multiple languages and smart contracts. Use when writing tests, reviewing code with serialization/validation/parsing patterns, designing features, or when property-based testing would provide stronger coverage than example-based tests.
development
Initialize a new project with Kenny's universal conventions and stack-appropriate infrastructure. Use this skill whenever: setting up a new project, creating a new repo, scaffolding a new app, starting fresh on a new idea, 'init project', 'new project', 'set up a new app', 'create a project for X', or any variant of starting a new codebase from scratch. Also trigger when the user says 'bootstrap', 'scaffold', or 'kickstart'. This skill ensures every project gets the same quality gates and conventions while adapting infrastructure to the chosen stack.