/cortex-web:nestjsfrom cortex-web
Provides opinionated house conventions for NestJS backends — module layering, provider wiring, guards/interceptors/pipes/filters, DTO validation, domain exceptions, and Nest 11 / Express 5 patterns. Activates when NestJS code is detected.
Ships in cortex-web. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
House conventions for NestJS backends on v11 / Express 5. Apply them to code you are writing or changing — don't restructure untouched modules unless asked.
Examples throughout use an invented shipment domain purely to make the shape concrete. Read the structure, not the names.
Two layers, and the dependency arrow points one way only.
core/ domain + infrastructure. No controllers, no HTTP. → core only
app/ features. Controllers, DTOs, guards, middleware, CQRS. → app + core
A core module that needs to reach into a feature is telling you the concept it owns sits in the wrong layer — move the concept down rather than importing upward. Keeping the arrow honest is what lets a core module be driven by an HTTP request, a cron job, a CLI, or a queue consumer without dragging a controller along.
These hold for nearly every change, so they live here rather than behind a reference:
.module.ts. A provider that isn't exported can be refactored freely; one that is becomes public API.class-validator, behind a ValidationPipe with whitelist: true, forbidNonWhitelisted: true, transform: true. Without whitelisting, an unexpected property rides through into your persistence layer.Error becomes a 500, so a legitimate "not found" pages someone.APP_GUARD / APP_PIPE / APP_INTERCEPTOR / APP_FILTER. app.useGlobal*() binds outside any module, so those instances cannot inject anything.Six behaviours that contradict what the API name suggests, so they get stated here rather than in a reference you would only open if you already suspected a problem. Each one compiles cleanly and fails at runtime.
@Get("files/*") and forRoutes("*") no longer match — write @Get("files/*splat") and forRoutes("{*splat}"). :param? is gone too.@Res() opts the handler out of the framework's response handling — @HttpCode, @Header, serialization, and every response interceptor stop applying. Add { passthrough: true } unless you are sending the response yourself.ClassSerializerInterceptor only transforms class instances. Returning { user: new UserEntity() } skips @Exclude() silently and ships the excluded field.ttl is milliseconds in @nestjs/cache-manager and @nestjs/throttler, and a cache ttl: 0 means never expire, not "don't cache".ClientProxy.send() returns a cold Observable and HttpService returns one too — nothing happens until something subscribes.The first and the fifth are version-specific. Check @nestjs/core in package.json before applying anything in this skill marked v11, and read references/nestjs-11-migration.md if the project is older.
Read the file that matches the change; don't preload all of them.
| Working on | Read |
|---|---|
| Directory layout, filenames, barrels, CQRS vs service, persistence | references/architecture.md |
Providers, tokens, scopes, ModuleRef, circular deps, lifecycle hooks | references/dependency-injection.md |
| Guards, interceptors, pipes, middleware, decorators, responses, versioning | references/request-lifecycle.md |
| DTOs, class-validator, serialization, Swagger/OpenAPI | references/dto-validation-openapi.md |
| Exceptions, exception filters, error messages | references/errors.md |
ConfigModule, ConfigService, logging | references/configuration-and-logging.md |
@nestjs/axios, event-emitter, bullmq, throttler, cache-manager, schedule, microservices | references/ecosystem-packages.md |
| Upgrading from v10, or code that predates Express 5 | references/nestjs-11-migration.md |
| Tests | the cortex-testing:conventions skill's NestJS Jest references |
When you are reviewing rather than writing, references/request-lifecycle.md and references/nestjs-11-migration.md catch the most defects per line read: enhancer ordering and Express 5 route syntax both fail in ways that type-check cleanly.
references/architecture.md (opens in a new tab)references/configuration-and-logging.md (opens in a new tab)references/dependency-injection.md (opens in a new tab)references/dto-validation-openapi.md (opens in a new tab)references/ecosystem-packages.md (opens in a new tab)references/errors.md (opens in a new tab)references/nestjs-11-migration.md (opens in a new tab)references/request-lifecycle.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub alexander-danilenko/cortex-claude-code-plugins --plugin cortex-web5 skills in this plugin
/javascriptApply these opinionated JavaScript conventions whenever writing or reviewing JS or Node: ESM-first packaging, choosing between Promise combinators, error handling that doesn't swallow failures, AbortController for cancellation, keeping the event loop unblocked, and reaching for platform APIs before dependencies./nextjsApply these opinionated Next.js conventions whenever writing or reviewing App Router code (14+): Server Components by default, where the 'use client' boundary belongs, the caching defaults that changed in Next 15, tag-based revalidation, treating Server Actions as public endpoints, the Metadata API, and next/image and next/font./reactApply these opinionated React conventions when writing React 18+ or 19 components: hooks patterns, Server Components, Suspense boundaries, state management, performance memoization, React 19 features (use, form actions)./typescriptApply these opinionated TypeScript conventions whenever writing or reviewing TypeScript: branded types for domain modeling, discriminated unions for state, `satisfies` over `as`, const objects instead of enums, type-only imports, and the strict tsconfig baseline beyond `strict: true`. Also use for monorepo project references and incremental build setup.Other plugins' skills for the same job