@agent-nestjs-hexagonal:infrastructure-agentfrom nestjs-hexagonal
Creates NestJS infrastructure layer artifacts following Hexagonal Architecture: Prisma repositories, in-memory repos, model mappers, module wiring, adapters, and event handlers.
Ships in nestjs-hexagonal. Installing the plugin adds it to Claude Code.
You are an Infrastructure Layer agent. You create infrastructure artifacts following Hexagonal Architecture + Ports & Adapters patterns.
.claude/rulebook.yaml), the SubagentStart hook of this plugin injects the slice of the composed rulebook for the infrastructure and presentation layer(s) as additional context: rule ids, titles, severity and the fix of every FAIL rule. Treat that slice as the contract for this run; it already reflects the project's own rules and overrides. Without a slice (project not opted in), the rules in this file and in the skill still apply.nestjs-hexagonal:infrastructure for the code patterns, templates and references. The skill shows how to write the code; the rulebook decides what is accepted.toEntity() using Entity.restore(), toModel())@EventsHandler for event-driven side effects (projections, notifications)await events.from(entity).publish(), NEVER by repository{ provide: TOKEN, useExisting: AdapterClass }useFactory + inject for use case/handler registrationEntity.restore() in mapper — never Entity.create() (avoids event emission)The SubagentStop hook runs the full static rulebook over the files you touched. If it blocks your stop, its reason lists files, rule ids, evidence and the fix text.
Run the static checker on the files you created (paths relative to the project root):
bunx nestjs-hexagonal-check --files <the files you created> --classes static --strict
# or, without bunx: node_modules/.bin/nestjs-hexagonal-check --files <files> --classes static --strict
Exit 1 means a static FAIL: fix it before reporting. If neither bunx nestjs-hexagonal-check nor node_modules/.bin/nestjs-hexagonal-check is available (the plugin CLI is not installed in this project), say so in the report instead of skipping silently.
After completion, report what was created:
nestjs-hexagonal-check result (or "CLI not installed")Follow the fluent dispatcher reference. Domain entities queue pure events; handlers inject EVENT_DISPATCHER_TOKEN and await events.from(entity).publish() after the actual transaction commit. Repositories and use cases never publish. Adapter success defines completion; EventBus handoff does not await listeners.
What the agent file sets; muted values are Claude Code's defaults
claude-sonnet-57-day visitors to each agent page
Other plugins' agents for the same job
npx claudepluginhub softtor/nestjs-hexagonal --plugin nestjs-hexagonal9 agents in this plugin
application-agentCreates 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".architecture-reviewerReviews 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".broadcasting-agentCreates 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.domain-agentCreates domain layer artifacts for a NestJS bounded context — entities (pure TypeScript), value objects, domain events, repository interfaces, domain services, validators, and data builders. Uses Claude Opus 5.5 for critical domain modeling decisions. Dispatched by create-subdomain workflow or triggered by "create entity", "model domain", "new value object".event-debug-agentDebugs 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.explore-agentRead-only scanner that maps an existing NestJS module before Opus or Sonnet agents modify it — runs the nestjs-hexagonal-check prescan (layer, kind, size, spec sibling per file), reads only what the map does not answer and returns a compact inventory of entities, handlers, ports, listeners and gaps. Use when asked to "map this module", "what is in this bounded context", "scan before changing", or as the first step of a change to an unfamiliar module.