smithery/mitkox

net-domain-model

Create domain models following Domain-Driven Design principles

Installation

$ npx skills add smithery/mitkox --skill net-domain-model

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/mitkox · top by installs.

npx skills add smithery/mitkox

Browse all from smithery/mitkox

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Declared

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseMIT
Compatibilityopencode
Declared agents opencode
More metadata
audience
.net-developers
framework
entityframeworkcore
patterns
ddd

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,823 B
  • docs SUMMARY.md 86 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

What I Do

I help you create domain models following DDD principles:

  • Entities with identity
  • Value objects (immutable)
  • Aggregates and aggregate roots
  • Domain events
  • Repositories interfaces
  • Domain services

When to Use Me

Use this skill when:

  • Modeling business domain
  • Creating entity classes
  • Implementing value objects
  • Defining aggregate boundaries
  • Creating domain services

Domain Model Structure

src/{ProjectName}.Domain/
├── Entities/
│   ├── Product.cs
│   ├── Order.cs
│   └── Customer.cs
├── ValueObjects/
│   ├── Money.cs
│   ├── Email.cs
│   └── Address.cs
├── Aggregates/
│   └── OrderAggregate/
│       ├── Order.cs
│       └── OrderItem.cs
├── Interfaces/
│   ├── IProductRepository.cs
│   ├── IOrderRepository.cs
│   └── IUnitOfWork.cs
├── Events/
│   ├── OrderCreatedEvent.cs
│   └── OrderPaidEvent.cs
└── Services/
    └── DomainService.cs

Patterns I Implement

Entity

public abstract class Entity
{
    public Guid Id { get; protected set; }
    public DateTime CreatedAt { get; protected set; }
    public DateTime? UpdatedAt { get; protected set; }
    public List<IDomainEvent> DomainEvents { get; } = new();

    protected Entity(Guid id) => Id = id;
    protected Entity() { }
}

Value Object

public abstract class ValueObject : IEquatable<ValueObject>
{
    protected abstract IEnumerable<object> GetEqualityComponents();

    public bool Equals(ValueObject? other)
    {
        if (other is null) return false;
        if (ReferenceEquals(this, other)) return true;
        return GetEqualityComponents()
            .SequenceEqual(other.GetEqualityComponents());
    }
}

Aggregate Root

public abstract class AggregateRoot : Entity
{
    public override void RaiseDomainEvent(IDomainEvent domainEvent)
    {
        DomainEvents.Add(domainEvent);
    }

    public void ClearDomainEvents() => DomainEvents.Clear();
}

Best Practices

  1. Entities protect invariants
  2. Value objects are immutable
  3. Aggregates define consistency boundaries
  4. Domain events capture business events
  5. Repositories are in Domain layer
  6. Domain services contain business logic

Example Usage

Create a domain model for an e-commerce system with:
- Product entity
- Order aggregate root
- Money value object
- OrderCreated domain event
- Repository interfaces

I will generate complete domain model following DDD patterns.