- Home
- Skills
- DevOps & Cloud
- nestjs config doctor
nestjs config doctor
Diagnoses NestJS ConfigModule, .env, and Docker/Kubernetes environment failures — finds missing vars and misconfigurations before your app boots.
Free
Works with the AI Agents you already use
nestjs config doctor
Example session with this skill installed
My NestJS app starts fine on my laptop but crashes in Kubernetes with "ConfigService unable to load variable DATABASE_URL". Diagnose my ConfigModule setup, .env files, and k8s/deployment.yaml and tell me exactly what is misconfigured.
- Read your context and instructions
- Compiled the nestjs config doctor
NestJS Configuration Diagnostic Report
| Field | Value |
|---|---|
| Project | billing-service |
| NestJS version | 10.4.0 |
| Status | MISCONFIGURED |
| Root cause | Kubernetes Secret key mismatch for DATABASE_URL |
Summary
Local development works via .env. In Kubernetes, the deployment references secretKeyRef.key: database_url but the application expects DATABASE_URL. Linux environment variables are case-sensitive.
Findings
[CRITICAL] K8s Secret key case mismatch
- Location: k8s/deployment.yaml:34
- Issue: Secret key database_url does not match DATABASE_URL in code
- Impact: ConfigService.getOrThrow('DATABASE_URL') throws at startup in production
- Recommendation: Align the Secret key to DATABASE_URL
Environment variable inventory
| Variable | Used in | Present in .env | In .env.example | Validated at startup |
|---|---|---|---|---|
| DATABASE_URL | app.module.ts | Yes | Yes | No |
| JWT_SECRET | auth.module.ts | Yes | No | No |
Recommended .env.example
NODE_ENV=development
PORT=3000
DATABASE_URL=
JWT_SECRET=
Resolution steps
- Update the Kubernetes Secret to use key DATABASE_URL (not database_url)
- Fix deployment.yaml secretKeyRef.key to DATABASE_URL
- Add Joi or Zod validation in ConfigModule.forRoot()
- Replace ConfigService.get() with getOrThrow() for required variables
- Redeploy and verify /health endpoint responds
Connects securely to your tools. The creator never sees your data.
About this skill
Overview
NestJS Config & Environment Doctor is a specialized diagnostic skill for NestJS applications that fail to start, load incorrect configuration, or behave differently across local, container, and Kubernetes environments. It performs structured, evidence-based analysis of your configuration layer and delivers actionable remediation guidance.
The Problem
NestJS configuration failures are among the most common blockers before production deployment. Applications may boot with missing environment variables, fail silently when ConfigService.get() returns undefined, or work locally while breaking in Docker or Kubernetes due to misaligned Secret keys or missing validation. Generic debugging prompts do not follow a repeatable NestJS-specific diagnostic process.
What This Skill Does
- Executes a 14-point diagnostic matrix across
ConfigModule, environment files, and deployment configuration - Determines configuration health status: BROKEN, MISCONFIGURED, or OK
- Identifies root cause with file-level evidence and severity-ranked findings
- Maps environment variables to their usage across the codebase
- Generates a complete
.env.exampletemplate from project analysis - Validates Docker
ENVinjection and Kubernetes Secret/ConfigMap key alignment - Recommends Joi or Zod startup validation patterns where validation is missing
Supported Stack
NestJS 9–11, @nestjs/config, Joi, Zod, Docker, Kubernetes ConfigMap and Secret resources.
Ideal Use Cases
- Application fails to start with configuration-related errors
ConfigServicereturns undefined for expected variables- Service runs locally but fails in Docker or Kubernetes
- Startup validation errors from Joi or Zod schemas
- Generating
.env.examplefor team onboarding or CI/CD pipelines
Security & Privacy
This skill operates read-only and never outputs actual secret values from .env files. Sensitive values are redacted in all diagnostic output.
Known Limitations
- Scope is limited to configuration and environment setup
- Does not perform full production-readiness or security audits
- Does not connect to live clusters, containers, or databases
- Does not modify source code unless explicitly requested by the user
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
3 installs
Downloaded by developers to date
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 3 months ago
- Free to download with an account