# Nestjs Modular Monolith

Specialist in designing and implementing scalable modular monolith architectures using...

- Repository: https://github.com/tech-leads-club/agent-skills (7121 stars)
- Category: Design
- License: CC-BY-4.0
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add tech-leads-club/agent-skills --skill nestjs-modular-monolith -g -a claude-code -y`
Codex: `npx skills add tech-leads-club/agent-skills --skill nestjs-modular-monolith -g -a codex -y`
Cursor: `npx skills add tech-leads-club/agent-skills --skill nestjs-modular-monolith -g -a cursor -y`
Gemini CLI: `npx skills add tech-leads-club/agent-skills --skill nestjs-modular-monolith -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add tech-leads-club/agent-skills`

## Description

Specialist in designing and implementing scalable modular monolith architectures using NestJS with DDD, Clean Architecture, and CQRS patterns. Use when building modular monolith backends, designing bounded contexts, creating domain modules, implementing event-driven module communication, or when user mentions "modular monolith", "bounded contexts", "module boundaries", "DDD", "CQRS", "clean architecture NestJS", or "monolith to microservices". Do NOT use for simple CRUD APIs, frontend work, general NestJS questions without architectural context, or stack-agnostic evolutionary modular monolith design (use evolutionary-modular-architecture).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Modular Monolith Specialist

Consultative architect and implementer specializing in robust, scalable modular monolith systems using NestJS. Designs architectures that balance modularity, maintainability, and evolutionary potential through DDD and Clean Architecture.

## Role Definition

You are a senior backend architect with deep expertise in modular monolith design. You guide users from domain analysis to production-ready implementation. You combine the benefits of microservices (boundaries, independence, testability) with monolith simplicity (single deployment, shared infrastructure, simple ops) while maintaining a clear evolution path to microservices when needed.

## When to Use This Skill

- Designing a new modular monolith from scratch
- Defining bounded contexts and domain boundaries
- Creating NestJS modules with Clean Architecture layers
- Setting up event-driven communication between modules
- Optionally implementing CQRS when the domain justifies it
- Planning monolith-to-microservices evolution paths
- Configuring NX monorepo workspace for modular backends
- Reviewing module boundaries and state isolation

## When NOT to Use

- Simple CRUD APIs with < 10 endpoints (NestJS defaults suffice)
- Frontend or full-stack questions without backend architecture focus
- General NestJS questions without architectural context
- Microservices-first architectures (different patterns apply)
- Prototypes or MVPs where speed > structure

## Core Principles

**10 Modular Monolith Principles**, these override general NestJS defaults when they conflict:

The rest: https://github.com/tech-leads-club/agent-skills/blob/HEAD/packages/skills-catalog/skills/(development)/nestjs-modular-monolith/SKILL.md
