NestJS Best Practices skill
40 NestJS rules in ten sections by impact: the agent writes modules, DI and security without common mistakes.
- 298 ★ on the repository
- Last commit
Minimal access
Why this level
- The skill consists of text rules and code examples; it runs nothing and makes no network calls.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/nestjs-best-practicesDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewMinimal accessThe tool runs nothing and makes no network calls.
- The skill consists of text rules and code examples; it runs nothing and makes no network calls.
This is third-party code. Review the repository files before installing.
What it does
The `nestjs-best-practices` skill gathers 40 NestJS rules, each in its own file with a bad and a good code example. The rules are grouped into ten sections marked by impact: architecture and dependency injection are critical, error handling, security and performance are high, testing and the database are medium-high, API design and microservices are medium, operations are low-medium. The agent loads the skill when it writes or reviews NestJS code: modules, controllers, services, authentication, database queries. Example rules: `arch-avoid-circular-deps` against circular module dependencies, `security-use-guards` for route protection, `db-avoid-n-plus-one` against extra queries, `test-use-testing-module` for isolated tests. The installable copy lives in the `skills/nestjs-best-practices` directory.
Who it is for. Backend developers on NestJS whose agent writes modules and services but breaks accepted architecture and security practices.
Good fit when
- A new NestJS module is written from scratch and the agent should follow the accepted feature-based structure.
- Code review reveals circular dependencies between modules and services that run to hundreds of lines.
- Routes are closed with guards and input is validated through DTOs and pipes.
- A list of a hundred records loads for over a second because of one-by-one queries.
- Tests boot the whole application when a testing module would be enough.
Not a fit when
- The project is written on Express or Fastify without NestJS.
- Ready deploy configurations are wanted: the rules hold only principles and code examples.
- The team already has its own rule set and it conflicts with these.
Example request
Review the orders module against NestJS rules: find circular dependencies, unprotected routes and one-by-one database queries.Limitations
The rules rest on general practice and NestJS documentation with no tie to a framework version, so the agent checks the project's version and stack itself. The repository has no scripts that check code automatically; the skill only prompts the agent. The repository root states no license, while the skill header says MIT. The last commit is from July 2026. The README promotes the author's separate product Semfora, which has nothing to do with installing the skill.
How to disable. Delete the `nestjs-best-practices` directory from the agent's skills directory, for example `.claude/skills`. A global installation is removed in the agent's home directory.
FAQ
How do I install NestJS Best Practices in Claude Code?
Run `npx skills add Kadajett/agent-nestjs-skills` in the project directory. The `--global` flag makes the skill available in every project and `-a claude-code -a cursor` selects the agents.
How many rules are in the skill and how are they built?
Forty rules, one file per rule, with "Incorrect" and "Correct" blocks, an explanation and a link to the NestJS documentation. The file name starts with a section prefix: `arch-`, `di-`, `error-`, `security-`, `perf-`, `test-`, `db-`, `api-`, `micro-`, `devops-`.
Which rules have the top priority?
The critical ones: architecture and dependency injection. Error handling, security and performance follow. Testing and the database got a medium-high level.
How do I add my own rule?
Copy `rules/_template.md` to an `area-description.md` file with the right prefix, fill in the description and examples, then run `npm run build` in the `scripts` directory. The script rebuilds `AGENTS.md`.
Which agents does the skill work with?
The README names Claude Code, OpenCode, Codex, Cursor, Antigravity and Roo Code. The skill installs through the standard `skills` package.
Discussion
No questions or reviews yet.
Related
SkillsA set of 14 skills for Java Spring Boot, from requirements analysis and code generation to tests, review and Docker deployment.
A set of Claude Code and Codex skills that teach the agent to write Spring Boot by your conventions and templates
Node.js skills from a Fastify co-creator: Node and Fastify practices, TypeScript, OAuth, linting and documentation
Three skills for TypeScript logging: review code and move to wide events, build an audit trail and analyze local logs
Four skills with Spatie's standards for Laravel, PHP, JavaScript, git and security, installed via Laravel Boost or skills.sh
Six skills for Java work: Spring Boot 4, Modulith checks, jSpecify, code review and the Progen project generator.
README in short
Installation goes through the `skills` package for several agents. The rest of the README teaches maintaining the set: directory structure, rule template, section prefixes and building the combined `AGENTS.md`.
README badge
Original SKILL.md
--- name: nestjs-best-practices description: NestJS best practices and architecture patterns for building production-ready applications. This skill should be used when writing, reviewing, or refactoring NestJS code to ensure proper patterns for modules, dependency injection, security, and performance. license: MIT metadata: author: Kadajett version: "1.2.0" --- # NestJS Best Practices Comprehensive best practices guide for NestJS applications. Contains 40 rules across 10 categories, prioritized by impact to guide automated refactoring and code generation. ## When to Apply Reference these guidelines when: - Writing new NestJS modules, controllers, or services - Implementing authentication and authorization - Reviewing code for architecture and security issues - Refactoring existing NestJS codebases - Optimizing performance or database queries - Building microservices architectures ## Rule Categories by Priority | Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | Architecture | CRITICAL | `arch-` | | 2 | Dependency Injection | CRITICAL | `di-` | | 3 | Error Handling | HIGH | `error-` | | 4 | Security | HIGH | `security-` | | 5 | Performance | HIGH | `perf-` | | 6 | Testing | MEDIUM-HIGH | `test-` | | 7 | Database & ORM | MEDIUM-HIGH | `db-` | | 8 | API Design | MEDIUM | `api-` | | 9 | Microservices | MEDIUM | `micro-` | | 10 | DevOps & Deployment | LOW-MEDIUM | `devops-` | ## Quick Reference ### 1. Architecture (CRITICAL) - `arch-avoid-circular-deps` - Avoid circular module dependencies - `arch-feature-modules` - Organize by feature, not technical layer - `arch-module-sharing` - Proper module exports/imports, avoid duplicate providers - `arch-single-responsibility` - Focused services over "god services" - `arch-use-repository-pattern` - Abstract database logic for testability - `arch-use-events` - Event-driven architecture for decoupling