m09-domain

Design Rust domain models with Entities, Value Objects, Aggregates, and Repositories.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/mberetvas/dbt-migrator --skill m09-domain-mberetvas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: m09-domain
Source: https://github.com/mberetvas/dbt-migrator/tree/main/.github/skills/m09-domain
Command: npx skills add https://github.com/mberetvas/dbt-migrator --skill m09-domain-mberetvas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Domain modeling decisions are difficult and error-prone; this skill guides you through selecting the right domain primitives and mapping them to Rust patterns to ensure consistency and clarity.

Core Features & Use Cases

  • Differentiates between Entity, Value Object, Aggregate Root, and Repository concepts and shows how to map them to Rust structures and traits.
  • Emphasizes ownership, invariants, and boundaries with design prompts and traceability from domain rules to implementation.
  • Provides templates and thinking prompts to align architecture decisions across projects.

Quick Start

Analyze a new domain concept with a quick checklist: determine identity, invariants, and ownership, then sketch a minimal Rust representation.

Frequently Asked Questions about m09-domain

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

FAQPage Schema
How do I model domain entities and value objects in Rust?

To model domain entities and value objects in Rust, you differentiate them by identity versus invariants, mapping entities to owned structs and value objects to immutable types. This skill provides checklists to select correct primitives ensuring clear ownership.

What is the best way to define aggregate boundaries in Rust applications?

Defining aggregate boundaries in Rust applications requires grouping entities and value objects under an aggregate root to enforce transactional invariants. This skill provides templates to align architecture decisions and maintain traceability from domain rules to implementation.

How do I implement the repository pattern for domain modeling in Rust?

Implementing the repository pattern in Rust involves defining traits for aggregate persistence to abstract data access. This skill guides selecting repositories and mapping them to Rust traits, ensuring domain models remain decoupled from infrastructure.

When should I use an entity versus a value object in domain-driven design?

You choose an entity versus a value object in domain-driven design by checking for identity: entities have lifecycle identity while value objects are defined solely by attributes. This skill offers a quick checklist to determine identity, invariants, and ownership.

Can I apply DDD patterns to existing Rust codebases with unclear ownership?

Yes, applying DDD patterns to existing Rust codebases with unclear ownership involves analyzing domain concepts to establish boundaries and invariants. This skill provides safety-focused guidance and ownership rules to refactor and align architecture decisions.