Add Environment Variable
Installation
SKILL.md
Add Environment Variable
When adding a new environment variable to an app, follow these steps:
1. Locate the env file
Find the env.ts or env.mjs file in the app that uses @t3-oss/env-nextjs. Common locations:
apps/<app-name>/src/env.tsapps/<app-name>/src/lib/env.ts
2. Add the variable in the correct section
The createEnv function has three sections:
client: For variables prefixed withNEXT_PUBLIC_(exposed to browser)server: For server-only variables (secrets, API keys, configuration)shared: For variables used in both client and server (likeNODE_ENV)