env-configuration

Enforce LAT_ prefixed environment variables and validate startup configuration with parseEnv.

4.6k|378|Updated Jun 28, 2024
One-click install
npx skills add https://github.com/latitude-dev/latitude-llm --skill env-configuration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: env-configuration
Source: https://github.com/latitude-dev/latitude-llm/tree/main/.agents/skills/env-configuration
Command: npx skills add https://github.com/latitude-dev/latitude-llm --skill env-configuration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures consistent environment variable naming and startup config validation by enforcing the LAT_ prefix and providing reliable parsing with parseEnv / parseEnvOptional across development, CI, and production.

Core Features & Use Cases

  • LAT_ prefix enforcement ensures all app variables follow a consistent naming convention to avoid collisions and confusion.
  • Startup validation uses parseEnv / parseEnvOptional to read LAT_ variables and fail-fast on missing or invalid values.
  • Documentation maintenance with .env.example updates to reflect required variables for local and CI environments.

Quick Start

Validate all startup configuration by parsing LAT_ variables with parseEnv.

Frequently Asked Questions about env-configuration

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

FAQPage Schema
How do I enforce environment variable naming conventions during application startup?

Enforce environment variable naming conventions by applying a strict LAT_ prefix to all app variables and validating them at startup. This prevents missing or misnamed configuration across development, CI, and production environments.

What is the best way to validate environment variables and fail-fast on missing configuration?

The best way to validate environment variables is using parseEnv and parseEnvOptional to read LAT_ prefixed variables with type checks. This fail-fast mechanism catches missing or invalid values during application startup.

How do I keep my .env.example file up-to-date with required configuration variables?

Keep your .env.example file up-to-date by enforcing LAT_ prefixed environment variables and using startup configuration validation. This ensures the documentation accurately reflects required variables for local and CI environments.

Does parseEnvOptional support type checking for optional configuration values?

Yes, parseEnvOptional supports type checking for optional configuration values. Along with parseEnv, it reads LAT_ prefixed environment variables to ensure missing or invalid values trigger a fail-fast response during startup.

Can I use startup validation for environment variables across local development and deployment checks?

Yes, you can use startup validation across local development, deployment checks, and production. Enforcing LAT_ prefixed variables with parseEnv ensures consistent configuration parsing and prevents collisions throughout the deployment lifecycle.

Why should I use a prefix for environment variables in config management?

Using a LAT_ prefix for environment variables ensures all app variables follow a consistent naming convention. This practice avoids naming collisions and confusion when managing startup configuration across multiple environments.