neo-dotnet-webapi

Solid

Use this skill when building, debugging, refactoring, or reviewing controller-based ASP.NET Core Web APIs, including ControllerBase, ActionResult<T>, Problem Details, API versioning, global exception handling, DTOs, and OpenAPI behavior.

Web & Frontend 7 stars 2 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
30
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# .NET Web API Expert Skill ## Trigger On - The user requests to create, debug, refactor, or review ASP.NET Core Web APIs. - The project contains a `Controllers` directory and inherits from `ControllerBase`. - The target framework is .NET 6.0 (LTS) and above. - There is a need for API code modernization (e.g., migrating from Middleware exception handling to .NET 8+ `IExceptionHandler`). ## Workflow 1. **Perceive (Architecture Awareness):** - Check `.csproj` to identify `TargetFramework`. - Analyze project structure to confirm whether it uses N-Tier architecture or Vertical Slice. - Identify existing cross-cutting concern handling methods (filters, middleware). 2. **Reason (Planning Phase):** - Evaluate whether to introduce the "Problem Details" standard. - Determine whether to use the .NET 8+ global exception handling mechanism. - Choose an appropriate versioning strategy based on project scale. 3. **Act (Execution Phase):** - Write high-quality controllers compliant with `[ApiController]` conventions. - Implement strongly-typed and immutable DTOs (prioritize `record`). - Integrate dependency injection, prioritizing Primary Constructors (C# 12+). 4. **Validate (Standard Validation):** - Validate whether Action return types comply with `ActionResult<T>` specifications. - Check NRT (Nullable Reference Types) safety. - Ensure asynchronous operations correctly pass down `CancellationToken`. ## Feature Roadmap (.NET 6 - 10) ### .NET 6 & 7 (F...

Details

Author
Benknightdark
Repository
Benknightdark/neo-skills
Created
6 months ago
Last Updated
yesterday
Language
JavaScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category