By Softtor
Skills for building NestJS bounded contexts with Hexagonal Architecture, DDD, and CQRS patterns. Covers domain modeling, application layer, infrastructure wiring, presentation, full TDD workflow, and architecture review.
Creates application layer artifacts for a NestJS bounded context — use cases, CQRS command/query handlers, DTOs, ports, and application services. Dispatched by create-subdomain workflow or triggered by "create use case", "add handler", "cqrs command".
Reviews a bounded context for Hexagonal Architecture + DDD + CQRS compliance. Specializes in detecting over-engineering and code smells. Produces structured reports with architecture compliance, over-engineering audit, and code smell detection. Use after implementing a bounded context, when asked to "review architecture", "check for over-engineering", or "review bounded context".
Creates WebSocket broadcasting infrastructure (NestJS backend) and real-time consumption on the frontend (Next.js or React). Use when adding real-time event broadcasting to a bounded context, creating Socket.IO gateways, or implementing frontend event listeners. Dispatched after infrastructure layer is complete.
Creates domain layer artifacts for a NestJS bounded context — entities (AggregateRoot), value objects, domain events, repository interfaces, domain services, validators, and data builders. Uses Opus 4.6 for critical domain modeling decisions. Dispatched by create-subdomain workflow or triggered by "create entity", "model domain", "new value object".
Debugs the full event chain from domain event dispatch through WebSocket delivery to frontend component consumption. Use when events are not reaching the frontend, WebSocket is not updating, handlers are not firing, or real-time updates are broken. Follows the Debug Rule — always trace from origin to UI.
Use when creating application layer artifacts for a NestJS bounded context — use cases, CQRS command/query handlers, DTOs, ports (cross-module interfaces), application services, or read model projections. Supports three patterns: plain UseCase (A), CQRS native (B), and Handler-as-Orchestrator (C).
Orchestrates creation of a NestJS bounded context by dispatching specialized agents per layer (domain, application, infrastructure, presentation). Uses Opus for domain modeling, Sonnet for execution layers. Compatible with GSD workflow (usable as phase execution). Follows TDD, Hexagonal Architecture, DDD, and CQRS.
Use when creating domain layer artifacts for a NestJS bounded context — entities (AggregateRoot), value objects, domain events, repository interfaces, domain services, validators, or data builders. Covers Hexagonal Architecture + DDD patterns with NestJS CQRS native event support.
Use when creating event listeners that react to domain events — same-BC side effects (projections, audit, cache), cross-BC reactions (another bounded context consuming events), or bridge listeners (WebSocket broadcast, RabbitMQ publish, email). Covers listener taxonomy, placement rules, Strategy+Gateway pattern for fan-out, and anti-over-engineering criteria.
Configures a NestJS project to use the nestjs-hexagonal plugin with GSD workflow. Adds skill references to CLAUDE.md, creates GSD-compatible phase templates, and maps GSD phases to plugin agents. Use when setting up a new project with GSD + hexagonal architecture, or when asked to "install hexagonal for GSD", "configure GSD with hexagonal", or "setup nestjs-hexagonal".
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Claude Code plugin for building NestJS bounded contexts with Hexagonal Architecture, DDD, and CQRS patterns.
This plugin provides layer-specific skills, specialized agents, and workflow orchestrators for creating well-structured NestJS bounded contexts. It codifies Ports & Adapters architecture combined with Domain-Driven Design and the @nestjs/cqrs module.
Who it's for: Teams building NestJS applications that follow clean architecture and want consistent, reviewable code.
Key patterns:
AggregateRoot, domain events via entity.commit(), and EventBusWsGatewayPort abstractionCompatible with GSD workflow (usable as phase execution within milestones).
# 1. Add the marketplace (one time)
/plugin marketplace add softtor/nestjs-hexagonal
# 2. Install the plugin
/plugin install nestjs-hexagonal
claude --plugin-dir /path/to/nestjs-hexagonal
| Skill | Trigger examples | What it does |
|---|---|---|
nestjs-hexagonal:domain | "create entity", "new value object" | Entity (AggregateRoot), VOs, events, repo interfaces, data builders |
nestjs-hexagonal:application | "create use case", "cqrs handler" | Use cases, handlers, DTOs, ports, read models |
nestjs-hexagonal:infrastructure | "prisma repo", "module wiring" | Prisma repos, mappers, adapters, NestJS modules |
nestjs-hexagonal:presentation | "create controller", "request dto" | Controllers, request DTOs, Swagger, error filters |
nestjs-hexagonal:websocket-broadcasting | "broadcast event", "ws gateway" | Domain event -> WebSocket broadcast to frontend |
| Skill | What it does |
|---|---|
nestjs-hexagonal:create-subdomain | Orchestrates full BC creation by dispatching agents per layer |
nestjs-hexagonal:review-subdomain | Architecture compliance + over-engineering + code smell review |
Each agent loads its corresponding skill and specializes in one concern.
| Agent | Model | Purpose |
|---|---|---|
domain-agent | Opus 4.6 | Domain modeling — entities, VOs, events, repo interfaces |
application-agent | Sonnet 4.6 | Use cases, CQRS handlers, DTOs, ports |
infrastructure-agent | Sonnet 4.6 | Prisma repos, module wiring, adapters |
presentation-agent | Sonnet 4.6 | Controllers, request DTOs, Swagger |
broadcasting-agent | Sonnet 4.6 | WS gateway (backend) + event consumption (Next.js/React frontend) |
listener-agent | Sonnet 4.6 | Creates event listeners (same-BC projections, cross-BC reactions, bridge) |
architecture-reviewer | Opus 4.6 | Over-engineering detection + code smell identification |
event-debug-agent | Opus 4.6 | Debug full event chain: entity -> dispatch -> WS -> frontend |
Why Opus for domain, review, and debug? Domain modeling requires critical decisions. Review requires deep judgment to distinguish necessary from unnecessary complexity. Event debugging requires tracing across 6 layers systematically.
UseCase
-> entity = Entity.create(props) # entity.apply(event) queues internally
-> repo.save(entity) # repo is PURE persistence
-> return entity # UseCase returns entity to Handler
Handler
-> publisher.mergeObjectContext(entity) # Handler wraps entity
-> entity.commit() # Handler dispatches via EventBus
-> return { id: entity.id }
EventBus -> @EventsHandler # Side effects, projections, WS broadcast
Critical rule: EventPublisher lives in the Handler, NEVER in the UseCase.
| Scenario | Pattern |
|---|---|
| Simple CRUD without side effects | A: Plain UseCase + TOKEN |
| Module uses CQRS | B: Command/Query handlers |
| Complex orchestration with multiple services | C: Handler as Orchestrator |
Simple findById without RBAC | No use case — repo directly in controller |
| Layer | Where | Tool | Responsibility |
|---|---|---|---|
| Request DTO | presentation | class-validator | Format, presence, types |
| Application DTO | application | TypeScript interfaces | Layer contract |
| Domain VO | domain | Manual validate() | Business invariants |
| Queue Schema | integration | Zod | Inter-service contract |
One pattern only: @EventsHandler -> enrich if needed -> WsGatewayPort.emit().
npx claudepluginhub softtor/nestjs-hexagonal --plugin nestjs-hexagonalEditorial "DDD & Evented Architecture" bundle for Claude Code from Antigravity Awesome Skills.
Advanced NestJS skills for dependency injection, guards, and testing.
No description provided.
Full-spectrum design patterns skill: Detect anti-patterns, diagnose architectural debt, and generate production-ready refactored code. Covers GoF, SOLID, Clean Architecture, DDD, CQRS, Microservices, and Cloud patterns.
TypeScript/JavaScript full-stack development with NestJS, React, and React Native
PHP Architecture Toolkit — DDD, CQRS, Event Sourcing, Clean/Hexagonal Architecture, GoF Patterns, PSR, Docker, CI/CD