dotnet-core-expert — Claude Code skill: what it does, how to install
A Claude Code skill that steers the agent through a .NET 8 backend: minimal APIs, clean architecture, EF Core, CQRS with MediatR and JWT auth, from requirements to dotnet test.
npx skills add Jeffallan/claude-skills --skill dotnet-core-expert -a claude-codeWhat dotnet-core-expert does
The skill puts Claude Code into .NET specialist mode as soon as you ask for a .NET 8 backend. It walks a five-step workflow: read the requirements, lay out clean architecture layers, write the code, add authentication, cover it with tests. Every implementation has to pass dotnet build, and the test step runs dotnet test. A failing build or failing test sends the agent back to the errors before it moves on.
Guidance sits in separate reference files that load by context: references/minimal-apis.md for endpoints and middleware, clean-architecture.md for CQRS and MediatR, entity-framework.md for DbContext and migrations, authentication.md for JWT, cloud-native.md for Docker and health checks. So the pattern in the answer has a source you can open. The constraints are spelled out too. Nullable reference types on, via <Nullable>enable</Nullable> in the .csproj. Async I/O only, DTOs as record, integration tests through WebApplicationFactory<Program>, OpenAPI wired up.
The .NET 8 and C# 12 requirement is where it bites. Drop it into a .NET Framework codebase full of synchronous calls and the agent argues with your existing code, since legacy patterns sit on its forbidden list. Worth checking the target framework before you install.
What it helps with
- scaffold a minimal API endpoint with its DTO
- split a project into clean architecture layers
- wire CQRS handlers through MediatR
- add JWT authentication and authorization policies
- write integration tests with
WebApplicationFactory<Program>
Example prompts for the agent
- Build a .NET 8 minimal API with a `GET /users/{id}` endpoint, a record DTO and an EF Core `DbContext`.
- Refactor this service to CQRS: commands and queries through MediatR, clean architecture layers.
- Add JWT auth and an integration test, then run `dotnet build` and `dotnet test`.
How to install dotnet-core-expert
1Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill dotnet-core-expert -a claude-code2Manually: put the files in place
~/.claude/skills/dotnet-core-expert/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/dotnet-core-expert/
1Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill dotnet-core-expert -a codex2Manually: put the files in place
.agents/skills/dotnet-core-expert/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill dotnet-core-expert -a cursor2Manually: put the files in place
.cursor/skills/dotnet-core-expert/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Jeffallan/claude-skills dotnet-core-expert2Manually: put the files in place
.github/skills/dotnet-core-expert/SKILL.md1Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill dotnet-core-expert -a gemini-cli2Platform CLI
gemini skills install https://github.com/Jeffallan/claude-skills --path skills/dotnet-core-expertManually: put the files in place
.devin/skills/dotnet-core-expert/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill dotnet-core-expert -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set61
The whole set →Similar
Questions about dotnet-core-expert
How do I install dotnet-core-expert in Claude Code?
Run npx skills add Jeffallan/claude-skills --skill dotnet-core-expert -a claude-code. The skill lands at ~/.claude/skills/dotnet-core-expert/SKILL.md.
What does dotnet-core-expert do?
It gives the agent a .NET role: minimal APIs, clean architecture, EF Core, CQRS with MediatR, JWT and AOT compilation. It builds the project and runs the tests before continuing.
What do I need for the skill to work?
A .NET 8 SDK, because the agent verifies code with dotnet build and dotnet test. The reference examples lean on MediatR and xUnit.
Source text
SKILL.md · MIT
---
name: dotnet-core-expert
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.
license: MIT
metadata:
author: https://github.com/Jeffallan
company: https://synergetic.solutions
version: "1.1.0"
domain: backend
triggers: .NET Core, .NET 8, ASP.NET Core, C# 12, minimal API, Entity Framework Core, microservices .NET, CQRS, MediatR
role: specialist
scope: implementation
output-format: code
related-skills: fullstack-guardian, microservices-architect, cloud-architect, test-master
---
# .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
### MUST NOT DO
- Use synchronous I/O operations
- Expose entities directly in API responses
- Skip input validation
- Use legacy .NET Framework patterns
- Mix concerns across architectural layers
- Use deprecated EF Core patterns
## Code Examples
### Minimal API Endpoint
```csharp
// Program.cs
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(Program).Assembly));
var app = builder.Build();
app.UseSwagger();
app.UseSwaggerUI();
app.MapGet("/users/{id}", async (int id, ISender sender, CancellationToken ct) =>
{
var result = await sender.Send(new GetUserQuery(id), ct);
return result is null ? Results.NotFound() : Results.Ok(result);
})
.WithName("GetUser")
.Produces<UserDto>()
.ProducesProblem(404);
app.Run();
```
### MediatR Query Handler
```csharp
// Application/Users/GetUserQuery.cs
public record GetUserQuery(int Id) : IRequest<UserDto?>;
public sealed class GetUserQueryHandler : IRequestHandler<GetUserQuery, UserDto?>
{
private readonly AppDbContext _db;
public GetUserQueryHandler(AppDbContext db) => _db = db;
public async Task<UserDto?> Handle(GetUserQuery request, CancellationToken ct) =>
await _db.Users
.AsNoTracking()
.Where(u => u.Id == request.Id)
.Select(u => new UserDto(u.Id, u.Name))
.FirstOrDefaultAsync(ct);
}
```
### EF Core DbContext with Async Query
```csharp
// Infrastructure/AppDbContext.cs
public sealed class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options)
{
public DbSet<User> Users => Set<User>();
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
}
}
// Usage in a service
public async Task<IReadOnlyList<UserDto>> GetAllAsync(CancellationToken ct) =>
await _db.Users
.AsNoTracking()
.Select(u => new UserDto(u.Id, u.Name))
.ToListAsync(ct);
```
### DTO with Record Type
```csharp
public record UserDto(int Id, string Name);
public record CreateUserRequest(string Name, string Email);
```
## Output Templates
When implementing .NET features, provide:
1. Project structure (solution/project files)
2. Domain models and DTOs
3. API endpoints or service implementations
4. Database context and migrations if applicable
5. Brief explanation of architectural decisions
Maintained by [@jeffallan](https://github.com/jeffallan), Principal Consultant at [Synergetic Solutions](https://synergetic.solutions)
[Documentation](https://jeffallan.github.io/claude-skills/skills/backend/dotnet-core-expert/)
© https://github.com/Jeffallan · MIT · Jeffallan/claude-skills