domain-layer-setup

Create domain-layer base abstractions for .NET Clean Architecture applications.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/gerardogarnica/aurora-flowboard-api --skill domain-layer-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-layer-setup
Source: https://github.com/gerardogarnica/aurora-flowboard-api/tree/main/.claude/skills/domain-layer-setup
Command: npx skills add https://github.com/gerardogarnica/aurora-flowboard-api --skill domain-layer-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Domain layer base abstractions and templates to standardize domain model patterns in a Clean Architecture .NET app. It covers entities, value objects, domain events, and error handling using the Result pattern.

Core Features & Use Cases

  • Base entity: Id and domain event management for aggregate roots
  • Base error: Typed error definitions with static factory methods
  • Base domain event: DomainEvent interface and base implementations
  • Result pattern: Explicit success/failure results for domain operations
  • Domain structure guidance: Organized across Aggregates (Users, Projects, Flows, WorkItems)
  • Password hashing guidance: Always route through IPasswordHasher
  • EF Core compatibility notes: Parameterless constructors and init-only Ids

Quick Start

Create the base abstractions in your domain project using the provided templates.

Frequently Asked Questions about domain-layer-setup

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

FAQPage Schema
How do I set up a domain layer in .NET using domain-driven design?

It provides base entity, error, and domain event templates to standardize domain model patterns in a Clean Architecture .NET app. This foundation ensures consistent aggregate root management, value objects, and error handling across your domain layer.

What is the Result pattern in C# and when should I use it?

The Result pattern in C# provides explicit success or failure results for domain operations without relying on exceptions. Use it to ensure safe, testable operations by returning typed error definitions instead of throwing exceptions for expected business rule violations.

How do I handle domain events in a Clean Architecture .NET application?

You handle domain events in a Clean Architecture .NET application by implementing a DomainEvent interface and base classes. The base entity manages event collection for aggregate roots, allowing you to raise and dispatch events after state changes.

Does this domain layer template work with Entity Framework Core?

Yes, it works with Entity Framework Core by including compatibility notes for parameterless constructors and init-only Ids. These guidelines ensure your domain entities remain compatible with EF Core's instantiation and tracking requirements.

What is the best way to organize aggregates like Users and Projects in DDD?

Organize aggregates like Users, Projects, Flows, and WorkItems by structuring your domain project around specific aggregate roots. This template provides domain structure guidance, ensuring each aggregate has its own entities, events, and error handling boundaries.

Why route password hashing through an interface in a .NET domain layer?

Route password hashing through an IPasswordHasher interface in your .NET domain layer to maintain safe, testable operations. This abstraction keeps hashing logic out of domain entities, ensuring the domain remains isolated and infrastructure-agnostic.