- 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 tools 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
- Generated the document
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
nestjs-config-doctor.pdf
PDF · document
Example file from a real run - the skill writes it into your workspace.
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 install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
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
1 install
Downloaded by developers to date
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 1 month ago
- Free to download with an account