agentsclimarketplace

Ddd repository design

Skill amadeus-dlc/amadeus/amadeus/spaces/default/knowledge/amadeus-shared/software-design/ddd-repository-design

Use when designing or reviewing repositories in DDD. Treats repositories as collection-like access to aggregate roots, not generic DAO layers, and separates query/read-model concerns from command persistence. Trigger for repository interfaces, aggregate persistence, save/load semantics, query placement, ORM leakage, or repository anti-patterns.From its SKILL.md

Install
npx -y skills add amadeus-dlc/amadeus --skill ddd-repository-design

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.5 KB, 214 tokens by cl100k_base, as published. Nobody here has run it

DDD Repository Design

A repository gives use cases collection-like access to aggregate roots. It should not become a general database API.

Workflow

  1. Identify the aggregate root the repository owns.

  2. Keep methods aligned with aggregate retrieval and persistence needs.

  3. Put complex read/query screens in query services or read models, not command repositories.

  4. Hide ORM, SQL, and transport details behind the implementation.

  5. Define optimistic locking, transactions, and not-found behavior explicitly.

Rules

  • Repositories return aggregate roots, not internal entities.

  • Repository interfaces should not be used by domain objects.

  • Avoid generic findByAnything growth.

  • Use specifications only when they express stable domain query concepts.

Detailed Reference

For non-trivial implementation, review, or refactoring work, read references/details.md before giving final guidance. It contains the detailed rules, examples, smells, and migration notes that do not belong in the short invocation body.

Output

Return the repository interface, method rationale, transaction expectations, and adapter responsibilities.

What ships with it: 1 file

949 B alongside SKILL.md

references/

Keep looking

Skills are one crate of 326,764. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.