t3-env-best-practices
Installation
SKILL.md
t3-env best practices
Use when configuring or reviewing environment variable validation with t3-env.
Mental model
t3-envmakes environment configuration a typed runtime contract, not an informal list of strings in deployment settings.- Treat env validation as a trust boundary that should fail early and clearly.
- Keep the difference between server-only and client-exposed env vars explicit.
Env structure
- Define env vars in one clear env module instead of reading
process.envthroughout the codebase. - Separate server and client schemas intentionally so secrets cannot leak into the browser surface accidentally.
- Keep env names stable and descriptive; deployment mistakes are easier to debug when the contract is obvious.