Generates Domain-Driven Design building blocks in C# — aggregates, entities, value objects, domain events, and factory methods. Useful for modeling bounded contexts and protecting invariants.
Ships in TheCodeMan .NET AI ToolKit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Model a domain with proper DDD building blocks: an aggregate root that protects its invariants, value objects for concepts, and domain events — no anemic bags of public setters.
Works on a target: a file, folder, project/solution, or GitHub URL. If a domain layer exists, match its base types (Entity, AggregateRoot, ValueObject). Detect with: grep -rn "AggregateRoot\|ValueObject\|: Entity\|IDomainEvent" --include=*.cs <target>.
public sealed class Order : AggregateRoot
{
private readonly List<OrderLine> _lines = new();
public IReadOnlyList<OrderLine> Lines => _lines.AsReadOnly();
public OrderStatus Status { get; private set; }
public Money Total { get; private set; }
private Order() { } // EF
public static Result<Order> Create(CustomerId customer, IEnumerable<OrderLine> lines)
{
var list = lines.ToList();
if (list.Count == 0) return Error.Validation("Order needs at least one line");
var order = new Order { Status = OrderStatus.Pending };
order._lines.AddRange(list);
order.Total = Money.Sum(list.Select(l => l.LineTotal));
order.Raise(new OrderCreated(order.Id)); // domain event
return order;
}
public Result Confirm()
{
if (Status != OrderStatus.Pending) return Error.Conflict("Only pending orders can be confirmed");
Status = OrderStatus.Confirmed;
Raise(new OrderConfirmed(Id));
return Result.Success();
}
}
public sealed record Money(decimal Amount, string Currency)
{
public static Money Sum(IEnumerable<Money> items) { /* guard same currency */ }
public static implicit operator decimal(Money m) => m.Amount;
}
Records give value equality for free; add guards in the constructor.
Raised inside the aggregate (Raise(...)), collected on the base type, dispatched after SaveChanges (outbox or MediatR). Keep events immutable and past-tense.
"Model an Order aggregate with these rules", "turn this anemic entity into a rich aggregate", "extract Money/Email value objects", "add domain events for order lifecycle".
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ddd, domain-driven-design, csharp, aggregate-root, value-object, domain-event
/dotnet-ai-toolkit:ddd-aggregate-generatorfrom TheCodeMan .NET AI ToolKit
npx claudepluginhub stefanthecode/dotnet-ai-toolkit --plugin dotnet-ai-toolkit49 skills in this plugin
/adonet-data-access-auditorAudit and fix classic ADO.NET data-access code (SqlConnection / SqlCommand / SqlDataReader / DataSet) on .NET Framework. Use this skill whenever the user shares raw ADO.NET code, a DAL / repository built on SqlCommand, stored-proc calls, string-concatenated SQL, or mentions SQL injection, parameterized queries, connection leaks, "using / Dispose", reading the same column multiple times, transactions, or "why does my old data layer leak connections / is it safe". Always use this skill for classic ADO.NET review instead of answering from memory; it applies a fixed security + correctness + performance checklist and rewrites the code./async-await-auditorAudit C#/.NET code for async/await anti-patterns and concurrency bugs. Use this skill whenever the user shares async C# code or asks about deadlocks, async void, .Result/.Wait(), blocking calls, ConfigureAwait, sync-over-async, fire-and-forget tasks, CancellationToken usage, or "why does my async code hang/deadlock". Always use this skill for async correctness/performance reviews instead of answering from memory; it applies a fixed checklist and rewrites the code./authorization-policy-generatorDesign ASP.NET Core authorization — policy-based, role-based, and claims/requirement-based with custom authorization handlers and resource-based checks. Use this skill whenever the user wants authorization policies, role/claim checks, custom AuthorizationHandler, resource-based authorization, permission checks, or asks "how do I authorize this / policy vs role / restrict this endpoint to X". Always use this skill for authorization requests; it generates policies, handlers, and endpoint wiring.Other plugins' skills for the same job