domain-modeling

Define bounded contexts, aggregates, and domain events using DDD building blocks.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/Jin9/skillify-foundation --skill domain-modeling-jin9
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: domain-modeling
Source: https://github.com/Jin9/skillify-foundation/tree/main/treasury/domain-modeling
Command: npx skills add https://github.com/Jin9/skillify-foundation --skill domain-modeling-jin9

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams often build software where business logic leaks into infrastructure, ownership of business areas is unclear, and fuzzy aggregate boundaries create tech debt that spreads across the whole system. This Skill produces a structured Domain Model artifact that makes boundaries, ownership, and invariants explicit before implementation begins. ## Core Features & Use Cases - Bounded Context Definition: Names each context with its responsibility and owner, aligning services to business domains per Conway's Law. - Aggregate & Invariant Modeling: Captures aggregates, entities, value objects, and the invariants that must always hold (e.g., wallet balance ≥ 0). - Command/Event Separation: Distinguishes commands (intent, may be rejected) from events (facts, already happened) per context. - Use Case: When designing a wallet top-up feature, use this Skill to define the Wallet and Ledger contexts, the Wallet aggregate with its balance invariant, the TopUpWallet command, and the WalletToppedUp event — with an explicit note that payment-provider clients stay in infrastructure. ## Quick Start Ask the agent to define the domain model with bounded contexts, aggregates, and events for your feature or business area.

Frequently Asked Questions about domain-modeling

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

FAQPage Schema
How do I define bounded contexts for a new feature?▼

Scope each bounded context by business domain, then record its responsibility and owner. This Skill produces a Domain Model artifact listing contexts, their aggregates, and the commands and events each context handles.

What is the difference between commands and events in DDD?▼

Commands express intent and may be rejected, such as TopUpWallet. Events are facts that already happened, such as WalletToppedUp. The Skill lists both per bounded context in the output artifact.

When should I use domain modeling versus reverse-engineering existing code?▼

Use domain modeling when defining boundaries and ownership for a new or evolving business area. If you need to extract the model from existing code, that belongs to a business-logic-extractor skill instead.

Why do aggregate boundaries matter so much in domain design?▼

Wrong aggregate boundaries spread tech debt across the system and can force a full re-scaffold. Getting them right early, with explicit invariants, keeps each aggregate self-consistent and independently ownable.

Can this Skill design database schemas or migrations?▼

No. Persistence schema, index, and migration design are explicitly out of scope and belong to a data-modeling skill. This Skill only defines the domain model and its separation from infrastructure.