# nestjs config doctor

> Diagnoses NestJS ConfigModule, .env, and Docker/Kubernetes environment failures — finds missing vars and misconfigurations before your app boots.

nestjs config doctor is a free AI agent skill on Agensi by Saeed Gholami, in DevOps & Cloud. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Saeed Gholami](https://www.agensi.io/creators/saeed-gholami)
- Category: [DevOps & Cloud](https://www.agensi.io/skills/devops-cloud)
- Uses: 5
- Version: 1.0
- Last updated: 2026-07-16
- Security: scan passed (2026-07-16); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/nestjs-config-doctor
- Tags: nestjs, nodejs, config, environment, dotenv, docker, kubernates, devops

## 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.example` template from project analysis

- Validates Docker `ENV` injection 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

- `ConfigService` returns undefined for expected variables

- Service runs locally but fails in Docker or Kubernetes

- Startup validation errors from Joi or Zod schemas

- Generating `.env.example` for 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 this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the nestjs config doctor skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific NestJS configuration issues can this skill diagnose?

The Config Doctor performs a 14-point diagnostic matrix to identify why your NestJS app won't boot or why ConfigService is returning undefined, covering everything from manual .env errors to complex Kubernetes Secret mismatches.

### Does this skill help with environment issues in Docker and Kubernetes?

Yes, the skill validates Docker ENV injection and checks for alignment between your NestJS code and Kubernetes ConfigMap/Secret keys to ensure seamless environment transitions.

### Which versions of NestJS and validation libraries are supported?

The skill is designed for NestJS versions 9 through 11 and works with standard @nestjs/config setups, including Joi and Zod validation schemas.

### Is it safe to share my environment configuration with this skill?

Security is a priority; the skill operates in a read-only capacity and is programmed to redact actual sensitive secret values from all diagnostic reports and outputs.

### Can this skill help me generate a .env.example file for my team?

By analyzing your project's service usage and existing configuration files, the skill automatically generates a comprehensive .env.example template for use in team onboarding and CI/CD.

### What are the limitations of the NestJS Config Doctor?

The skill focuses exclusively on the configuration layer and environment setup; it does not perform live database connections, full security audits, or modifications to your core business logic.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
