Nestjs configuration
Skill FilippoDeSilva/skills/skills/nestjs/nestjs-configuration
Skills for my agentic development workflow.
npx -y skills add FilippoDeSilva/skills --skill nestjs-configurationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Environment variables validation and ConfigModule setup. Use when validating environment variables with Joi/Zod or configuring ConfigModule in NestJS.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.5 KB, 475 tokens by cl100k_base, as published. Nobody here has run it
NestJS Configuration Standards
Priority: P1 (OPERATIONAL)
Setup
- Library: Use
@nestjs/config. - Initialization: Import
ConfigModule.forRoot({ isGlobal: true })inAppModule.
Validation
- Mandatory: Validate environment variables at startup.
- Tool: Use
joior custom validation class. - Effect: app must crash immediately if required env var (e.g.,
DB_URL) missing.
// app.module.ts
ConfigModule.forRoot({
validationSchema: Joi.object({
NODE_ENV: Joi.string()
.valid('development', 'production')
.default('development'),
PORT: Joi.number().default(3000),
DATABASE_URL: Joi.string().required(),
}),
});
Usage
- Injection: Inject
ConfigServiceto access values. - Typing: Avoid magic strings. Use type-safe getter helper or dedicated configuration object/interface.
- Secrets: Never commit
.envfiles. Add.env*to.gitignore.
⚠️ Adding New Variables
When adding new environment variable to application, you MUST update all of following:
src/config/env.validation.ts: Add class property with appropriateclass-validatordecorators..env.example: Add placeholder value so other developers know about it..env.development/.env.test: Add actual development values.- CI/CD Pipelines & Infrastructure: You MUST map new variable in your deployment scripts (e.g.,
.github/workflows/*.yml,gitlab-ci.yml, Terraform, or Azure Pipelines). Most modern cloud platforms (Cloud Run, ECS, Kubernetes) require explicit mapping of secrets/env-vars into container runtime. Failure to this will cause production deployment to crash or silently fail.
Anti-Patterns
- No unchecked env vars: Validate all required variables at startup; app must crash if missing.
- No committed secrets: Add
.env*to.gitignore; load values via ConfigService only. - No new vars without CI/CD update: Always update
env.validation.ts,.env.example, and pipeline manifests.
What ships with it: 1 file
2.0 KB alongside SKILL.md
evals/
- evals.json2.0 KB
Gives 0 of the 12 instructions most project setup skills give in 475 tokens
Counted across 999 of the 1,637 authors here whose files we hold, read 2026-08-07
- Ask one question at a timein 29 of 999, across 28 files
- Detect the package manager from lockfilesin 28 of 999, across 9 files
- Present findings to the userin 26 of 999, across 5 files
- Explore current repo statein 24 of 999, across 3 files
- Update the agent skills block in place if it existsin 24 of 999, across 3 files
- Install husky lint-staged and prettierin 23 of 999, across 4 files
- Create the lintstagedrc filein 22 of 999, across 3 files
- Commit all changed filesin 22 of 999, across 3 files
- Run lint-staged to verify it worksin 22 of 999, across 3 files
- Create the husky pre-commit filein 21 of 999, across 2 files
- Create a prettierrc file if missingin 21 of 999, across 2 files
- Initialize huskyin 21 of 999, across 2 files
Said here and by no other author read
- use @nestjs/config
- import ConfigModule.forRoot as global
- use joi for validation
- crash immediately if required variables are missing
- inject ConfigService to access values
- avoid magic strings for configuration
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.