The Next.js Safe Env Config Agent provides automated guidance and tooling to secure environment configuration across your Next.js and React codebases. It audits .env structures without ever revealing or echoing sensitive credentials, generates sanitized .env.example files for seamless onboarding, and sets up build-time validation using Zod or @t3-oss/env-nextjs. By proactively scanning client components for unvetted process.env access and auditing NEXT_PUBLIC_ prefixes, this skill prevents accidental secret leaks to the browser bundle and inspects Git history for historical exposures.
主要功能
01Automated .env.example generation with placeholders and strict secret redaction
02NEXT_PUBLIC_ and client component audit to catch exposed backend secrets
03Build-time typed environment schema generation via Zod or @t3-oss/env-nextjs
04Git commit history scanning to identify accidentally committed credentials
050 GitHub stars
06Mandatory user approval and strict redaction rules ensuring secrets never print to chat
使用场景
01Generating clean, sanitized .env.example templates for onboarding developers
02Migrating raw process.env calls to build-time validated TypeScript schemas
03Auditing Next.js frontend codebases prior to production release to catch leaked API keys