common-architecture-di…
Draw architecture diagrams as editable draw.io files with a fixed house style, C4 levels, and evidence-tagged shapes. Use when producing a system context,…
Design NestJS module boundaries and provider ownership. Use only when structuring feature/core/shared modules, controller-service boundaries, or provider lifetime; defer JWT/security, caching, and unrelated request-pipeline recipes.
$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill nestjs-architecture --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/nestjs-architectureContext preview
The summary Claude sees to decide when to auto-load this skill.
Design NestJS module boundaries and provider ownership. Use only when structuring feature/core/shared modules, controller-service boundaries, or provider lifetime; defer JWT/security, caching, and unrelated request-pipeline recipes.
name: nestjs-architecture
description: Design NestJS module boundaries and provider ownership. Use only when structuring feature/core/shared modules, controller-service boundaries, or provider lifetime; defer JWT/security, caching, and unrelated request-pipeline recipes.
metadata:
triggers:
files:
- '**/*.module.ts'
- 'main.ts'
keywords:
- NestFactory
- Module
- Controller
- InjectableDesign feature modules with singleton-first providers and explicit request-pipeline choices.
1. **Create bounded feature**: module + controller + application service + persistence adapter. 2. **Keep controller thin**: Thin controllers, fat services. No business in Controller. Move logic to Service. 3. **Register dependencies once**: imports for modules, providers for services, exports only for true consumers. `@InjectRepository()` dependencies need `TypeOrmModule.forFeature([...])`. 4. **Validate at edges**: DTO validation pipes for incoming data; never trust raw payloads in services. 5. **Check circular imports**: check circular dependencies with `madge`; refactor contracts first and use `forwardRef()` only as last resort.
When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:
The portable SDLC standards layer for AI coding agents. Sync once, then work in your own runtime.
Repo: hoangnguyen0403/agent-skills-standard
Draw architecture diagrams as editable draw.io files with a fixed house style, C4 levels, and evidence-tagged shapes. Use when producing a system context,…
Enforce SOLID principles, guard-clause style, function size limits, and intention-revealing naming across all languages. Use when refactoring for readability,…
Standardize BRD and BRD-lite discovery for business goals, stakeholder impact, current-to-future state, and measurable value outcomes. Use when creating BRD,…
Conduct high-quality, persona-driven code reviews. Use when reviewing PRs, critiquing code quality, or analyzing changes for team feedback.
Maximize context window efficiency, reduce latency, and prevent lost-in-middle issues through strategic masking and compaction. Use when token budgets are…
Standardize dynamic application security testing for backend APIs, frontend web apps, and mobile clients. Covers ZAP, Nuclei, Nikto, sqlmap, ffuf, browser…