Production-ready Domain-Driven Design patterns and data persistence implementations for .NET projects using Claude Code. Ideal for developers working on complex applications requiring scalable and maintainable architectures.
git clone https://github.com/nesbo/dotnet-claude-code-skills.gitThis skill library provides comprehensive, production-ready implementations of Domain-Driven Design patterns and hexagonal architecture for .NET projects. It covers domain layer patterns (aggregates, repositories, commands, queries), data persistence with Entity Framework Core, and BDD-style unit testing with in-memory database support. The library includes four integrated skills: DDD basics for building domain layers, data persistence layer implementations, unit testing patterns, and Serena MCP integration for semantic code understanding. Developers building complex, maintainable .NET applications can use these patterns as templates and architectural guides, with built-in support for Claude Code workflows.
Install the skills as a plugin in Claude Code using `/plugin marketplace add https://github.com/nesbo/dotnet-claude-code-skills`. Then reference individual skills in code sessions (e.g., 'Using the ddd-dotnet skill, create a new aggregate') or review the CLAUDE.md guide for detailed Claude Code integration instructions.
Creating new aggregates and entities with Domain-Driven Design patterns
Implementing data persistence layers using Entity Framework Core
Writing BDD-style unit tests for command and query handlers
Setting up Serena MCP for IDE-like code navigation in Claude Code
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/nesbo/dotnet-claude-code-skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a production-ready Domain-Driven Design (DDD) implementation for a [COMPANY] in the [INDUSTRY] sector. The system should include [DATA] persistence using Entity Framework Core. Provide the code for the domain layer, infrastructure layer, and application layer. Ensure the solution follows SOLID principles and is scalable for future enhancements.
# Domain-Driven Design Implementation for Retail Inventory Management System
## Domain Layer
```csharp
public class Product : IAggregateRoot
{
public Guid Id { get; private set; }
public string Name { get; private set; }
public decimal Price { get; private set; }
public int StockQuantity { get; private set; }
public Product(Guid id, string name, decimal price, int stockQuantity)
{
Id = id;
Name = name;
Price = price;
StockQuantity = stockQuantity;
}
public void UpdateStock(int quantityChange)
{
if (StockQuantity + quantityChange < 0)
{
throw new InvalidOperationException("Insufficient stock");
}
StockQuantity += quantityChange;
}
}
```
## Infrastructure Layer
```csharp
public class ProductRepository : IProductRepository
{
private readonly AppDbContext _context;
public ProductRepository(AppDbContext context)
{
_context = context;
}
public async Task<Product> GetByIdAsync(Guid id)
{
return await _context.Products.FindAsync(id);
}
public async Task AddAsync(Product product)
{
await _context.Products.AddAsync(product);
await _context.SaveChangesAsync();
}
// Additional repository methods...
}
```
## Application Layer
```csharp
public class ProductService : IProductService
{
private readonly IProductRepository _productRepository;
public ProductService(IProductRepository productRepository)
{
_productRepository = productRepository;
}
public async Task<Guid> CreateProductAsync(string name, decimal price, int stockQuantity)
{
var product = new Product(Guid.NewGuid(), name, price, stockQuantity);
await _productRepository.AddAsync(product);
return product.Id;
}
public async Task UpdateProductStockAsync(Guid productId, int quantityChange)
{
var product = await _productRepository.GetByIdAsync(productId);
product.UpdateStock(quantityChange);
// Save changes through repository
}
// Additional service methods...
}
```AI assistant built for thoughtful, nuanced conversation
Get more done every day with Microsoft Teams – powered by AI
Automate security compliance and monitor real-time security posture seamlessly.
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan