Source profileQuality 92/100

nimadorostkar/Claude-Skills-collection/skills/backend/nestjs/SKILL.md

nestjs

Use when building NestJS services. Covers module structure, providers and scopes, validation pipes, guards and interceptors, TypeORM/Prisma integration, and testing.

Source repository stars
26
Declared platforms
0
Static risk flags
1
Last source update
2026-08-18
Source checked
2026-08-25

Decision brief

What it does: where it fits

Covers module structure, providers and scopes, validation pipes, guards and interceptors, TypeORM/Prisma integration, and testing.

Best for

  • Building or reviewing a NestJS service.
  • Structuring modules, providers, and their scopes.
  • Implementing authentication, authorization, and request validation.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill "skills/backend/nestjs"
Safe inspection promptEditorial

Inspect the Agent Skill "nestjs" from https://github.com/nimadorostkar/Claude-Skills-collection/blob/03f39b7041ec2679255f8d6bb5b18421561821ae/skills/backend/nestjs/SKILL.md at commit 03f39b7041ec2679255f8d6bb5b18421561821ae. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Workflow

    1. Model the modules on the domain — One module per bounded capability, exporting the services other modules may use. A module that exports everything is not a boundary. 2. Enable strict validation globally — whitelist: true and forbidNonWhitelisted: true. Without these, a clien…

    Model the modules on the domain — One module per bounded capability, exporting the services other modules may use. A module that exports everything is not a boundary.Enable strict validation globally — whitelist: true and forbidNonWhitelisted: true. Without these, a client can send extra fields and your DTO will happily carry them into the service.Push cross-cutting concerns out of controllers — Auth in a guard, logging and timing in an interceptor, error mapping in an exception filter.
  2. 02

    Purpose

    Build NestJS applications where the module graph reflects the domain, validation happens at the edge, and cross-cutting concerns live in guards and interceptors rather than being copied into every controller.

    Build NestJS applications where the module graph reflects the domain, validation happens at the edge, and cross-cutting concerns live in guards and interceptors rather than being copied into every controller.
  3. 03

    When to Use

    Building or reviewing a NestJS service.

    Building or reviewing a NestJS service.Structuring modules, providers, and their scopes.Implementing authentication, authorization, and request validation.
  4. 04

    Capabilities

    Module and provider design, including dynamic modules.

    Module and provider design, including dynamic modules.Validation with class-validator and the global ValidationPipe.Guards (authorization), interceptors (cross-cutting), filters (error mapping).
  5. 05

    Inputs

    The domain boundaries the modules should follow.

    The domain boundaries the modules should follow.The authentication scheme and the authorization model.The persistence layer.

Permission review

Static risk signals and limitations

Network access

medium · line 103

The documentation includes network, browsing, or remote request actions.

type: `https://api.example.com/errors/${error.kind.toLowerCase()}`,

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars26SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
nimadorostkar/Claude-Skills-collection
Skill path
skills/backend/nestjs/SKILL.md
Commit
03f39b7041ec2679255f8d6bb5b18421561821ae
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

NestJS

Purpose

Build NestJS applications where the module graph reflects the domain, validation happens at the edge, and cross-cutting concerns live in guards and interceptors rather than being copied into every controller.

When to Use

  • Building or reviewing a NestJS service.
  • Structuring modules, providers, and their scopes.
  • Implementing authentication, authorization, and request validation.
  • Writing unit and end-to-end tests for a Nest application.

Capabilities

  • Module and provider design, including dynamic modules.
  • Validation with class-validator and the global ValidationPipe.
  • Guards (authorization), interceptors (cross-cutting), filters (error mapping).
  • Data access with Prisma or TypeORM, correctly scoped.
  • Testing with the Nest testing module and Supertest.

Inputs

  • The domain boundaries the modules should follow.
  • The authentication scheme and the authorization model.
  • The persistence layer.

Outputs

  • Modules that encapsulate a domain and export only their public services.
  • A global validation pipe with whitelisting enabled.
  • Controllers that are thin, and services that contain the logic.

Workflow

  1. Model the modules on the domain — One module per bounded capability, exporting the services other modules may use. A module that exports everything is not a boundary.
  2. Enable strict validation globallywhitelist: true and forbidNonWhitelisted: true. Without these, a client can send extra fields and your DTO will happily carry them into the service.
  3. Push cross-cutting concerns out of controllers — Auth in a guard, logging and timing in an interceptor, error mapping in an exception filter.
  4. Keep providers stateless and singleton — Request-scoped providers cascade: anything that injects one becomes request-scoped too, and performance degrades quietly.
  5. Test at two levels — Unit tests for services with mocked dependencies, and end-to-end tests through the real HTTP stack with a real (containerized) database.

Best Practices

  • ValidationPipe without whitelist: true is decoration, not validation. Extra properties pass straight through.
  • transform: true on the pipe converts payloads into DTO class instances — otherwise your @Type decorators and defaults do nothing.
  • Circular module dependencies are a design smell. forwardRef is an escape hatch that hides a boundary you drew wrong.
  • Do not inject the repository into the controller. The controller's job is HTTP; the service's job is the domain.
  • Global exception filters map domain errors to HTTP status codes in one place. Throwing HttpException from a service couples the domain to the transport.
  • Use ConfigModule with a validation schema so a missing environment variable fails at boot.

Examples

Validation, guard, and thin controller:

// main.ts
app.useGlobalPipes(
  new ValidationPipe({
    whitelist: true,             // strip unknown properties
    forbidNonWhitelisted: true,  // and reject the request if any are present
    transform: true,             // instantiate the DTO class
  }),
);
export class CreateOrderDto {
  @IsUUID() customerId!: string;

  @IsArray()
  @ArrayMinSize(1)
  @ValidateNested({ each: true })
  @Type(() => OrderLineDto)
  lines!: OrderLineDto[];
}

@Controller("orders")
@UseGuards(JwtAuthGuard, TenantGuard)
export class OrdersController {
  constructor(private readonly orders: OrdersService) {}

  @Post()
  @HttpCode(HttpStatus.CREATED)
  create(@Body() dto: CreateOrderDto, @CurrentUser() user: User): Promise<OrderView> {
    return this.orders.place(user.tenantId, dto);
  }
}

Domain errors mapped centrally:

@Catch(DomainError)
export class DomainExceptionFilter implements ExceptionFilter {
  catch(error: DomainError, host: ArgumentsHost) {
    const status = {
      NOT_FOUND: 404,
      CONFLICT: 409,
      INVALID: 422,
    }[error.kind] ?? 400;

    host.switchToHttp().getResponse().status(status).json({
      type: `https://api.example.com/errors/${error.kind.toLowerCase()}`,
      title: error.message,
      status,
    });
  }
}

Notes

  • Request-scoped providers instantiate a new instance per request and force the entire injection chain above them to do the same. Measure before using one.
  • Nest's TestingModule lets you override any provider, which is almost always preferable to mocking a module's internals.
  • Interceptors run around the handler and can transform the response. That makes them the right place for a response envelope — and the wrong place for business logic.

Frequently asked questions

What to verify before installation and use

What does the nestjs source document cover?

Covers module structure, providers and scopes, validation pipes, guards and interceptors, TypeORM/Prisma integration, and testing.

How do I install nestjs?

The source record exposes this install command: npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill "skills/backend/nestjs". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged network in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 10029,034

garrytan/gbrain

bulk-ingestion

End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 10014,671

prowler-cloud/prowler

postgresql-indexing

PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing index usage statistics, reindexing, dropping indexes, or working with partitioned table indexes. Also trigger when discussing index strategies, partial indexes, or index maintenance

Computed 1005,241

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing