| name | publish-to-production |
| description | Maximally autonomous production deployment for NowStack - sets up Convex prod, Vercel project, env vars, build command, deploy keys, and triggers first deploy. Use when shipping the app to production for the first time, when re-syncing env vars after env changes, or when the user says "deploy to production", "publish to prod", "ship to prod". |
Publish to Production - NowStack Production Deployment
Set up and deploy the NowStack app to production with the LEAST manual user intervention possible. The skill provisions the Convex production deployment, puts runtime env in Convex, links/configures the Vercel project, sets the Convex-aware build command, keeps only deploy keys in Vercel, and kicks off the first production deploy. After deploy, it walks the user through the small set of things that genuinely cannot be automated (OAuth callback URLs, Stripe live keys, custom domain).
<when_to_use>
Use this workflow when:
- Shipping the NowStack app to production for the first time
- Migrating from a working dev setup (
.env.local + Convex dev) to a clean production deploy
- Re-syncing env vars from the local env to Convex prod after key rotation
- The user types
/publish-to-production or asks to "deploy to prod", "ship to production", "publish the app"
Do NOT use this for:
- Routine pushes to an already-set-up production (just
git push triggers Vercel)
- Setting up a fresh dev environment (use
/init-project instead)
- One-off env var changes (just run
npx convex env set --prod KEY value directly)
</when_to_use>
**No arguments** - This workflow is interactive but autonomous. It will:
- Auto-detect existing Convex / Vercel / .vercel / .env.local state
- Read local dev env vars and propose them as prod values (the user confirms or overrides)
- Only ask the user for values that genuinely change between dev and prod (live Stripe keys, prod domain, OAuth callback updates)
- **Mirror, don't reinvent.** For most env vars, the prod value is identical to the local dev value. Read `.env` / `.env.local`, propose, confirm. Only ask the user to provide a new value when prod genuinely differs (live Stripe keys, prod domain, prod OAuth client).
- **Echo what you're about to do BEFORE doing it.** Print the command. Run it. Print the result. Never silently mutate cloud state.
- **Idempotent by construction.** If Convex prod is already created, skip creation. If Vercel already has the right framework preset and build command, skip. Use `pnpm vercel:setup-convex-env` to prune stale Vercel vars and preserve only deploy keys. Re-runs of this skill should be safe.
- **Stop on failure.** If `npx convex env set --prod` fails for any var, stop immediately. Don't attempt the Vercel step with a broken Convex prod.
- **Never log secret values to the terminal.** When echoing what's set, mask values like `sk_live_***...***1234`.