nestjs-standard
Skill2 starsChanged 6 days agoMITView on GitHub
Standards and workflows for implementing, reviewing, debugging, and refactoring NestJS applications. Use when working on NestJS modules, controllers, services, DTOs, guards, interceptors, pipes, Prisma or TypeORM data access, REST APIs, authentication, validation, tests, migrations, or production hardening. Prefer this skill for NestJS code changes in existing repositories where the agent must follow local architecture and avoid framework-pattern overreach.
In this repository50 other files it gives its agents.
- angular-standardSkill
- business-analyst-standardSkill
- execute-browser-verifySkill
- execute-build-testSkill
- execute-debug-evidenceSkill
- execute-implementationSkill
- jira-ba-dev-test-flowSkill
- professional-slidesSkill
- python-standardSkill
- senior-angularSkill
- senior-api-designSkill
- senior-backend-engineerSkill
- senior-business-analystSkill
- senior-cicdSkill
- senior-cloud-serverSkill
- senior-code-reviewSkill
- senior-delivery-orchestratorSkill
- senior-designSkill
- senior-dockerSkill
- senior-dotnetSkill
- senior-flutterSkill
- senior-frontend-engineerSkill
- senior-git-workflowSkill
- senior-goSkill
- senior-java-springSkill
- senior-kubernetesSkill
- senior-manual-testingSkill
- senior-mongodbSkill
- senior-mysqlSkill
- senior-nestjsSkill
- senior-nextjsSkill
- senior-nodejsSkill
- senior-observabilitySkill
- senior-performanceSkill
- senior-postgresqlSkill
- senior-python-backendSkill
- senior-react-nativeSkill
- senior-reactSkill
- senior-redisSkill
- senior-refactoringSkill
- senior-securitySkill
- senior-sql-serverSkill
- senior-tech-leadSkill
- senior-technical-writingSkill
- senior-terraformSkill
- senior-test-automationSkill
- senior-test-engineerSkill
- senior-vueSkill
- solution-architect-standardSkill
- tester-standardSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 10 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill to make practical, codebase-aware NestJS changes.
- Distinctive: line 13
Prefer existing project patterns over new abstractions.
- Distinctive: line 14
Keep changes scoped to the requested feature or defect.
- Very specific: line 17
Run the narrowest useful verification available: unit tests for service logic, e2e/request tests for API behavior, lint/typecheck/build for …
- Distinctive: line 21
Before changing NestJS code, quickly discover:
- Distinctive: line 31
Read only the reference files needed for the task:
- Distinctive: line 39
Do not read every reference by default.
- Distinctive: line 45
Update controller methods only as thin request adapters: parse, validate, authorize, call service, return typed result.
- Distinctive: line 46
Put business behavior in services or existing domain classes.
- Very specific: line 47
Update module providers/imports/exports only when a dependency boundary requires it.
- Distinctive: line 48
Add focused tests for changed behavior, especially authorization, validation, transactions, and error paths.
- Distinctive: line 49
Run the repository's existing verification commands and report any command that cannot run.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
NestJS Standard
Use this skill to make practical, codebase-aware NestJS changes. The goal is not to impose a generic architecture; it is to read the current project, preserve its conventions, and apply NestJS patterns only where they solve the task.
Operating Rules
- Inspect the existing app before editing: package manager, NestJS version, module layout, ORM, validation setup, auth setup, test runner, and local naming conventions.
- Prefer existing project patterns over new abstractions. Add repositories, injection tokens, interceptors, event buses, or lazy modules only when the local codebase already uses them or the task clearly needs them.
- Keep changes scoped to the requested feature or defect. Avoid broad module reshuffles unless the request is explicitly architectural.
- Validate inputs at DTO or pipe boundaries, enforce authorization in guards/policies, and keep business rules in services or domain helpers.
- Match the detected ORM. Do not introduce TypeORM into Prisma projects, Prisma into TypeORM projects, or a repository layer into simple CRUD code without a concrete benefit.
- Run the narrowest useful verification available: unit tests for service logic, e2e/request tests for API behavior, lint/typecheck/build for shared contracts, and migration generation checks for schema work.
Discovery Checklist
Before changing NestJS code, quickly discover:
package.json: NestJS version, scripts, ORM, test tools, validation/security packages.- Entry points:
src/main.ts, root module, global pipes, filters, interceptors, guards, prefix/versioning. - Feature shape: whether modules are grouped by feature, layer, bounded context, or generated CRUD.
- Data access: Prisma service/client, TypeORM repositories, MikroORM, Sequelize, raw SQL, or external API clients.
- Existing examples: nearest similar module/controller/service/DTO/spec.
Reference Routing
Read only the reference files needed for the task:
references/architecture.md: modules, DI, providers, boundaries, circular dependencies, lifecycle hooks.references/api-validation-security.md: controllers, DTOs, pipes, serialization, auth, guards, rate limits, file uploads.references/data-access.md: Prisma, TypeORM, transactions, migrations, N+1 prevention, query placement.references/testing.md: unit, integration, e2e, mocks, test modules, database tests.references/review-refactor.md: code review checklist and safe refactor workflow.
Do not read every reference by default. Load the smallest relevant set, then inspect source files around the change.
Implementation Workflow
- Locate the closest existing implementation and mirror its structure.
- Define or update DTOs first for API inputs and outputs when request/response contracts change.
- Update controller methods only as thin request adapters: parse, validate, authorize, call service, return typed result.
- Put business behavior in services or existing domain classes. Keep database calls behind the local data-access pattern.
- Update module providers/imports/exports only when a dependency boundary requires it.
- Add focused tests for changed behavior, especially authorization, validation, transactions, and error paths.
- Run the repository's existing verification commands and report any command that cannot run.
Review Workflow
For NestJS reviews, prioritize findings in this order:
- Security and authorization bypasses.
- Input validation gaps and unsafe file handling.
- Broken DI/module exports, circular dependencies, and request-scope leaks.
- Transaction consistency, N+1 queries, and migration risks.
- API contract regressions and missing tests for changed behavior.
Give file and line references for findings. Avoid style-only comments unless they hide a maintainability or behavior risk.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

