dabydat/alpha-omega/nestjs-mappers
Claude Code and agent skill by dabydat/alpha-omega
- community
Checking that the SKILL.md file is still in the repository.
Mapper pattern for NestJS. Covers entity-to-domain mapping, domain-to-DTO transformation, and bidirectional mapping. Use when implementing data mappers, DTO transformations, or object conversion.
Install
npx vskill@latest install dabydat/alpha-omega/nestjs-mappersSKILL.md
NestJS Mappers
Mappers transform data between layers: domain ↔ persistence ↔ DTO. They are the translation layer that keeps layers independent.
Production patterns for: Entity-to-domain mapping, domain-to-DTO transformation, bidirectional transformations, static mapper methods
Agent collaboration: Backend Dev (clean transformation), Architect (layer isolation)
Core Principle: Unidirectional Transformations
See references/why-mappers.md for the three directions, the ❌ BAD direct-coupling example, and the ✅ GOOD explicit-transformation example.
Mapper Architecture
See references/mapper-architecture.md for the three transformations (toEntityPersistence, toDomain, toResponse).
Implementation Details
Domain to Persistence / Persistence to Domain
See references/domain-persistence.md.
Response DTO Transformation
See references/response-dto.md (toResponse and toDetailDto).
Nested Entity Mapping
See references/nested-entity.md (toDomainWithRelations).
Enum Mapping
See references/enum-mapping.md.
Mapper Index Pattern
See references/mapper-index.md.
DTO Interfaces (Application Layer)
See references/dto-interfaces.md.
Anti-Patterns to Avoid
See references/anti-patterns.md for the four ❌ examples (business logic, infra deps, domain return, duplicate mapping).
Summary: Mapper Responsibilities
| Transformation | When | What Changes | |
|---|---|---|---|
| Domain → Persistence | Saving to DB | VOs become primitives, dates become Date objects | |
| Persistence → Domain | Loading from DB | Primitives become VOs, reconstruct nested objects | |
| Domain → Response | API response | Flatten structure, only expose needed fields | |
| Domain → Detail DTO | Single entity view | Full structure, nested objects, all metadata |
Golden rule: Mappers translate, they don't validate or compute. Business logic lives in domain, not in mapper.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/nestjs/nestjs-mappers/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dabydat/alpha-omega/nestjs-mappers)