repository-persistence

Community

Define persistence boundaries that stay clean.

Authormachenjie
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It prevents persistence-layer details (ORM objects, query builders, lazy-loading behavior, and raw storage exceptions) from leaking into your domain and application logic, keeping your models stable while your database technology changes.

Core Features & Use Cases

  • Repository boundary discipline: define repository interfaces in domain/application language and keep storage mechanics behind the implementation.
  • No ORM leakage rules: ensure repository inputs/outputs are domain objects or plain DTOs, not ORM entities, proxies, or query-builder types.
  • Explicit semantics for correctness: document not-found outcomes (missing vs soft-deleted/filtered), query contracts (pagination, ordering, consistency), and transaction participation (ambient vs caller-provided vs new transactions).
  • Error translation: map storage exceptions (e.g., unique constraint violations) into domain/application-meaningful outcomes instead of propagating raw ORM/database errors.
  • Use Case: you add a new repository method for an aggregate root but need consistent not-found behavior, pagination guarantees, and reliable transactional participation across multiple repository calls.

Quick Start

Use repository-persistence when you need to redesign or document a repository contract so it clearly defines mapping, not-found behavior, transaction scope, query semantics, and error translation without exposing ORM details.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: repository-persistence
Download link: https://github.com/machenjie/rd-skills/archive/main.zip#repository-persistence

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.