dotnet-core-expert

jeffallan/claude-skills · updated Apr 8, 2026

$npx skills add https://github.com/jeffallan/claude-skills --skill dotnet-core-expert
0 commentsdiscussion
summary

Expert guidance for building .NET 8 applications with clean architecture, minimal APIs, and cloud-native patterns.

  • Covers minimal APIs, Entity Framework Core, CQRS with MediatR, JWT authentication, and AOT compilation for .NET 8
  • Enforces async/await patterns, nullable reference types, record DTOs, and clean architecture layer separation
  • Includes reference guides for minimal APIs, clean architecture, Entity Framework, authentication, and cloud-native deployment
  • Provides code exampl
skill.md

.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

// 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

// 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

// 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

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

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.669 reviews
  • Diego Chawla· Dec 28, 2024

    dotnet-core-expert is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Ishan Menon· Dec 24, 2024

    dotnet-core-expert has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Ishan Anderson· Dec 8, 2024

    We added dotnet-core-expert from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Ishan Abebe· Dec 4, 2024

    Solid pick for teams standardizing on skills: dotnet-core-expert is focused, and the summary matches what you get after install.

  • James Malhotra· Nov 27, 2024

    dotnet-core-expert reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Kabir Lopez· Nov 23, 2024

    dotnet-core-expert has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Ira Taylor· Nov 19, 2024

    Keeps context tight: dotnet-core-expert is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Hiroshi Malhotra· Nov 15, 2024

    Solid pick for teams standardizing on skills: dotnet-core-expert is focused, and the summary matches what you get after install.

  • Sakshi Patil· Nov 3, 2024

    Useful defaults in dotnet-core-expert — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Chaitanya Patil· Oct 22, 2024

    Registry listing for dotnet-core-expert matched our evaluation — installs cleanly and behaves as described in the markdown.

showing 1-10 of 69

1 / 7