bobmatnyc avatar

Nextjs Env Variables

This walks you through Next.js environment variable management with the kind of detail you actually need. It covers the file precedence order (like how .env.production.local beats .env), explains when to use NEXT_PUBLIC_ prefixes versus server-only vars, and shows concrete examples for each file type. The deployment section is especially useful because it emphasizes that NEXT_PUBLIC_ variables are baked into the build, so you need to redeploy after changing them in Vercel. It also includes validation workflows and a troubleshooting section for the usual gotchas, like forgetting the prefix or wondering why your changes aren't showing up. Good for initial setup or when you're debugging why something works locally but fails in production.

skills.sh installs
153
GitHub stars
79
last updated
Aug 21, 2026

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill nextjs-env-variables --agent claude-code

Installs into .claude/skills of the current project.

Files

This walks you through Next.js environment variable management with the kind of detail you actually need. It covers the file precedence order (like how .env.production.local beats .env), explains when to use NEXT_PUBLIC_ prefixes versus server-only vars, and shows concrete examples for each file type. The deployment section is especially useful because it emphasizes that NEXT_PUBLIC_ variables are baked into the build, so you need to redeploy after changing them in Vercel. It also includes validation workflows and a troubleshooting section for the usual gotchas, like forgetting the prefix or wondering why your changes aren't showing up. Good for initial setup or when you're debugging why something works locally but fails in production.

Browse the repository on GitHub

Sponsors

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Categories
Frontend Development, Cloud & Infrastructure
First seen
Jun 3, 2026

More from bobmatnyc/claude-mpm-skills

All 158
1vercel-labs avatarjson-render-react-nativevercel-labs/json-renderReact Native renderer for json-render that turns JSON specs into native mobile UIs. Use when working with @json-render/react-native, building React Native UIs f142skills.sh installs
2mindverse avatarsecondme-nextjsmindverse/second-me-skills基于配置和需求生成 Next.js 项目,支持 --quick 快速模式跳过 PRD 阶段122skills.sh installs
3nuxt-content avatarnuxt-contentnuxt-content/nuxt-studioUse when working with Nuxt Content v3 - provides collections (local/remote/API sources), queryCollection API, MDC rendering, database configuration, NuxtStudio 114skills.sh installs
4cherryhq avatarvercel-react-best-practicescherryhq/cherry-studioReact and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js c0skills.sh installs
5georgekhananaev avatarnextjs-senior-devgeorgekhananaev/claude-skills-vaultSenior Next.js 15+/16 Engineer skill for App Router. Use when scaffolding production apps, enforcing RSC patterns, auditing codebases, or optimizing performance0skills.sh installs
6syahiidkamil avatarshadcnsyahiidkamil/software-engineer-ai-agent-atlasManages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage ex0skills.sh installs