nesbo/dotnet-claude-code-skills
nesbo/dotnet-claude-code-skills · 4 plugins
Marketplace Claude Code Skills for .NET developers.
Install
/plugin marketplace add https://github.com/nesbo/dotnet-claude-code-skillsRun inside Claude Code, then install plugins from it. Check the repo's README before you run it.
Plugins 4
After adding the marketplace, install one with /plugin install <name>@dotnet-claude-code-skills.
- 1ddd-dotnetComprehensive guide to implementing DDD patterns with CQRS, Hexagonal Architecture, aggregates, entities, command/query handlers, and domain best practices. Explained using C# and .NET, but patterns apply to any OOP language.
/plugin install ddd-dotnet@dotnet-claude-code-skills - 2data-dotnetComplete guide to implementing data persistence as an adapter in hexagonal architecture with entity mappings, repositories, Unit of Work, and migration workflows. Demonstrates one ORM approach; patterns apply to any data access technology.
/plugin install data-dotnet@dotnet-claude-code-skills - 3bdd-dotnetBDD-style unit testing patterns for domain handlers with in-memory database, TestDataBuilder pattern, fluent builders, and fake implementations - no mocking frameworks. Shown with NUnit examples; patterns apply to any testing framework.
/plugin install bdd-dotnet@dotnet-claude-code-skills - 4add-serenaComplete integration guide for adding Serena MCP to any software project. Provides IDE-like semantic code understanding through LSP integration, symbol-level navigation, and precise code editing. Includes prerequisites checking, installation steps, configuration templates for C#, Python, TypeScript and more, troubleshooting guide, and advanced configurations.
/plugin install add-serena@dotnet-claude-code-skills
Files
.NET Claude Code Skills Library
Production-ready Domain-Driven Design patterns and data persistence implementations for .NET projects using Claude Code.
Applicability: While these patterns are explained using C# and .NET, the DDD principles and hexagonal architecture concepts apply to any object-oriented programming language.
For Claude Code Users: See CLAUDE.md for information about using this repository with Claude Code.
Available Skills
1. Domain-Driven Design Basics (ddd-dotnet/)
Purpose: Core DDD patterns for building the domain layer (ports) in hexagonal architecture.
What it covers:
- Domain object hierarchy (IDomainObject, IAggregate, IEntity)
- Aggregate root patterns with versioning
- Repository pattern with CQRS separation
- Command pattern using Paramore.Brighter
- Query pattern with ViewModels
- Time control pattern (IClock)
- Unit of Work pattern
- Domain exceptions
- Best practices and anti-patterns
When to use:
- Creating new aggregates or entities
- Implementing command handlers
- Implementing query handlers
- Understanding domain layer structure
- Code reviews for domain logic
Key templates included:
- New aggregate class
- Command & handler
- Query & handler
- Domain exceptions
2. Data Persistence Layer (data-dotnet/)
Purpose: Implementing the data persistence layer as an adapter in hexagonal architecture. This skill demonstrates one approach using Entity Framework Core, but the patterns apply to any ORM or data access technology.
What it covers:
- Data context configuration (production & testing)
- Entity-to-table mapping and configurations
- Repository implementations (write & query)
- Unit of Work implementation
- Dependency injection auto-registration
- In-memory database testing support
- Schema migration workflow
- Database schema organization
- Performance optimization patterns
When to use:
- Adding new aggregates to the database
- Creating entity configurations
- Implementing repositories
- Setting up testing infrastructure
- Configuring relationships and indexes
- Optimizing query performance
- Migration management
Key templates included:
- Entity configuration class
- Write repository implementation
- Query repository implementation
- In-memory test setup
3. BDD-Style Unit Testing (bdd-dotnet/)
Purpose: Unit testing patterns for domain layer handlers using Behavior-Driven Development style with in-memory database support.
What it covers:
- Testing philosophy (hybrid approach with real repositories)
- Test project structure and organization
- TestDataBuilder and TestContextFactory patterns
- Fluent aggregate builders for test data
- Fake implementations instead of mocking frameworks
- Arrange-Act-Assert testing pattern
- NUnit conventions and assertions
- Time-dependent testing with FakeClock
- Parameterized tests with TestCase
- CSV-driven complex scenario testing
When to use:
- Writing unit tests for command handlers
- Writing unit tests for query handlers
- Testing workflow state transitions
- Testing validation and error handling
- Setting up test infrastructure
- Creating test data builders for aggregates
- Testing time-dependent business logic
Key templates included:
- Test fixture structure
- TestDataBuilder setup
- Aggregate builder classes
- Fake service implementations
- Common test patterns (commands, queries, workflows, errors)
4. Add Serena MCP to Your Project (add-serena/)
Purpose: Integration guide for adding Serena MCP (Model Context Protocol) to any software project for IDE-like semantic code understanding.
What it covers:
- Serena MCP capabilities and benefits
- Prerequisites checking for your environment
- Global installation using
claude mcp addcommand - Project configuration templates (C#, Python, TypeScript, and more)
- Verification and testing procedures
- Troubleshooting guide
- Advanced configurations (monorepos, read-only mode)
- Common mistakes to avoid
When to use:
- Setting up semantic code understanding in your project
- Enabling symbol-level code navigation
- Adding IDE-like capabilities to Claude Code
- Configuring LSP integration for your language
- Troubleshooting Serena installation issues
- Setting up advanced configurations
Key templates included:
- Global installation command
- Claude Code settings configuration
- Project-specific YAML configurations
- Language-specific setup examples
- Verification commands
Skill Organization
dotnet-claude-code-skills/
├── README.md # This file - skills catalog
├── CLAUDE.md # Guide for using with Claude Code
├── ddd-dotnet/ # Domain layer patterns
│ ├── SKILL.md # Comprehensive DDD guide
│ └── README.md # DDD overview
├── data-dotnet/ # Data persistence patterns
│ ├── SKILL.md # Comprehensive data persistence guide
│ └── README.md # Data persistence overview
├── bdd-dotnet/ # BDD-style unit testing patterns
│ ├── SKILL.md # Comprehensive testing guide
│ └── README.md # Testing overview
└── add-serena/ # Serena MCP integration guide
├── SKILL.md # Complete installation and configuration guide
└── README.md # Serena MCP overview
How to Use These Skills
Claude Code Users: For detailed usage instructions with Claude Code, see CLAUDE.md
Installing Plugins with Claude Code
You can install these skills as plugins directly in Claude Code using the /plugin command:
/plugin marketplace add https://github.com/nesbo/dotnet-claude-code-skillsThis will install all available skills (ddd-dotnet, data-dotnet, bdd-dotnet, and add-serena) from this repository, making them immediately available in your Claude Code sessions.
Quick Reference
In Code Sessions:
"Using the ddd-dotnet skill, create a new aggregate for Product"
"Following the data-dotnet skill, implement the repository for Product"
"Using the bdd-dotnet skill, write unit tests for the CreateProduct command handler"
"Using the add-serena skill, set up Serena MCP for semantic code understanding"
For Code Reviews:
- Validate new code follows documented patterns
- Identify anti-patterns using "Common Pitfalls" sections
- Ensure consistency across the codebase
As Templates:
- Copy templates as starting points for new code
- Use checklists before creating pull requests
- Share patterns with team members
Skill Dependencies
ddd-dotnet/
▲ ▲
│ │
│ (implements) │ (tests)
│ │
data-dotnet/ bdd-dotnet/
- data-dotnet builds on concepts from ddd-dotnet - implements domain interfaces
- bdd-dotnet tests handlers and aggregates from ddd-dotnet - uses real repositories from data-dotnet
- Read
ddd-dotnet/SKILL.mdfirst to understand core domain patterns
Architecture Context
These skills support a hexagonal architecture (ports and adapters):
┌─────────────────────────────────────────────┐
│ Adapters (Infrastructure) │
│ - API (WebAPI) │
│ - Blazor Apps │
│ - Data Persistence ◄── data-dotnet │
│ - ServiceClients │
└─────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ Ports (Domain) │
│ - Aggregates & Entities ◄── ddd-dotnet │
│ - Command Handlers ◄── ddd-dotnet │
│ - Query Handlers ◄── ddd-dotnet │
│ - Repository Interfaces ◄── ddd-dotnet │
└─────────────────────────────────────────────┘
▲
│ (tests)
│
┌─────────────────────┐
│ Unit Tests │
│ (bdd-dotnet) │
└─────────────────────┘
Key principle: Adapters depend on Ports, never the reverse.
Pattern Summary
Domain Layer (ddd-dotnet/)
- ✅ Aggregates control entities
- ✅ Business logic in aggregates
- ✅ Commands for writes
- ✅ Queries for reads (ViewModels)
- ✅ IClock for time
- ✅ Domain exceptions
Data Persistence Layer (data-dotnet/)
- ✅ Entity-to-storage mapping
- ✅ Repository base classes
- ✅ CQRS separation (write/query)
- ✅ Auto-registration via reflection
- ✅ In-memory testing support
- ✅ Schema organization
Testing Layer (bdd-dotnet/)
- ✅ BDD-style test naming
- ✅ Real repositories with InMemory DB
- ✅ Fake implementations (no mocking frameworks)
- ✅ Fluent test data builders
- ✅ Arrange-Act-Assert pattern
- ✅ Time control with FakeClock
Quick Start Workflow
Adding a New Feature with All Skills
-
Domain First (using
ddd-dotnet/):Create aggregate → Create entity → Create command & handler → Create query & handler -
Persistence Second (using
data-dotnet/):Create entity config → Create write repo → Create query repo → Create migration -
Testing Third (using
bdd-dotnet/):Create test fixture → Create aggregate builders → Write handler tests → Run tests -
Verification:
- Check domain best practices
- Check data best practices
- Run unit tests with in-memory database
- Review migration SQL
- Create pull request
Extending the Skills Library
When adding new skills:
- Create new
.mdfile in this directory - Update this README with:
- Skill name and purpose
- What it covers
- When to use
- Key templates
- Dependencies on other skills
- Follow the existing format:
- Overview section
- Detailed patterns with code examples
- Best practices section
- Common pitfalls section
- Quick reference templates
- Checklist
Contributing
When updating skills:
- ✅ Keep examples based on real production code
- ✅ Include both good and bad examples
- ✅ Provide working code snippets
- ✅ Add explanatory comments
- ✅ Update this README if adding new skills
- ✅ Keep skills focused and cohesive
- ✅ Cross-reference related skills
Skill Maintenance
These skills are living documents. Update them when:
- Discovering new patterns worth documenting
- Finding common mistakes to warn against
- Refactoring improves existing patterns
- Technology updates change best practices
- Team feedback suggests improvements
About This Repository
Purpose: Skills library for object-oriented development with Claude Code
Focus: Domain-Driven Design, CQRS, Hexagonal Architecture
Implementation: Demonstrated in .NET 8+ and C# 12
Applicability: Patterns apply to any OOP language (Java, TypeScript, Python, etc.)
Usage: Reference patterns, code templates, best practices
These skills are explained using C# and .NET, but the DDD and hexagonal architecture patterns apply universally to object-oriented programming.
Last Updated: 2025-10-22
Skills Version: 1.0
{
"name": "dotnet-claude-code-skills",
"owner": {
"name": "nesbo"
},
"plugins": [
{
"name": "ddd-dotnet",
"source": "./ddd-dotnet",
"description": "Comprehensive guide to implementing DDD patterns with CQRS, Hexagonal Architecture, aggregates, entities, command/query handlers, and domain best practices. Explained using C# and .NET, but patterns apply to any OOP language.",
"version": "1.0.1",
"category": "dotnet",
"tags": [
"ddd",
"domain-driven-design",
"cqrs",
"hexagonal-architecture",
"dotnet",
"csharp",
"clean-architecture",
"ports-and-adapters"
]
},
{
"name": "data-dotnet",
"source": "./data-dotnet",
"description": "Complete guide to implementing data persistence as an adapter in hexagonal architecture with entity mappings, repositories, Unit of Work, and migration workflows. Demonstrates one ORM approach; patterns apply to any data access technology.",
"version": "1.0.0",
"category": "dotnet",
"tags": [
"data-persistence",
"repository-pattern",
"orm",
"data-layer",
"dotnet",
"csharp",
"database",
"hexagonal-architecture"
]
},
{
"name": "bdd-dotnet",
"source": "./bdd-dotnet",
"description": "BDD-style unit testing patterns for domain handlers with in-memory database, TestDataBuilder pattern, fluent builders, and fake implementations - no mocking frameworks. Shown with NUnit examples; patterns apply to any testing framework.",
"version": "1.0.0",
"category": "dotnet",
"tags": [
"testing",
"unit-testing",
"bdd",
"nunit",
"test-driven-development",
"dotnet",
"csharp",
"inmemory-database",
"test-patterns"
]
},
{
"name": "add-serena",
"source": "./add-serena",
"description": "Complete integration guide for adding Serena MCP to any software project. Provides IDE-like semantic code understanding through LSP integration, symbol-level navigation, and precise code editing. Includes prerequisites checking, installation steps, configuration templates for C#, Python, TypeScript and more, troubleshooting guide, and advanced configurations.",
"version": "1.0.0",
"category": "integration",
"tags": [
"serena",
"mcp",
"model-context-protocol",
"ide",
"lsp",
"code-understanding",
"semantic-navigation",
"claude-code",
"integration"
]
}
]
}Facts
- Kind
- Marketplace
- Repo
- nesbo/dotnet-claude-code-skills
- Group
- Uncategorized
- Marketplace name
- dotnet-claude-code-skills
- Owner
- nesbo
- Created
- 2025-10-21
- Forks
- 5
- Plugins
- 4
- 1f/prompts.chatf/prompts.chatf.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
- 2affaan-m/everything-claude-codeaffaan-m/everything-claude-codeThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
- 3obra/superpowersobra/superpowersAn agentic skills framework & software development methodology that works.
- 4anthropics/skillsanthropics/skillsPublic repository for Agent Skills
- 5anthropics/claude-codeanthropics/claude-codeClaude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
- 6nextlevelbuilder/ui-ux-pro-max-skillnextlevelbuilder/ui-ux-pro-max-skillAn AI skill that provides design intelligence for building professional UI/UX across multiple platforms.