/major-ai-skills:vercelfrom major-ai-skills
Configure Vercel projects with scoped env vars, preview vs production deploys, Node/framework build settings, and log-driven failure triage—avoid NEXT_PUBLIC_ secret leaks and runtime mismatches.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Vercel turns Git pushes into immutable deployments. Preview covers non-production branches/PRs; Production tracks the production branch (or vercel --prod). Builds produce static assets, Node serverless functions, and optional Middleware—not long-lived custom servers. Agents keep secrets in Project Environment scopes (Development / Preview / Production), treat NEXT_PUBLIC_* as browser-exposed, pin Node versions, and debug from Build Logs (first real error, not the final exited with 1).
┌─────────────────────────────────────────────────────────────┐
│ Vercel git → deploy loop │
│ │
│ Git push / vercel CLI │
│ ├── First deploy of a new project → Production env │
│ ├── Later: prod branch / --prod → Production │
│ └── Other branches / vercel → Preview │
│ │
│ Build │
│ ├── Install + framework build (Next.js preset common) │
│ ├── Env inlined at build for NEXT_PUBLIC_* │
│ └── Fail → read Build Logs (root cause above final line) │
│ │
│ Runtime │
│ ├── Static / Serverless Node / Middleware │
│ └── Domains ← successful Production deployment │
└─────────────────────────────────────────────────────────────┘
Use when
Do not use when
@kubernetes.NEXT_PUBLIC_*, or invent Vercel tokens → refuse.NEXT_PUBLIC_* is public (build-time inlined for Next.js)—no API secrets, DB URLs with passwords, or private keys.--prod) and uses Production env—plan env accordingly.engines / Project settings to match local and CI.Root Directory, ignored build step carefully).runtime = 'edge' support—verify framework version before prescribing Edge.npm run build locally first.VERCEL_TOKEN or team IDs; use vercel link / dashboard / CI OIDC patterns the user already has.vercel.json (optional overrides—prefer dashboard/framework defaults when enough):
{
"framework": "nextjs",
"regions": ["iad1"],
"headers": [
{
"source": "/(.*)",
"headers": [
{ "key": "X-Content-Type-Options", "value": "nosniff" },
{ "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" }
]
}
]
}
package.json engines pin:
{
"engines": { "node": "20.x" }
}
Env helper (server-only—fail closed):
function requireEnv(name: string): string {
const v = process.env[name];
if (!v) throw new Error(`Missing required env: ${name}`);
return v;
}
// Server route / server component only:
const databaseUrl = requireEnv("DATABASE_URL");
// Browser-safe example only:
const publicAppUrl = process.env.NEXT_PUBLIC_APP_URL; // must be non-secret
CLI loop:
npm i -g vercel
vercel login
vercel link
vercel env pull .env.local # Development scope
vercel build # local parity when available
vercel # Preview
vercel --prod # Production (explicit)
vercel logs <deployment-url>
| Signature | Likely cause | Fix path |
|---|---|---|
| Runtime crash only on Production | Missing Production env var | Add/mirror Production scope; redeploy |
| Preview works, prod wrong public URL | NEXT_PUBLIC_* baked at build | Set correct Production value; rebuild |
| First CLI deploy used prod secrets unexpectedly | New project first deploy = Production | Document; set Production env before first deploy |
Build exited with 1 | Type/lint/module error earlier in log | Scroll to first Error; reproduce locally |
| Edge / Middleware runtime error | Node API used on Edge; or Edge deprecated on Next version | Move to Node runtime; check Next version docs |
| Monorepo app not found | Wrong Root Directory | Set project root / turbo filter |
| Stale output after dependency bump | Cache oddity | Redeploy without cache |
| Absolute localhost links in preview | Hardcoded local URLs | Relative URLs or env-based base (VERCEL_URL careful with scheme) |
Root Directory and install command in README.vercel.json redirects/headers reviewed in PR like app code.@playwright-ci.@nextjs — App Router apps Vercel deploys well@nodejs — serverless function runtime constraints@playwright-ci — smoke-testing preview deployments@github-actions — CI that gates merges before production promote@cloudflare-dns — DNS for custom domains when not using Vercel nameservers aloneMANDATORY: Never put secrets in git or
NEXT_PUBLIC_*. Scope env vars to Development/Preview/Production and remember the first deploy of a new project uses Production env. Debug builds from the first real error in Build Logs. Do not invent Vercel tokens or prescribe Edge without checking the Next.js version.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.Other plugins' skills for the same job