create-repository

Generate Repository and Finder interfaces for domain entities using CQRS.

Updated Dec 16, 2019
One-click install
npx skills add https://github.com/Dev-Int/tests --skill create-repository
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-repository
Source: https://github.com/Dev-Int/tests/tree/main/.claude/skills/create-repository
Command: npx skills add https://github.com/Dev-Int/tests --skill create-repository

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the complexity of implementing proper data access patterns by automatically generating Repository and Finder interfaces.

Core Features & Use Cases

  • CQRS Implementation: Separate command (write) and query (read) operations automatically.
  • Domain Persistence: Create clean persistence layers for entities following DDD best practices.
  • Use Case: When creating a new Article entity, use this Skill to generate both the Repository for save/delete operations and Finder for find/findAll queries.

Quick Start

Create repository and finder interfaces for the Article entity in the Admin bounded context.

Frequently Asked Questions about create-repository

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a repository and finder for domain entity persistence?

Repository and Finder interfaces automate persistence layer creation by separating write operations (save, delete) in the Repository from read operations (find, findAll) in the Finder, following CQRS patterns for clean domain-driven design.

What is CQRS and why use it for database access patterns?

CQRS separates command (write) and query (read) operations into distinct interfaces. This Skill generates Repository for commands and Finder for queries, reducing complexity and improving maintainability in data access layers.

Can I use this to generate persistence interfaces for entities with irregular plurals?

Yes, the entityPlural parameter handles irregular plurals when generating Repository and Finder interfaces, ensuring accurate method naming and placement in BC/Entities/Repository/ and BC/UseCases/Gateway/Finder/ directories.

How do I validate generated repository and finder code?

Generated templates are validated using make cs-fixer for code style and make stan for static analysis, ensuring the Repository and Finder interfaces meet project standards.

When should I use Repository and Finder instead of a single data access class?

Use Repository and Finder when your entity requires distinct command (save, delete) and query (find, findAll, findBy*) responsibilities. Separation improves testability, follows DDD principles, and aligns with CQRS architectural patterns.