/nextjs-frontend:deployment-configfrom nextjs-frontend
Configures and optimizes Next.js deployments on Vercel, including vercel.json setup, environment variables, build optimization, edge functions, and deployment troubleshooting.
Ships in nextjs-frontend. 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; scripts run unread.
Purpose: Configure and optimize Next.js deployments on Vercel with automated validation and best practices.
Activation Triggers:
Key Resources:
scripts/validate-deployment.sh - Validate deployment configurationscripts/optimize-build.sh - Analyze and optimize build performancescripts/setup-env-vars.sh - Interactive environment variable setupscripts/test-edge-functions.sh - Test edge function configurationtemplates/vercel.json - Production-ready vercel.json templatestemplates/env-template.md - Environment variable documentationexamples/deployment-patterns.md - Common deployment scenariosValidate configuration before deploying:
# Full deployment validation
./scripts/validate-deployment.sh
# Checks performed:
# - vercel.json syntax and schema
# - Environment variables documented
# - Build command configuration
# - Output directory exists
# - Framework detection correct
# - No hardcoded secrets in code
Choose appropriate template based on needs:
# Generate vercel.json from template
cp templates/vercel.json vercel.json
# Templates available:
# - basic.vercel.json → Minimal configuration
# - optimized.vercel.json → Performance optimized
# - edge-functions.vercel.json → With edge/middleware
# - monorepo.vercel.json → Monorepo setup
Key Configuration Options:
Build Settings:
buildCommand - Override build command (default: next build)installCommand - Custom install command or skip with ""outputDirectory - Build output location (default: .next)framework - Force framework detection (usually auto-detected)Routing:
cleanUrls - Remove .html extensions (true/false)trailingSlash - Enforce trailing slash behaviorredirects - 301/302/307/308 redirect rulesrewrites - Internal URL rewritesheaders - Custom response headersFunctions:
functions - Configure memory, duration, runtime per functionregions - Deployment regions (default: iad1)# Interactive setup
./scripts/setup-env-vars.sh
# Guided process:
# 1. Identifies required variables from code
# 2. Categorizes by environment (dev/preview/prod)
# 3. Generates .env.local and .env.example
# 4. Provides Vercel CLI commands for upload
Best Practices:
.env.local or .env.production.env.example (no values)NEXT_PUBLIC_templates/env-template.mdUpload to Vercel:
# Production
vercel env add VARIABLE_NAME production
# Preview
vercel env add VARIABLE_NAME preview
# Development
vercel env add VARIABLE_NAME development
# Pull to local
vercel env pull .env.local
# Analyze build performance
./scripts/optimize-build.sh
# Provides:
# - Bundle size analysis
# - Build time breakdown
# - Optimization recommendations
# - Tree-shaking opportunities
# - Code-splitting suggestions
Common Optimizations:
Image Optimization:
{
"images": {
"domains": ["cdn.example.com"],
"formats": ["image/avif", "image/webp"],
"minimumCacheTTL": 60
}
}
Function Configuration:
{
"functions": {
"app/api/**/*.ts": {
"memory": 1024,
"maxDuration": 10
}
}
}
Build Cache:
node_modules/.cache is in .gitignore# Test edge function configuration
./scripts/test-edge-functions.sh
# Validates:
# - Edge runtime compatibility
# - No Node.js-specific APIs
# - Size limits (1MB compressed)
# - Cold start performance
Edge Configuration in next.config.js:
export const runtime = 'edge'
export const preferredRegion = 'iad1'
Common Edge Use Cases:
# Connect Git repository via Vercel Dashboard
# Automatic deployments on:
# - main/master → Production
# - other branches → Preview
# Manual trigger via commit
git push origin main
# Install CLI
npm i -g vercel
# Preview deployment
vercel
# Production deployment
vercel --prod
# With environment
vercel --prod --env NEXT_PUBLIC_API_URL=https://api.example.com
Custom deployment triggers without Git push:
# Create hook in Vercel Dashboard → Settings → Git → Deploy Hooks
# Then trigger via HTTP:
curl -X POST https://api.vercel.com/v1/integrations/deploy/[hook-id]
Module not found:
# Verify all dependencies in package.json
npm install --frozen-lockfile
# Check for case-sensitive import issues
# Vercel is case-sensitive, local dev may not be
Out of memory:
{
"builds": [{
"src": "package.json",
"use": "@vercel/next",
"config": {
"maxLambdaSize": "50mb"
}
}]
}
Build timeout:
# Verify variables are set
vercel env ls
# Check variable is available
vercel env pull .env.local
cat .env.local
# Common mistakes:
# - Forgot NEXT_PUBLIC_ prefix for client-side
# - Set in wrong environment (dev/preview/prod)
# - Contains quotes or spaces incorrectly
Function size exceeded:
vercel buildFunction timeout:
Custom domain not working:
# Verify DNS settings
dig yourdomain.com
# Should show:
# A record → 76.76.21.21
# or CNAME → cname.vercel-dns.com
Preview URLs:
project-git-branch-team.vercel.app{
"$schema": "https://openapi.vercel.sh/vercel.json",
"buildCommand": "next build",
"outputDirectory": ".next",
"framework": "nextjs",
"headers": [
{
"source": "/(.*)",
"headers": [
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-Frame-Options",
"value": "DENY"
}
]
}
]
}
{
"buildCommand": "cd ../.. && npm run build --filter=web",
"installCommand": "npm install --prefix=../.. --frozen-lockfile",
"outputDirectory": ".next"
}
{
"rewrites": [
{
"source": "/api/:path*",
"destination": "https://api.example.com/:path*"
},
{
"source": "/blog/:slug",
"destination": "/news/:slug"
}
]
}
Scripts: All scripts in scripts/ are executable and include:
validate-deployment.sh - Pre-deployment validationoptimize-build.sh - Build performance analysissetup-env-vars.sh - Environment variable configurationtest-edge-functions.sh - Edge function testingcheck-bundle-size.sh - Bundle analysisTemplates: templates/ contains:
Examples: examples/deployment-patterns.md includes:
Platform: Vercel Framework: Next.js 13+ (App Router and Pages Router) CLI Version: Latest Vercel CLI Version: 1.0.0
README.md (opens in a new tab)examples/deployment-patterns.md (opens in a new tab)scripts/optimize-build.sh (opens in a new tab)scripts/setup-env-vars.sh (opens in a new tab)scripts/test-edge-functions.sh (opens in a new tab)scripts/validate-deployment.sh (opens in a new tab)templates/basic.vercel.json (opens in a new tab)templates/edge-functions.vercel.json (opens in a new tab)templates/env-template.md (opens in a new tab)templates/monorepo.vercel.json (opens in a new tab)templates/optimized.vercel.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/design-system-enforcementMandatory design system guidelines for shadcn/ui with Tailwind v4. Enforces 4 font sizes, 2 weights, 8pt grid spacing, 60/30/10 color rule, OKLCH colors, and accessibility standards. Use when creating components, pages, or any UI elements. ALL agents MUST read and validate against design system before generating code./seo-2025-patterns2025 SEO best practices for Next.js including Core Web Vitals (INP replaces FID), E-E-A-T signals, Schema markup, AI content guidelines, and technical SEO. Use when optimizing pages for search engines, implementing metadata, adding structured data, or improving page speed./npx claudepluginhub vanman2024/ai-dev-marketplace --plugin nextjs-frontendOther plugins' skills for the same job