AgentStack
SKILL verified MIT Self-run

Create Subdomain

skill-softtor-nestjs-hexagonal-create-subdomain · by Softtor

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.

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-softtor-nestjs-hexagonal-create-subdomain

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README — it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-softtor-nestjs-hexagonal-create-subdomain)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming — see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps — measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Create Subdomain? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

create-subdomain

Orchestrator that dispatches specialized agents per architectural layer. Each agent loads its corresponding skill and follows TDD.

> Agent Dispatch: The dispatch blocks below are conceptual templates. In Claude Code, dispatch agents using the Agent tool with a prompt string that includes "Load skill nestjs-hexagonal: for patterns." The agent's model and tools are defined in the agent .md file frontmatter, not in the tool call.

Compatible with GSD: each phase maps to a GSD execution step.


Phase 1 — Requirements Gathering (inline)

Ask the user via AskUserQuestion. Collect all answers before dispatching agents.

  1. Bounded context name and business purpose?
  2. Main entities? Which is the aggregate root?
  3. Value objects needed? (money, status, email, document, etc.)
  4. Domain events? (created, updated, status-changed, cancelled)
  5. Multi-tenant? Field name? (organizationId or companyId)
  6. CQRS pattern? (A: plain UseCase, B: Command/Query, C: Handler as Orchestrator)
  7. RBAC guards on endpoints?
  8. Sub-modules? (e.g., subscription -> plans, payments, core)
  9. Cross-module ports needed? (which existing modules to communicate with)
  10. Read model projection in Redis? (CQRS R/W separation)

After answers, create the directory structure:

/
├── domain/
│   ├── entities/__tests__/
│   ├── value-objects/__tests__/
│   ├── events/
│   ├── repositories/
│   ├── services/
│   └── testing/helpers/
├── application/
│   ├── dtos/
│   ├── commands/          # Pattern B/C
│   ├── queries/           # Pattern B/C
│   ├── usecases/          # Pattern A/C
│   └── ports/
└── infrastructure/
    ├── .module.ts
    ├── controllers/dtos/
    ├── database/prisma/repositories/
    ├── database/prisma/models/
    ├── database/in-memory/repositories/
    ├── adapters/
    └── listeners/

Phase 2 — Domain Layer via domain-agent (Opus 4.6)

Dispatch the domain-agent with context from Phase 1:

Agent tool:
  subagent_type: "nestjs-hexagonal:domain-agent"
  model: opus
  prompt: |
    Create domain layer for "" at "".
    Entity: , Props: 
    VOs: , Events: 
    Multi-tenant: 
    TDD: tests first. Load skill nestjs-hexagonal:domain.

The agent will create: entity + tests, VOs + tests, events, repository interface, data builders. Verify types compile.

Wait for completion before Phase 3.


Phase 3 — Application Layer via application-agent (Sonnet 4.6)

Agent tool:
  subagent_type: "nestjs-hexagonal:application-agent"
  model: sonnet
  prompt: |
    Create application layer for "" at "".
    Pattern: , Operations: 
    Ports: , Read model: 
    Domain layer at "/domain/".
    TDD: tests first. Load skill nestjs-hexagonal:application.

Creates: DTOs, use cases/handlers, ports, tests.

Wait for completion before Phase 4.


Phase 4 — Infrastructure Layer via infrastructure-agent (Sonnet 4.6)

Agent tool:
  subagent_type: "nestjs-hexagonal:infrastructure-agent"
  model: sonnet
  prompt: |
    Create infrastructure layer for "" at "".
    Pattern: , Ports to implement: 
    Event handlers: 
    Load skill nestjs-hexagonal:infrastructure.

Creates: Prisma repo, model mapper, in-memory repo, adapters, event handlers, module wiring.

Wait for completion before Phase 5.


Phase 5 — Presentation Layer via presentation-agent (Sonnet 4.6)

Skip if no HTTP endpoints needed.

Agent tool:
  subagent_type: "nestjs-hexagonal:presentation-agent"
  model: sonnet
  prompt: |
    Create presentation layer for "" at "".
    Pattern: , Endpoints: 
    RBAC: 
    Load skill nestjs-hexagonal:presentation.

Creates: controller, request DTOs, Swagger, module registration.

Wait for completion before Phase 6.


Phase 6 — Verification (inline)

Run directly, no agent needed:

pnpm check-types
pnpm lint
pnpm test --filter 
pnpm build

All must exit 0. Fix root causes, no suppression.


Phase 7 — Architecture Review via architecture-reviewer (Sonnet 4.6)

Agent tool:
  subagent_type: "nestjs-hexagonal:architecture-reviewer"
  model: sonnet
  prompt: |
    Review bounded context at "".
    Check all 6 dimensions. Produce Pass/Warning/Fail report.

Address every FAIL. Report to user: structure, pattern, decisions, deferred warnings.


GSD Compatibility

This workflow maps directly to GSD phases:

| GSD Phase | create-subdomain Phase | Agent | |---|---|---| | Research | Phase 1 (requirements) | inline | | Execute task 1 | Phase 2 (domain) | domain-agent (Opus) | | Execute task 2 | Phase 3 (application) | application-agent (Sonnet) | | Execute task 3 | Phase 4 (infrastructure) | infrastructure-agent (Sonnet) | | Execute task 4 | Phase 5 (presentation) | presentation-agent (Sonnet) | | Verify | Phase 6 (verification) | inline | | Review | Phase 7 (review) | architecture-reviewer (Sonnet) |

When used within GSD, each phase can be a separate GSD task tracked in the plan.


Anti-Patterns

| Anti-pattern | Correction | |---|---| | Use case for simple findById without RBAC | Repository directly in controller | | EventPublisher in UseCase | Only in the CQRS Handler | | Exporting repositories from module | Export only Port token Symbols | | class-validator in domain VOs | Manual validate() with InvalidArgumentError | | Repository dispatching events | Repository is pure persistence | | Circular module dependencies | Ports in consumer, adapter in provider | | Mixing patterns A/B/C in one BC | Choose one, apply consistently | | Creating abstractions for one-time use | YAGNI — 3 lines > premature abstraction | | @Injectable in domain or UseCase | Only in infrastructure + CQRS handlers | | Entity.create() in mapper | Use Entity.restore() to avoid event emission | | organizationId from request body | Always from @CurrentOrganization() auth context | | Writing implementation before test | TDD: red -> green -> refactor |


References

| File | Content | |---|---| | references/tdd-workflow.md | Test templates and TDD sequence per layer | | references/checklist.md | 30+ item delivery checklist grouped by layer | | references/bc-organization.md | When and how to split a BC into sub-modules |

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.