repository-pattern

Installation
SKILL.md

Repository Pattern

When to use

  • The user wants domain code to save and load aggregates through an interface instead of writing SQL or ORM calls inline.
  • The user needs to change the data store or query technology without touching the code that uses the data.
  • The user wants to test business logic against an in-memory repository instead of a real database.

When NOT to use

  • Do not wrap ad-hoc reporting or analytics queries that return raw rows in a repository when there is no aggregate to reconstitute.
  • Do not add repositories to a small CRUD app that deliberately uses active-record models and has no separate domain layer.

Core guidance

Installs
1
GitHub Stars
3
First Seen
Jul 3, 2026
repository-pattern — anyorgname/php-skills