dabydat/alpha-omega/nestjs-repository-pattern
Claude Code and agent skill by dabydat/alpha-omega
- community
Checking that the SKILL.md file is still in the repository.
Repository pattern implementation for NestJS. Covers repository interfaces (ports) in domain layer, TypeORM implementations in infrastructure, and DI configuration. Use when implementing data access, repository pattern, or database queries.
Install
npx vskill@latest install dabydat/alpha-omega/nestjs-repository-patternSKILL.md
NestJS Repository Pattern
Repository is the collection-like interface for accessing aggregates. It abstracts data persistence, keeping domain independent of database implementation.
Production patterns for: Data access, repository interfaces, TypeORM implementations, DI configuration
Agent collaboration: Backend Dev (repository pattern, no raw queries), DBA (index design, query optimization)
Core Principle: Repository is a Collection
See references/why-repository.md for the collection metaphor, the ❌ BAD SQL-in-domain example, and the ✅ GOOD interface example.
Repository Interface (Domain Layer)
See references/repository-interface.md for the ENTITY_REPOSITORY symbol, the interface, and common methods.
TypeORM Implementation (Infrastructure)
See references/typeorm-implementation.md for the EntityRepositoryImpl.
Paginated Queries
See references/paginated-queries.md for findPaginated (findAndCount).
Transaction Support
See references/transaction.md for transaction via manager and usage in a command handler.
Complex Queries (Query Builder)
See references/query-builder.md for findByCriteria.
Module Registration
See references/module-registration.md for binding interface→implementation.
Anti-Patterns to Avoid
See references/anti-patterns.md for the four ❌ examples (persistence return, business logic, no pagination, raw query in service).
Summary: Repository Responsibilities
| Operation | Purpose | Returns | |
|---|---|---|---|
save | Create or update entity | Domain | |
findById | Get by ID | Domain or null | |
findByEmail | Get by email | Domain or null | |
findByUserId | Get by user ID | Domain or null | |
findPaginated | List with pagination | Paginated result | |
delete | Remove entity | void |
Golden rule: Repository is the gate to persistence. Domain never talks directly to database. Only through repository.
Security
- Security scanPassed, 95 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-repository-pattern/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 8
Stars and forks are for the whole GitHub repository, not this skill alone. 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-repository-pattern)