
Dotnet Core Expert
Ship .NET 8 backends with minimal APIs, clean architecture, EF Core, and CQRS without ad-hoc C# structure.
Overview
dotnet-core-expert is an agent skill for the Build phase that implements .NET 8 ASP.NET Core backends with minimal APIs, clean architecture, EF Core, CQRS/MediatR, and JWT security behind dotnet build and dotnet test gat
Install
npx skills add https://github.com/jeffallan/claude-skills --skill dotnet-core-expertWhat is this skill?
- Five-step workflow: requirements → layered design → implement with dotnet build gates → secure → test with dotnet test a
- Covers .NET 8 minimal APIs, clean architecture separation, Entity Framework Core, CQRS with MediatR, JWT auth, and AOT c
- Modern C# 12 patterns with xUnit and integration testing discipline before continuing past failures
- Reference-guide routing for topic-specific deep dives (minimal APIs and related backend topics)
- Pairs conceptually with microservices, cloud, fullstack, and test-oriented related skills in the same author ecosystem
- Five-step core workflow ending in dotnet build and dotnet test verification gates
Adoption & trust: 2.8k installs on skills.sh; 9.7k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You know you want a .NET 8 API or microservice but lack a repeatable path from architecture choice through compile-safe, tested, secured C# implementation.
Who is it for?
Indie builders shipping ASP.NET Core APIs, EF-backed services, or small microservices who want MediatR/CQRS and JWT wired with explicit build/test checkpoints.
Skip if: Teams building only frontends, non-.NET stacks, or one-line scripts where clean architecture and EF Core are unnecessary overhead.
When should I use this skill?
Building .NET 8 applications with minimal APIs, clean architecture, or cloud-native microservices; Entity Framework Core, CQRS with MediatR, JWT authentication, or AOT compilation.
What do I get? / Deliverables
You get layered .NET 8 code aligned to your pattern choice with authentication hooks and passing unit/integration tests verified via dotnet build and dotnet test.
- Layered .NET 8 source with minimal APIs or service endpoints
- Authentication/authorization configuration and xUnit or integration tests
Recommended Skills
Journey fit
Canonical shelf is Build because the skill drives implementation of ASP.NET Core services, data access, and API design rather than ideation or launch copy. Backend subphase matches minimal APIs, microservices, MediatR/CQRS, JWT, and the dotnet build/test verification loop.
How it compares
Use as a structured .NET implementation playbook instead of unstructured agent C# snippets without build/test gates.
Common Questions / FAQ
Who is dotnet-core-expert for?
Solo and indie developers using Claude Code, Cursor, or Codex who own backend delivery on .NET 8 and need minimal APIs, EF Core, or CQRS done with modern C# discipline.
When should I use dotnet-core-expert?
Use it during Build/backend when scaffolding ASP.NET Core services, designing EF models, adding JWT auth, or splitting CQRS handlers—especially when dotnet build and dotnet test must pass before you move on.
Is dotnet-core-expert safe to install?
It is MIT-licensed skill prose that guides local dotnet CLI usage; review the Security Audits panel on this Prism page and treat generated code like any production dependency before deploy.
SKILL.md
READMESKILL.md - Dotnet Core Expert
# .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/AppDbCo