repository-no-business-logic

Installation
SKILL.md

Repository No Business Logic

Goal

Repositories must contain no business logic. A repository is a persistence gateway — it persists and retrieves domain entities exactly as instructed by its caller.

A repository's responsibility is limited to:

  • translating between domain types and persistence representations
  • executing persistence operations — create, update, find, delete
  • mapping query parameters to persistence queries

A repository must not:

  • validate business rules or enforce domain invariants
  • make domain decisions based on the data it reads or writes
  • transform domain state — that is the entity's or domain service's responsibility
  • filter or exclude results based on business criteria not expressed by the caller
  • trigger side effects that represent business behavior
Related skills

More from code-sherpas/agent-skills

Installs
6
First Seen
Mar 24, 2026