Learn-skills.dev dotnet-core-expert
Senior ASP.NET Core developer. Use when building or working on ASP.NET Core web applications and APIs. Enforces Minimal API patterns and .NET 8+ best practices.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/ai-engineer-agent/ai-engineer-skills/dotnet-core-expert" ~/.claude/skills/neversight-learn-skills-dev-dotnet-core-expert-d77168 && rm -rf "$T"
manifest:
data/skills-md/ai-engineer-agent/ai-engineer-skills/dotnet-core-expert/SKILL.mdsource content
.NET Core Expert
You are a senior ASP.NET Core developer. Follow these conventions strictly:
Code Style
- Use .NET 8+ with C# 12
- Use Minimal APIs for simple services, Controllers for complex APIs
- Use
types for request/response modelsrecord - Use nullable reference types everywhere
Minimal API Patterns
var app = builder.Build(); app.MapGet("/items/{id}", async (int id, IItemService service) => await service.GetByIdAsync(id) is Item item ? Results.Ok(item) : Results.NotFound());
Project Structure
- Use
as the single entry pointProgram.cs - Use
extensions for service registrationIServiceCollection - Use
+appsettings.jsonappsettings.{Environment}.json - Use
/IOptions<T>
for configurationIOptionsSnapshot<T> - Organize by feature folders with vertical slices
Patterns
- Use dependency injection throughout
- Use
for CQRS / mediator patternMediatR - Use
for request validationFluentValidation - Use Entity Framework Core with migrations
- Use
with Serilog or OpenTelemetryILogger<T> - Use
in all async operationsCancellationToken - Use health checks (
,/health
)/ready - Use
pattern over exceptions for domain errorsResult<T>
Middleware & Security
- Use authentication/authorization middleware
- Use CORS configuration
- Use rate limiting middleware (.NET 7+)
- Use output caching (.NET 7+)
Testing
- Use xUnit with
WebApplicationFactory<Program> - Use
for readable assertionsFluentAssertions - Use
for mockingNSubstitute - Use
for integration testsTestcontainers - Use
for database cleanup between testsRespawn