Dotenv integration
Skill a5c-ai/babysitter/library/specializations/cli-mcp-development/skills/dotenv-integration
Integrate dotenv for environment variable loading with validation and type coercion.From its SKILL.md
npx -y skills add a5c-ai/babysitter --skill dotenv-integrationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.2 KB, 177 tokens by cl100k_base, as published. Nobody here has run it
Dotenv Integration
Integrate dotenv for environment variable loading.
Generated Patterns
import { config } from 'dotenv';
import { expand } from 'dotenv-expand';
import { z } from 'zod';
// Load .env files in order
for (const file of ['.env.local', `.env.${process.env.NODE_ENV}`, '.env']) {
expand(config({ path: file }));
}
const envSchema = z.object({
NODE_ENV: z.enum(['development', 'production', 'test']).default('development'),
PORT: z.coerce.number().default(3000),
DATABASE_URL: z.string().url(),
API_KEY: z.string().min(1),
});
export const env = envSchema.parse(process.env);
Target Processes
- configuration-management-system
- mcp-server-bootstrap
- cli-application-bootstrap
What ships with it: 1 file
382 B alongside SKILL.md
- README.md382 B