alivirgo/major-ai-skills/vercel
Claude Code and agent skill by alivirgo/major-ai-skills
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install alivirgo/major-ai-skills/vercelSKILL.md
Vercel Deployment AI Skill Guide (Claude)
Overview & Engine Architecture
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).
When to use / when not to
Use when
- Deploying Next.js or compatible frontends to Vercel; configuring env scopes and regions.
- Debugging failed builds, missing prod env, or preview/prod drift.
- Setting up preview URLs for PR review and promotion discipline.
Do not use when
- You need multi-node Kubernetes scheduling or stateful cluster workloads →
@kubernetes. - Long-running background workers / queues are the core need → external workers, not request functions.
- Someone asks to commit production secrets, put private keys in
NEXT_PUBLIC_*, or invent Vercel tokens → refuse.
Operational Capabilities & Agent Directives
- Secrets only in Vercel env (or linked secret store)—never in git. Scope Production / Preview / Development correctly.
- `NEXT_PUBLIC_*` is public (build-time inlined for Next.js)—no API secrets, DB URLs with passwords, or private keys.
- Preview vs Production values differ; branch-specific Preview overrides apply. Mirror required keys across scopes so previews do not crash.
- First deployment of a new project is always treated as Production (even without
--prod) and uses Production env—plan env accordingly. - Pin Node via
engines/ Project settings to match local and CI. - Prefer framework presets; override install/build/output only when monorepo roots require it (
Root Directory, ignored build step carefully). - Edge Runtime: Vercel recommends migrating toward Node for many cases; Next.js 16.3+ drops
runtime = 'edge'support—verify framework version before prescribing Edge. - Diagnose builds from Deployment → Build Logs; fix the first substantive error, not only the last exit line. Reproduce
npm run buildlocally first. - Protect production with Git branch protection + required checks; prefer promote/preview workflow over hot-editing prod.
- Never invent
VERCEL_TOKENor team IDs; usevercel link/ dashboard / CI OIDC patterns the user already has.
Production Example: scoped env + safe Next headers
vercel.json (optional overrides—prefer dashboard/framework defaults when enough):
package.json engines pin:
Env helper (server-only—fail closed):
CLI loop:
Technical Troubleshooting Matrix
| 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) |
Best Practices
- Use Preview deployments for QA; gate production with reviews.
- Document monorepo
Root Directoryand install command in README. - Watch function duration, payload size, and Core Web Vitals after launch.
- Keep
vercel.jsonredirects/headers reviewed in PR like app code. - Pair smoke tests on preview URLs with
@playwright-ci. - Prefer App Router server-side reads for secret env over public inlining.
Limitations
- Request functions are not general-purpose daemons; use queues/workers elsewhere.
- Plan limits (regions, concurrency, timeouts) differ Hobby vs Pro.
- Arbitrary long-lived Express servers are not the Vercel model.
- Stop and ask if project link, env values, or domain DNS ownership are unclear.
Related Skills
@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 alone
Agent Operational Directive
MANDATORY: Never put secrets in git orNEXT_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.
Source anchors (research)
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/vercel/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alivirgo/major-ai-skills/vercel)