deploying-to-production

Enforces Next.js deployment best practices for Vercel and Supabase, including scoped env vars and migrations.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/alexejluft/brudi --skill deploying-to-production-alexejluft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deploying-to-production
Source: https://github.com/alexejluft/brudi/tree/main/skills/deploying-to-production
Command: npx skills add https://github.com/alexejluft/brudi --skill deploying-to-production-alexejluft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents common and costly errors during the deployment of Next.js applications to Vercel, especially when using Supabase, by enforcing best practices for environment variables, build configurations, and database migrations.

Core Features & Use Cases

  • Environment Variable Scoping: Ensures correct environment variables are used for production, preview, and development.
  • Build Optimization: Configures next.config.js for production readiness with security headers and optimized output.
  • Deployment Checklist: Guides through crucial steps like preview deployments for every PR and database migrations before code deployment.
  • Use Case: Deploying a Next.js e-commerce site to Vercel. This skill ensures that production Stripe keys are not exposed in preview environments, database schema changes are applied before the new code is released, and a health check endpoint is configured for Vercel monitoring.

Quick Start

Use the deploying-to-production skill to ensure all environment variables are correctly configured for a Vercel deployment.

Frequently Asked Questions about deploying-to-production

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure environment variables for Next.js and Supabase on Vercel?

Configuring environment variables for Next.js and Supabase on Vercel requires scoping variables separately for production, preview, and development. This approach prevents exposing production keys in preview environments and ensures correct database connections are used during builds.

What's the best way to sequence database migrations when deploying to Vercel?

The best way to sequence database migrations when deploying to Vercel is to apply Supabase schema changes before releasing the new application code. This prevents production failures by ensuring the database schema is updated and compatible with the incoming Next.js build ahead of time.

Why are my Next.js builds breaking during Vercel production deployments?

Next.js builds breaking during Vercel production deployments are often caused by missing environment variables or unoptimized next.config.js settings. Enforcing mandatory preview deployments for every PR and scoped environment variable management identifies these build issues before they reach production.

Do I need preview deployments for every PR when using Next.js and Supabase?

Preview deployments for every PR are mandatory when using Next.js and Supabase to catch broken builds and database migration issues early. They provide an isolated environment to verify configuration and schema changes before impacting the production deployment.

How do edge vs serverless functions affect my Next.js deployment on Vercel?

Edge vs serverless functions affect Next.js deployment on Vercel by changing how application routes are processed and where environment variables are accessible. Choosing the correct function type ensures optimized output, proper security headers, and reliable health check monitoring.

What rollback strategies should I use for a failed Vercel production deployment?

Rollback strategies for a failed Vercel production deployment involve utilizing health check endpoints to monitor failure states and reverting to the previous stable build. Implementing these strategies alongside mandatory preview deployments ensures safe recovery from broken builds or database migration errors.