deployment-vercel-production
Skill2 starsChanged 4 months agoMITView on GitHub
Deploy Next.js/full-stack apps to production on Vercel — environment configuration, preview deployments, custom domains, edge/serverless function considerations, and production readiness checks. Use whenever the user asks to deploy, sets up CI/CD, configures environments/env vars, or asks "is this ready for production".
In this repository22 other files it gives its agents.
- accessibility-a11ySkill
- design-system-tailwindSkill
- motion-design-toolkitSkill
- nextjs-architectureSkill
- react-component-engineeringSkill
- react-three-fiber-3dSkill
- responsive-mobile-firstSkill
- auth-authorizationSkill
- database-schema-designSkill
- form-validation-error-handlingSkill
- mern-stack-architectureSkill
- rest-api-integrationSkill
- state-managementSkill
- landing-page-conversionSkill
- payment-gateway-integrationSkill
- saas-dashboard-adminSkill
- startup-mvp-developmentSkill
- ux-research-flow-designSkill
- visual-design-languageSkill
- ai-assisted-frontend-workflowSkill
- performance-seo-optimizationSkill
- project-architecture-clean-codeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Cold starts: keep serverless function bundle size lean (avoid bundling heavy unused dependencies) to minimize cold-start latency on …
- Distinctive: line 25
Edge vs Node runtime: use the Edge runtime only for latency-sensitive, lightweight logic (auth checks, redirects, geolocation-based …
- Very specific: line 29
Run next build locally (or in CI) before assuming a deploy will succeed — type errors and dynamic-rendering issues sometimes only surface …
- Distinctive: line 36
No error tracking, meaning production bugs are only discovered via user reports
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Production & Vercel Deployment Skill
Environment strategy
- Three environments minimum: Development (local), Preview (auto-deployed per PR/branch on Vercel), Production (main branch).
- Environment variables scoped per environment in Vercel's dashboard — never share production secrets (payment keys, DB URLs) into Preview; use test/sandbox credentials for Preview so PR previews can't touch real customer data.
- Validate required env vars at build/boot time with a schema (
config/env.ts+ zod) — fail loudly at build time, not with a runtime crash in production.
Pre-launch production readiness checklist
- All secrets in environment variables, none hardcoded or committed
- Error tracking configured (Sentry or similar) and verified to actually capture a test error
- Database connection pooling configured correctly for serverless (see note below)
- Custom domain + SSL configured,
wwwvs apex redirect decided and consistent robots.txt/sitemap configured correctly (don't accidentally block indexing on production while it was fine to block on preview)- Payment webhooks pointed at the production URL with production signing secrets (see
payment-gateway-integrationskill) - Rate limiting / abuse protection on public API routes and auth endpoints
Serverless/edge considerations
- DB connections: serverless functions can exhaust a traditional DB connection pool under load — use a pooler (Prisma Accelerate, PgBouncer, or the DB provider's serverless-aware connection mode) rather than a plain long-lived pool per invocation.
- Cold starts: keep serverless function bundle size lean (avoid bundling heavy unused dependencies) to minimize cold-start latency on infrequently-hit routes.
- Edge vs Node runtime: use the Edge runtime only for latency-sensitive, lightweight logic (auth checks, redirects, geolocation-based routing) that doesn't need full Node APIs or heavy npm packages — most business logic and DB access stays on the Node serverless runtime.
CI/CD
- Vercel's git integration handles preview deploys automatically per PR — pair with required status checks (typecheck, lint, tests) before merge to
mainto keep production deploys safe. - Run
next buildlocally (or in CI) before assuming a deploy will succeed — type errors and dynamic-rendering issues sometimes only surface at build time, not in dev mode.
Rollback strategy
Vercel keeps prior deployments — know how to instantly promote a previous production deployment if a bad release ships, rather than scrambling to hotfix forward under pressure.
Anti-patterns to flag
- Production secrets available in Preview deployments
- No error tracking, meaning production bugs are only discovered via user reports
- A long-lived DB connection pool pattern copied from a traditional server into a serverless function
- Deploying straight to production with no preview/staging verification for a risky change
Example prompt this skill should trigger on
"Deploy this Next.js app to production on Vercel with a custom domain and make sure it's production-ready."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

