neo-dotnet-minimal-apis
Skill7 starsChanged 6 months agoMITView on GitHub
Use this skill when building, debugging, refactoring, or reviewing ASP.NET Core Minimal APIs, lightweight endpoints, route groups, endpoint filters, typed results, OpenAPI metadata, or high-performance .NET API services without controllers.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- generate-skillSkill
- neo-azure-pipelinesSkill
- neo-clarificationSkill
- neo-clean-architectureSkill
- neo-code-reviewSkill
- neo-csharp-interface-generatorSkill
- neo-csharpSkill
- neo-dotnet-ef-coreSkill
- neo-dotnet-mvcSkill
- neo-dotnetSkill
- neo-dotnet-tag-helperSkill
- neo-dotnet-webapiSkill
- neo-harness-projectSkill
- neo-harnessSkill
- neo-javascriptSkill
- neo-opentelemetrySkill
- neo-prSkill
- neo-python-managerSkill
- neo-pythonSkill
- neo-rabbitmqSkill
- neo-rustSkill
- neo-stop-slopSkill
- neo-sub-agentSkill
- neo-swiftSkill
- neo-swift-uiSkill
- neo-typescriptSkill
- neo-vueSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Check .csproj to identify TargetFramework.
- Distinctive: line 31
Write clean, high-performance Minimal API code, prioritizing Lambdas or extension methods.
- Distinctive: line 36
Check whether the generated OpenAPI documentation is complete.
- Very specific: line 37
Ensure asynchronous operations correctly pass the CancellationToken.
- Very specific: line 43
Route Groups: Use MapGroup to consolidate prefixes and authentication.
- Very specific: line 66
Async Safety: Always accept and pass down CancellationToken.
- Distinctive: line 75
Ensure the provided code executes correctly in a .NET 6+ environment.
- Distinctive: line 77
Check if the code complies with high-performance best practices for Minimal APIs (e.g., avoiding closures, reducing allocations).
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
.NET Minimal APIs Expert Skill
Trigger On
- The user requests to create, debug, refactor, or review .NET Minimal APIs.
- The project's
Program.cscontainsWebApplication.CreateBuilder(args)and is not configured with a Controllers directory. - The target framework is .NET 6.0 (LTS) and above.
- There is a need to optimize API performance or simplify Web API architecture.
Workflow
- Perceive (Architecture Awareness):
- Check
.csprojto identifyTargetFramework. - Analyze
Program.csto distinguish whether it uses simple endpoints or adopts a Module-based or Vertical Slice organization. - Identify whether OpenAPI (Swagger) support has been configured.
- Check
- Reason (Planning Phase):
- Evaluate whether "Route Groups" need to be introduced to optimize organizational structure.
- Determine whether to use "Endpoint Filters" to handle cross-cutting concerns (such as parameter validation).
- Choose the most appropriate syntax based on the .NET version (e.g.,
TypedResultsin .NET 7+).
- Act (Execution Phase):
- Write clean, high-performance Minimal API code, prioritizing Lambdas or extension methods.
- Implement strong typing and DTOs (prioritize using
record). - Integrate dependency injection, avoiding the Service Locator pattern.
- Validate (Standard Validation):
- Validate whether the endpoints correctly return expected HTTP status codes.
- Check whether the generated OpenAPI documentation is complete.
- Ensure asynchronous operations correctly pass the
CancellationToken.
Feature Roadmap (.NET 6 - 11)
.NET 6 & 7 (Foundation)
- Minimal Hosting: Simplified startup process and top-level statements.
- Route Groups: Use
MapGroupto consolidate prefixes and authentication. - Endpoint Filters: Implement interception logic within Minimal APIs.
- Typed Results: Improved unit testing and Swagger support.
.NET 8 & 9 (Productivity)
- Antiforgery: Built-in anti-forgery token support.
- Form Binding: Support for
[FromForm]parameter binding. - HybridCache: High-performance multi-level caching support.
- OpenAPI Improvements: Better OpenAPI code generation.
.NET 10 (AOT & Middleware)
- Native AOT Optimization: AOT-optimized compilation tailored for Minimal APIs.
- Enhanced Middleware Patterns: New middleware designed for lightweight architectures.
.NET 11+ (Version-Specific Features)
- Asynchronous Validation Support: Native async validation rules across Minimal API endpoints and parameter binding, awaiting validation logic seamlessly.
- OpenAPI 3.2 by Default: Updated default specification to OpenAPI 3.2, with support for
OpenApiGenerationEnvironmentin build-time generation. - Zstandard (zstd) Compression: Native high-ratio, low-latency compression provider for response compression and request decompression.
- Runtime Async Performance: Reduced task state machine allocations and cleaner async stack traces across endpoint handlers.
Coding Standards
- Clean Routing: Prioritize using extension methods to modularize routes.
- Strong Typing: Prioritize using
TypedResultsandResults<T1, T2>. - Async Safety: Always accept and pass down
CancellationToken. - DI Best Practices: Services should be defined directly in the Handler parameters.
Deliver
- Version-Optimized API Code: Provide the most appropriate modern API code based on the target .NET version.
- Modular Architecture: Provide structural suggestions for extracting
Program.csroutes into extension methods. - OpenAPI Configuration: Provide comprehensive Swagger/OpenAPI configuration suggestions.
Validate
- Ensure the provided code executes correctly in a .NET 6+ environment.
- Validate endpoint security (authentication, authorization, Antiforgery).
- Check if the code complies with high-performance best practices for Minimal APIs (e.g., avoiding closures, reducing allocations).
Documentation
Official References
- What's new in ASP.NET Core in .NET 11
- Minimal APIs Overview
- Route groups and filters
- Typed responses in Minimal APIs
Internal References
- Minimal APIs Coding Style and Naming Conventions
- Minimal APIs Anti-Patterns and Best Practices
- Minimal APIs Modern Patterns Guide
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.

