aspnet-core
Skill15 starsChanged 42 days agoMITView on GitHub
Expert ASP.NET Core assistance covering Minimal APIs, Controller routing, Entity Framework Core, middleware, and dependency injection. Use when building enterprise .NET backend APIs and cloud services.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- Mindrally/skillstheir own version, first seen Oct 8, 2026
- VoDaiLocz/kilo-kit-mcptheir own version, first seen Aug 21, 2026
- FuSheng-MG/Pi-Agent-skillstheir own version, first seen Jul 24, 2026
- tutti-os/skillstheir own version, first seen Jul 9, 2026
- hebertzhu/agent-foundrytheir own version, first seen Mar 27, 2026
- dbDev-code/w-skillstheir own version, first seen Mar 25, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- openai/skills★ 27ksame name
- Mindrally/skills★ 275same name
- VoDaiLocz/kilo-kit-mcp★ 28same name
- Sorcha-Platform/Sorcha★ 2same name
- dbDev-code/w-skills★ 1same name
- FuSheng-MG/Pi-Agent-skills★ 1same name
- hebertzhu/agent-foundry★ 0same name
- tutti-os/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 119
Use ASP.NET Core Minimal APIs with Route Groups:
- Distinctive: line 144
Use Minimal APIs for microservices to maximize throughput and minimize cold-start latency.
- Very specific: line 146
Use IHttpClientFactory with Polly resilience pipelines for external HTTP calls.
- Very specific: line 151
Call .Result or .Wait() on async Tasks.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ASP.NET Core
Cross-platform, high-performance framework for building modern web apps.
When to Use
- High-Performance Enterprise Backends: Developing mission-critical APIs, microservices, and gRPC services on .NET 8 / 9.
- Cloud-Native Containerized Applications: Microservices deployed to Kubernetes, Azure Container Apps, or AWS ECS.
- Real-Time Bidirectional Communication: Scalable WebSocket and SSE apps using SignalR.
- Full-Stack C# Web Development: Blazor Server, Blazor WebAssembly, and Minimal APIs with C# 13.
Quick Start
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/", () => "Hello World!");
app.Run();Core Concepts
Minimal APIs with Typed Results & OpenAPI
Lightweight, high-performance endpoint mapping with zero controller ceremony:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddSingleton<IOrderRepository, InMemoryOrderRepository>();
var app = builder.Build();
app.UseSwagger();
app.UseSwaggerUI();
app.MapGet("/api/orders/{id:guid}", async (Guid id, IOrderRepository repo) =>
{
var order = await repo.GetByIdAsync(id);
return order is not null
? Results.Ok(order)
: Results.NotFound(new { message = $"Order {id} not found" });
})
.WithName("GetOrderById")
.Produces<Order>(StatusCodes.Status200OK)
.Produces(StatusCodes.Status404NotFound);
app.Run();Dependency Injection, Options Pattern & Configuration
Strongly typed configuration with validation:
public class DatabaseOptions
{
public const string SectionName = "Database";
public required string ConnectionString { get; set; }
public int MaxPoolSize { get; set; } = 100;
}
// In Program.cs:
builder.Services.AddOptions<DatabaseOptions>()
.BindConfiguration(DatabaseOptions.SectionName)
.ValidateDataAnnotations()
.ValidateOnStart();
// In Service:
public class OrderService(IOptions<DatabaseOptions> options, ILogger<OrderService> logger)
{
private readonly DatabaseOptions _options = options.Value;
}Global Error Handling Middleware & Problem Details
Standardized RFC 7807 error responses:
app.UseExceptionHandler(exceptionHandlerApp =>
{
exceptionHandlerApp.Run(async context =>
{
var exceptionHandlerPathFeature = context.Features.Get<IExceptionHandlerPathFeature>();
var exception = exceptionHandlerPathFeature?.Error;
var problemDetails = new ProblemDetails
{
Status = StatusCodes.Status500InternalServerError,
Title = "An unexpected error occurred",
Detail = exception?.Message,
Instance = context.Request.Path
};
context.Response.StatusCode = StatusCodes.Status500InternalServerError;
context.Response.ContentType = "application/problem+json";
await context.Response.WriteAsJsonAsync(problemDetails);
});
});Common Patterns
Minimal API Endpoint Group with Validation
Problem: Controller-heavy boilerplate for simple microservice CRUD endpoints.
Solution: Use ASP.NET Core Minimal APIs with Route Groups:
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
var users = app.MapGroup("/api/users");
users.MapGet("/", async (AppDbContext db) =>
await db.Users.AsNoTracking().ToListAsync());
users.MapPost("/", async (CreateUserDto dto, AppDbContext db) => {
var user = new User { Name = dto.Name, Email = dto.Email };
db.Users.Add(user);
await db.SaveChangesAsync();
return Results.Created($"/api/users/{user.Id}", user);
});
app.Run();Best Practices
Do:
- Use Minimal APIs for microservices to maximize throughput and minimize cold-start latency.
- Return
IResult/TypedResultsfrom endpoints for compile-time response verification. - Use
IHttpClientFactorywith Polly resilience pipelines for external HTTP calls. - Enable AOT (Ahead-of-Time) compilation (
PublishAot=true) for microservices to slash memory footprint.
Don't:
- Call
.Resultor.Wait()on async Tasks; always useawaitto prevent thread pool starvation. - Register transient services in singletons without scoping via
IServiceScopeFactory. - Log sensitive credentials or PII; configure logging sanitization filters.
Troubleshooting
| Error | Cause | Solution |
InvalidOperationException: Unable to resolve service for type ... | Service not registered in DI container. | Register service in builder.Services.AddScoped<IService, Service>(). |
System.Text.Json.JsonException: A possible object cycle was detected | Circular reference in Entity Framework navigation properties. | Configure ReferenceHandler.IgnoreCycles in JSON options or return DTOs. |
HTTP 500.30 - ANCM In-Process Start Failure | Startup exception during application bootstrapping in IIS / Kestrel. | Inspect stdoutLogEnabled="true" in web.config or review event viewer logs. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

