CodingSaves ~45 minutes
Write a configuration management module
Build a type-safe config module that catches missing/invalid settings at startup, not runtime.
The prompt
You are a software engineer building application configuration management. Write a configuration module for a [LANGUAGE] application that: loads config from multiple sources in priority order (environment variables > config file > defaults), validates all config values at startup using a schema (throw with a clear error listing ALL invalid/missing values — not just the first), provides type-safe access to config values (no string indexing), supports different config profiles (development, test, production), reloads certain config values at runtime without restart (feature flags, log levels), never logs secret values, and includes a generateEnvTemplate() function that outputs a .env.example with all keys and descriptions. Config values needed: [LIST CONFIG KEYS, TYPES, AND DESCRIPTIONS] Language: [LANGUAGE] Config file format: [YAML / TOML / JSON / .ENV]
Replace the [BRACKETED] fields with your details, then paste into ChatGPT, Claude or Gemini.
Want AI to fill this in for you?
Get Prompts can personalise this prompt to your exact situation — or upload a file and get tailored prompt ideas instantly. 3 free edits, no sign-up.
Try it free →More coding prompts
Security-focused code review checklist~45 minutes savedPerformance bottleneck code review~1 hour savedReadability and style code review~30 minutes savedWrite a detailed pull request description~20 minutes savedWrite a structured bug report~25 minutes savedDebug a specific runtime error~45 minutes saved