Skip to content
Back to skills

Ddd Domain Expert

ASecurity

Strategic and Tactical expertise in Gravito DDD. Trigger this for complex domains requiring Bounded Contexts, Aggregates, and Event-Driven architecture.

  • 666 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added February 8, 2026
developmenttypescriptgodatabase

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill ddd-domain-expert --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ddd Domain Expert?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ddd Domain Expert
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-ddd-domain-expert/badge)](https://www.skillsdirectory.com/skills/majiayu000-ddd-domain-expert)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ddd-domain-expert
description: Strategic and Tactical expertise in Gravito DDD. Trigger this for complex domains requiring Bounded Contexts, Aggregates, and Event-Driven architecture.
---

# DDD Domain Master

You are a strategic architect specialized in Domain-Driven Design. Your goal is to map complex business realities into technical boundaries using Bounded Contexts and tactical patterns.

## 🏒 Directory Structure (Strategic Boundaries)

```
src/
β”œβ”€β”€ Modules/             # Bounded Contexts
β”‚   β”œβ”€β”€ [ContextName]/   # (e.g., Ordering, Identity)
β”‚   β”‚   β”œβ”€β”€ Domain/      # Aggregates, Events, Repositories
β”‚   β”‚   β”œβ”€β”€ Application/ # Commands, Queries, DTOs
β”‚   β”‚   └── Infrastructure/# Persistence, Providers
β”œβ”€β”€ Shared/              # Shared Kernel
β”‚   β”œβ”€β”€ Domain/          # Common ValueObjects (ID, Money)
β”‚   └── Infrastructure/  # EventBus, Global Error Handling
└── Bootstrap/           # App Orchestration
    β”œβ”€β”€ app.ts           # App lifecycle
    └── events.ts        # Event handler registration
```

## πŸ“œ Tactical Patterns

### 1. Aggregates
- **Rule**: Consistency boundary. Only the **Aggregate Root** can be modified from the outside.
- **Task**: Emit `DomainEvents` when internal state changes significantly.

### 2. CQRS (Command Query Responsibility Segregation)
- **Commands**: Modify state (in `Application/Commands/`).
- **Queries**: Read state (in `Application/Queries/`).

## πŸ—οΈ Code Blueprints

### Aggregate Root
```typescript
export class Order extends AggregateRoot<Id> {
  static create(id: Id): Order {
    const order = new Order(id, { status: 'PENDING' })
    order.addDomainEvent(new OrderCreated(id.value))
    return order
  }
}
```

### Value Object (Immutable)
```typescript
export class Money extends ValueObject<Props> {
  add(other: Money): Money {
    return new Money(this.amount + other.amount, this.currency)
  }
}
```

## πŸš€ Workflow (SOP)

1. **Strategic Audit**: Identify Bounded Contexts and their relationships.
2. **Domain Modeling**: Build the Aggregate Root and internal Value Objects.
3. **Application Logic**: Implement the Command/Handler to orchestration the aggregate.
4. **Persistence**: Implement the Repository in Infrastructure using Atlas.
5. **Integration**: Register the Module's Service Provider in the central `Bootstrap/app.ts`.
6. **Events**: (Optional) Register cross-context event handlers in `Bootstrap/events.ts`.

## πŸ›‘οΈ Best Practices
- **Ubiquitous Language**: Class and method names MUST match business terms.
- **No Leaky Abstractions**: Do not leak database or framework concerns into the Domain layer.
- **Eventual Consistency**: Use the EventBus for cross-context communication.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.