$npx -y skills add PramodDutta/qaskills --skill ship-prodUse when deploying qaskills.sh to production, verifying whether a deploy landed, or when a push to main did not show up on the live site, e.g. "deploy", "ship it", "push this live", "is prod updated?", "the site still shows the old version".
| 1 | # Ship Prod |
| 2 | |
| 3 | Deploys COMMITTED HEAD only, to the correct Vercel project, then proves the deploy landed. `git push` to main does not reliably auto-deploy; this skill is the deploy path. |
| 4 | |
| 5 | ## Fixed facts |
| 6 | |
| 7 | - Project: `qaskills.sh`, project ID `prj_rDKli4AyhHoXZXV8NHrs92Ncbf4f`, org `team_DGM6VSs6vhASlhktmHkSqPwn`, account `luckydutta96` |
| 8 | - A decoy project `qaskills` exists WITHOUT the domain. Never deploy there. Never accept interactive "link this directory?" defaults. |
| 9 | - Build command lives in root `vercel.json` (`shared build && web build`); Node must stay 20.x (Neon driver breaks on 24) |
| 10 | - `vercel --prod` uploads the WORKING TREE, not git HEAD |
| 11 | - `.vercel/project.json` is gitignored, so fresh worktrees are unlinked: explicit env IDs required there |
| 12 | |
| 13 | ## Preflight |
| 14 | |
| 15 | ```bash |
| 16 | cd /Users/promode/qaskills |
| 17 | vercel whoami # must be luckydutta96; else STOP, user must vercel login |
| 18 | git status --short # empty => clean path; anything => worktree path |
| 19 | git log -1 --oneline --stat | head -15 # confirm HEAD is exactly what you intend to ship |
| 20 | pnpm --filter @qaskills/shared build && pnpm --filter @qaskills/web build # never ship a red build |
| 21 | ``` |
| 22 | |
| 23 | ## Deploy |
| 24 | |
| 25 | **Clean tree** (no modified or untracked files that could ship): |
| 26 | |
| 27 | ```bash |
| 28 | cd /Users/promode/qaskills && npx vercel --prod --yes |
| 29 | ``` |
| 30 | |
| 31 | **Dirty tree** (default assumption; the working tree here usually carries WIP): |
| 32 | |
| 33 | ```bash |
| 34 | DEPLOY_DIR=$(mktemp -d)/qaskills-deploy |
| 35 | git -C /Users/promode/qaskills worktree add "$DEPLOY_DIR" HEAD |
| 36 | cd "$DEPLOY_DIR" |
| 37 | VERCEL_ORG_ID=team_DGM6VSs6vhASlhktmHkSqPwn \ |
| 38 | VERCEL_PROJECT_ID=prj_rDKli4AyhHoXZXV8NHrs92Ncbf4f \ |
| 39 | npx vercel --prod --yes |
| 40 | cd /Users/promode/qaskills |
| 41 | git worktree remove "$DEPLOY_DIR" --force |
| 42 | ``` |
| 43 | |
| 44 | Capture the deployment URL the CLI prints; it goes in the final summary. |
| 45 | |
| 46 | ## Verify (required, every deploy) |
| 47 | |
| 48 | ```bash |
| 49 | npx vercel ls | head -5 # newest deployment: Ready, Production |
| 50 | curl -s -o /dev/null -w '%{http_code}\n' https://qaskills.sh # 200 |
| 51 | # The specific change, visible live. Examples: |
| 52 | curl -s -o /dev/null -w '%{http_code}\n' https://qaskills.sh/blog/<new-slug> # new article: 200 |
| 53 | curl -s https://qaskills.sh/<changed-page> | grep -c '<expected-marker>' # code change: >= 1 |
| 54 | ``` |
| 55 | |
| 56 | All three must pass before saying "deployed". If the domain still serves old content while the new deployment is Ready, the alias did not move: `npx vercel promote <deployment-url>`. |
| 57 | |
| 58 | ## Rollback |
| 59 | |
| 60 | ```bash |
| 61 | npx vercel ls # find the previous Ready production deployment |
| 62 | npx vercel promote <previous-url> # fast path: point the domain back |
| 63 | ``` |
| 64 | |
| 65 | For a code-level revert, `git revert <sha>` on main, then run this skill again. |
| 66 | |
| 67 | ## Failure modes |
| 68 | |
| 69 | | Symptom | Cause | Fix | |
| 70 | |---|---|---| |
| 71 | | CLI asks to link / offers project `qaskills` | Unlinked dir, interactive defaults | Abort; re-run with both VERCEL_* env vars set | |
| 72 | | `Error: not authorized` / wrong scope | Logged into another account | `vercel whoami`; user runs `vercel login` as luckydutta96 | |
| 73 | | Vercel build fails, local build green | Env-dependent code at import time | Lazy-init pattern (see CLAUDE.md); no secrets required at build | |
| 74 | | Deploy Ready but site unchanged | Domain alias on older deployment, or you shipped stale HEAD | `vercel promote`; confirm intended commit was in HEAD | |
| 75 | | WIP appeared on prod | Deployed dirty working tree directly | Roll back via promote, then redeploy via worktree | |
| 76 | |
| 77 | ## Red flags |
| 78 | |
| 79 | - "The push probably triggered a deploy" |
| 80 | - Deploying from a dirty root without the worktree |
| 81 | - Answering Vercel's interactive prompts with defaults |
| 82 | - Declaring success without the three verification commands' output |
| 83 | - Touching Vercel project settings (Node version, env vars, domains) without user approval |