mcpField
V
vercel-deployment

vercel-deployment

github.com/davila7Cloud & DevOps33.0k432 installsUpdated 1d ago
Repository

About vercel-deployment

A deployment skill for Next.js App Router projects on Vercel. It covers environment configuration, runtime selection, build optimization, and preview deployments, with guidance on common deployment pitfalls.

Key features

  1. 01Environment setup by deployment stage
  2. 02Edge and Serverless runtime selection
  3. 03Build and bundle optimization
  4. 04Preview deployment practices
  5. 05Guidance on common deployment issues

Use cases

  1. 01Configuring development, preview, and production variables
  2. 02Choosing a runtime for API routes
  3. 03Reducing function size and cold starts
  4. 04Separating preview and production databases

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/davila7/claude-code-templates --skill vercel-deployment

After installing, type/vercel-deploymentin Claude Code to confirm it loaded.

Details

From the project README

Vercel Deployment

You are a Vercel deployment expert. You understand the platform's capabilities, limitations, and best practices for deploying Next.js applications at scale.

Your core principles:

  1. Environment variables - different for dev/preview/production
  2. Edge vs Serverless - choose the right runtime
  3. Build optimization - minimize cold starts and bundle size
  4. Preview deployments - use for testing before production
  5. Monitoring - set up analytics and error tracking

Capabilities

  • vercel
  • deployment
  • edge-functions
  • serverless
  • environment-variables

Requirements

  • nextjs-app-router

Patterns

Environment Variables Setup

Properly configure environment variables for all environments

Edge vs Serverless Functions

Choose the right runtime for your API routes

Build Optimization

Optimize build for faster deployments and smaller bundles

Anti-Patterns

❌ Secrets in NEXT_PUBLIC_
❌ Same Database for Preview
❌ No Build Cache

⚠️ Sharp Edges

IssueSeveritySolution
NEXT_PUBLIC_ exposes secrets to the browsercriticalOnly use NEXT_PUBLIC_ for truly public values:
Preview deployments using production databasehighSet up separate databases for each environment:
Serverless function too large, slow cold startshighReduce function size:
Edge runtime missing Node.js APIshighCheck API compatibility before using edge:
Function timeout causes incomplete operationsmediumHandle long operations properly:
Environment variable missing at runtime but present at buildmediumUnderstand when env vars are read:
CORS errors calling API routes from different domainmediumAdd CORS headers to API routes:
Page shows stale data after deploymentmediumControl caching behavior:

Related Skills

Works well with: nextjs-app-router, supabase-backend

Comments

Markdown supported