env-setup-wizard

Configure environment variables, .env files, and type-safe validation for Node.js and Next.js applications.

1|Updated Aug 8, 2026
One-click install
npx skills add https://github.com/th-efool/SKILLS --skill env-setup-wizard-th-efool
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: env-setup-wizard
Source: https://github.com/th-efool/SKILLS/tree/main/env-setup-wizard
Command: npx skills add https://github.com/th-efool/SKILLS --skill env-setup-wizard-th-efool

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires zod, @t3-oss/env-nextjs.

What problem does it solve? Managing environment variables across development and production often leads to committed secrets, missing configuration at runtime, and untyped process.env access that fails silently. This Skill provides a structured approach to organizing .env files and validating configuration on startup. ## Core Features & Use Cases - Structured .env Templates: Generates organized .env.example files grouping application, database, authentication, API, and storage variables. - Type-Safe Validation: Implements Zod schemas and T3 Env patterns that validate environment variables at startup and fail fast with clear errors. - Framework-Specific Patterns: Covers Next.js server/client variable separation with NEXT_PUBLIC_ prefixes and proper .gitignore rules to prevent secret leaks. - Use Case: When bootstrapping a new Next.js app with Stripe and a Postgres database, use this Skill to generate the .env.example template, a validated env.ts module, and gitignore rules in one pass. ## Quick Start Set up environment variable configuration with Zod validation and a .env.example template for my Next.js project.

Frequently Asked Questions about env-setup-wizard

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

FAQPage Schema
How do I set up environment variables in a Next.js project?▼

Create a .env.local file for secrets and use NEXT_PUBLIC_ prefixes for client-side variables. Validate them with a Zod schema or the @t3-oss/env-nextjs package so the app fails fast on missing or invalid values at startup.

How to validate environment variables with Zod in TypeScript?▼

Define a z.object schema describing each variable's type and constraints, then call safeParse on process.env. If parsing fails, log the flattened field errors and exit the process before the app starts.

What is the difference between Zod env validation and T3 Env?▼

Plain Zod validation uses a single schema over process.env, while @t3-oss/env-nextjs splits server and client schemas with an explicit runtimeEnv mapping. T3 Env is recommended for Next.js because it enforces the server/client boundary.

Should .env files be committed to git?▼

No, .env files containing secrets must be git-ignored. Commit only a .env.example template with empty values so teammates know which variables to define, and add .env, .env.local, and .env.*.local to .gitignore.

Why does my app fail with invalid environment variables on startup?▼

Startup validation fails when required variables are missing, malformed, or too short, such as a JWT_SECRET under 32 characters. Check the logged field errors from the Zod parse result and fill in the missing values in your .env file.