nestjs-architecture-principles
БесплатноБез исполняемых скриптовНе проверенDesigns and reviews NestJS application architecture using cohesive feature modules, modular monoliths, layered or hexagonal boundaries, dependency inversion…
от aiskillstore★ 509 звёзд на GitHubОб этом скилле
NestJS Architecture and Principles
Make architecture decisions from the repository's actual constraints. Prefer the least complex design that protects the required boundaries and can evolve safely.
Pre-execution conflict guard
Before editing files or running any state-changing command, reconcile active instructions. Read-only inspection may continue.
Prerequisites
Inspect repository instructions, installed versions, module wiring, contracts, callers, tests, and affected commands. Preserve user changes. Read other active skills only when their decisions overlap.
Primary ownership
This skill owns architecture level, capability/module APIs, dependency direction, data/write and transaction boundaries, ports, and service extraction. When installed and relevant, coordinate with:
nestjs-oop-design-patterns: object responsibilities, invariants, and patterns.nestjs-features-performance: lifecycle, API/security, testing, runtime, and performance.nestjs-professional-software-engineering: implementation and verification.nestjs-code-audit: read-only quality evidence and deduplicated reporting.nestjs-feature-audit: branch-specific roadmap gate and feature reporting.nestjs-git-commit-pr-message: authorized Git publication and CI follow-up.
These are decision boundaries, not required dependencies. Retain domain ownership when handing work to another workflow.
Conflict test
Check for incompatible edits/contracts, command order or side effects, competing owners, and unmet version, evidence, authorization, or repository prerequisites. Resolve using explicit user intent, repository contracts, verified runtime constraints, then the narrowest owner. Assign one lead per decision; do not create parallel designs to satisfy incompatible advice. If a material conflict remains, stop before mutation and ask for the smallest missing decision. Audits stay read-only; explicit fix authorization applies in a distinct implementation phase.
Start with evidence
Before recommending or changing architecture:
- Read
package.json,nest-cli.json, TypeScript configuration, bootstrap files, and the relevant modules. - Map the module import graph, provider exports, entry points, persistence ownership, transports, and existing tests.
- Identify the business capability and the concrete change pressure: team ownership, independent scaling, volatile integrations, transaction boundaries, security, or delivery speed.
- State the current architecture in one sentence. Do not label a project "Clean Architecture" or "DDD" from folder names alone.
- Preserve healthy local conventions. Flag a convention only when it damages correctness, security, operability, or an explicit contract.
If the task is version-sensitive, verify the installed NestJS version and current official documentation before using an API or command.
Choose the architecture level
Use the architecture ladder in references/architecture-ladder.md.
Default direction:
- Start with a modular monolith organized by business capability.
- Add internal layers when domain logic or infrastructure volatility makes the boundary valuable.
- Add ports where the application needs to isolate a replaceable external concern.
- Add CQRS only when command and query behavior genuinely diverge.
- Split a service only when it has an independent deployment, ownership, scaling, data, or failure boundary.
Never introduce layers, buses, repositories, factories, or services only to make the folder tree resemble a diagram.
Protect these boundaries
- Modules expose a small public API. Providers are private unless another module has a real use for them.
- A business capability owns its invariants and writes. Other modules collaborate through an exported application service, port, event, or deliberately designed read model.
- Dependencies point toward policy. Domain code does not import NestJS, an ORM, HTTP types, queue jobs, or vendor SDKs.
- Controllers and transport handlers adapt. They authenticate/authorize through framework mechanisms, validate transport input, invoke an application operation, and map the result.
- Application operations coordinate. They define use-case flow and transaction intent without absorbing persistence or transport details.
- Infrastructure implements edges. ORMs, brokers, caches, file systems, and external APIs stay behind explicit boundaries when their volatility or test cost warrants it.
- Cycles are design feedback. Treat
forwardRef()as a last-resort compatibility tool, not the default fix. - The composition root owns wiring. Nest modules and providers assemble implementations; business objects do not locate dependencies at runtime.
For the consolidated rule set, load references/architecture-rules.md. For detailed NestJS boundaries, load [references/module-boundaries.md](references/module-bounda
Установить nestjs-architecture-principles в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nestjs-architecture-principles?
Designs and reviews NestJS application architecture using cohesive feature modules, modular monoliths, layered or hexagonal boundaries, dependency inversion, and pragmatic engineering principles. Use when planning a NestJS project, changing module boundaries, evaluating Clean Architecture or DDD, resolving circular dependencies, defining ports and adapters, reviewing coupling, or deciding whether CQRS or microservices are justified. Do not use for pure frontend work or non-NestJS backends. When other skills also apply, reconcile ownership before mutation.
Как установить скилл nestjs-architecture-principles?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nestjs-architecture-principles запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic