with one click
claude-nestjs-hexagonal
claude-nestjs-hexagonal contains 9 collected skills from MonsieurBarti, with repository-level occupation coverage and site-owned skill detail pages.
Skills in this repository
Adds a new domain error to an existing module — extends the module base error, sets error code and monitoring flag, and updates the exception filter mapping. Use when a command or query needs to throw a new business error. Requires /api-add-module.
Adds a new HTTP endpoint to an existing controller — request/response DTOs, Swagger decorators, and command/query wiring. Use after the module, entity, and command/query already exist. Requires /api-setup-shared and /api-add-module.
Creates a CQRS command + handler + in-memory test in a NestJS hexagonal module. Use when adding a write operation (state change) to a module. Command and handler live in the same file. Requires /api-setup-shared.
Creates a complete domain entity in a NestJS hexagonal module — entity, repository interface, test builder, unit tests, SQL repository, in-memory repository, mapper, and optionally domain events. Supports both standalone entities and AggregateRoot entities with domain event publishing. Use when adding a new aggregate to a module's domain layer.
Creates a domain event handler that reacts to events from another module (or the same module). Includes handler class and unit test. Use after domain events have been created with /api-add-domain-entity.
Creates a CQRS query + handler + integration test in a NestJS hexagonal module. Use when adding a read operation (data retrieval) to a module. Query and handler live in the same file. Handlers bypass the domain and repository layers entirely — direct PrismaService only. Requires /api-setup-shared.
Creates all shared infrastructure required for hexagonal NestJS modules — TypedCommand, TypedQuery, TypedCommandBus, TypedQueryBus, CorrelationId decorator, PaginatedQueryBase, BaseDomainError, BaseFeatureExceptionFilter, the BaseLogger pattern (wrapping nestjs-pino), ZodValidationPipe with @ZodSchema decorator, PrismaService + PrismaModule (global), validateEnv helper, CqrsInterceptor (bus observer), LoggingInterceptor (HTTP request logger), DomainEvent base class, SqlRepositoryBase (generic Prisma CRUD + auto event publishing), and IDateProvider + DateProvider + FakeDateProvider (date abstraction for deterministic testing). Run once per project before using other api-* skills.
Bootstraps a brand-new NestJS backend with hexagonal architecture — creates the project via the Nest CLI, removes boilerplate, installs the required stack (Prisma, Vitest, pino, CQRS, Fastify, Biome), configures package.json scripts, sets up git hooks via lefthook, creates the project-specific env config, and generates a .claude/CLAUDE.md project guide. Run once on a fresh directory; follow with /api-setup-shared to complete the shared infrastructure.
Scaffolds a complete NestJS hexagonal module with all 4 layers — domain, application, infrastructure, presentation. Use when starting a new bounded context or feature module. Requires /api-setup-shared.