nestjs-best-practices

nestjs-best-practices is a skill for Claude Code from giuseppe-trisciuoglio/developer-kit. It costs 64 tokens per session (1,517 once invoked), scanned A, original, MIT.

A set of NestJS design practices for building server-side applications with clear modules, dependency injection, error handling, request validation, and Drizzle ORM database access. Dependency injection means supplying a class with the services it needs instead of making them itself.

In plain words
What is it for?
Use it when designing or refactoring NestJS modules and providers, validating data-transfer objects, creating exception filters, managing dependency lifecycles, or connecting Drizzle ORM.
Why use it?
It helps prevent tangled modules, hidden dependencies, weak input checks, and inconsistent error handling as an application grows. It also gives guidance for keeping shared and feature-specific code separated.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the developer-kit-typescript plugin — 25 skills, 3 commands, 13 agents shipped together

Good fit Use it when designing or refactoring NestJS modules and providers, validating data-transfer objects, creating exception filters, managing dependency lifecycles, or connecting Drizzle ORM.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/giuseppe-trisciuoglio/developer-kit/nestjs-best-practices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add giuseppe-trisciuoglio/developer-kit --skill nestjs-best-practices
Clone the repo
git clone --depth 1 https://github.com/giuseppe-trisciuoglio/developer-kit

Made for: Claude Code.

Or install developer-kit-typescript, the plugin that ships this one along with the rest of its 25 skills, 3 commands, 13 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nestjs-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/nestjs-best-practices/github.svg)](https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/nestjs-best-practices)
Your own site
<a href="https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/nestjs-best-practices"><img src="https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/nestjs-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nestjs-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/nestjs-best-practices"><img src="https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/nestjs-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,517 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 1 Apr 2026
  • Snyk pass 1 Apr 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.01517
Opus 5 $0.00032 $0.00758
Sonnet 5 $0.00013 $0.00303
Haiku 4.5 $0.00006 $0.00152

Measured today against content hash b005b2213009, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

nestjs-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 3 executable files (assets/templates/controller-template.ts, assets/templates/module-template.ts, assets/templates/service-template.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/developer-kit-typescript/skills/nestjs-best-practices/SKILL.md · 176 lines

How it starts

The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.

NestJS Best Practices

Overview

Grounded in the Official NestJS Documentation, this skill enforces modular architecture, dependency injection scoping, exception filters, DTO validation with class-validator, and Drizzle ORM integration patterns.

When to Use

  • Designing/refactoring NestJS modules or dependency injection
  • Creating exception filters, validating DTOs, or integrating Drizzle ORM
  • Reviewing code for anti-patterns or onboarding to a NestJS codebase

Instructions

1. Modular Architecture

Follow strict module encapsulation. Each domain feature should be its own @Module():

  • Export only what other modules need — keep internal providers private
  • Use forwardRef() only as a last resort for circular dependencies; prefer restructuring
  • Group related controllers, services, and repositories within the same module
  • Use a SharedModule for cross-cutting concerns (logging, configuration, caching)

See references/arch-module-boundaries.md for enforcement rules.

2. Dependency Injection

Choose the correct provider scope based on use case:

Scope Lifecycle Use Case
DEFAULT Singleton (shared) Stateless services, repositories
REQUEST Per-request instance Request-scoped data (tenant, user context)
TRANSIENT New instance per injection Stateful utilities, per-consumer caches
  • Default to DEFAULT scope — only use REQUEST or TRANSIENT when justified
  • Use constructor injection exclusively — avoid property injection
  • Register custom providers with useClass, useValue, useFactory, or useExisting

See references/di-provider-scoping.md for enforcement rules.

3. Request Lifecycle

Understand and respect the NestJS request processing pipeline:

Middleware → Guards → Interceptors (before) → Pipes → Route Handler → Interceptors (after) → Exception Filters

Read the full file on GitHub · 176 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 176 lines · 64 tokens per session scan A b005b2213009

Subscribe to this mod's changes

nestjs-best-practices is a skill published in the GitHub repository giuseppe-trisciuoglio/developer-kit (343 stars, last pushed yesterday), licensed MIT. It adds 64 tokens to every session and 1,517 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.