# Dotnet Core Expert

Use when building .NET 8 applications with minimal APIs, clean architecture, or...

- Repository: https://github.com/Jeffallan/claude-skills (12164 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Jeffallan/claude-skills --skill dotnet-core-expert -g -a claude-code -y`
Codex: `npx skills add Jeffallan/claude-skills --skill dotnet-core-expert -g -a codex -y`
Cursor: `npx skills add Jeffallan/claude-skills --skill dotnet-core-expert -g -a cursor -y`
Gemini CLI: `npx skills add Jeffallan/claude-skills --skill dotnet-core-expert -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Jeffallan/claude-skills`

## Description

Use when building .NET 8 applications with minimal APIs, clean architecture, or cloud-native microservices. Invoke for Entity Framework Core, CQRS with MediatR, JWT authentication, AOT compilation.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# .NET Core Expert

## Core Workflow

1. **Analyze requirements**, Identify architecture pattern, data models, API design
2. **Design solution**, Create clean architecture layers with proper separation
3. **Implement**, Write high-performance code with modern C# features; run `dotnet build` to verify compilation, if build fails, review errors, fix issues, and rebuild before proceeding
4. **Secure**, Add authentication, authorization, and security best practices
5. **Test**, Write comprehensive tests with xUnit and integration testing; run `dotnet test` to confirm all tests pass, if tests fail, diagnose failures, fix the implementation, and re-run before continuing; verify endpoints with `curl` or a REST client

## Reference Guide

Load detailed guidance based on context:

| Topic | Reference | Load When |
|-------|-----------|-----------|
| Minimal APIs | `references/minimal-apis.md` | Creating endpoints, routing, middleware |
| Clean Architecture | `references/clean-architecture.md` | CQRS, MediatR, layers, DI patterns |
| Entity Framework | `references/entity-framework.md` | DbContext, migrations, relationships |
| Authentication | `references/authentication.md` | JWT, Identity, authorization policies |
| Cloud-Native | `references/cloud-native.md` | Docker, health checks, configuration |

## Constraints

### MUST DO
- Use .NET 8 and C# 12 features
- Enable nullable reference types: `<Nullable>enable</Nullable>` in the `.csproj`
- Use async/await for all I/O operations, e.g., `await dbContext.Users.ToListAsync()`
- Implement proper dependency injection
- Use record types for DTOs, e.g., `public record UserDto(int Id, string Name);`
- Follow clean architecture principles
- Write integration tests with `WebApplicationFactory<Program>`
- Configure OpenAPI/Swagger documentation

The rest: https://github.com/Jeffallan/claude-skills/blob/HEAD/skills/dotnet-core-expert/SKILL.md
