aspnet-conventions

Codify ASP.NET Core conventions for web API and MVC app architecture.

9|1|Updated Jun 16, 2026
One-click install
npx skills add https://github.com/AratKruglik/antigravity-sdlc --skill aspnet-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspnet-conventions
Source: https://github.com/AratKruglik/antigravity-sdlc/tree/main/plugins/aspnet-core-plugin/skills/aspnet-conventions
Command: npx skills add https://github.com/AratKruglik/antigravity-sdlc --skill aspnet-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Codifies ASP.NET Core conventions to ensure consistent app architecture across projects, including Program.cs composition, DI lifetimes, and middleware ordering.

Core Features & Use Cases

  • Enforces correct service registration patterns (AddControllers vs minimal APIs), DI lifetimes, and Options pattern usage.
  • Guides middleware pipeline ordering to prevent security and runtime issues, with guidance on ProblemDetails-based error handling.
  • Supports building robust web apps with structured logging, health checks, and JWT authentication scaffolding.

Quick Start

Configure a new ASP.NET Core app following the conventions outlined in this skill to ensure predictable startup and behavior.

Frequently Asked Questions about aspnet-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What's the correct order for ASP.NET Core middleware in Program.cs?

Correct ASP.NET Core middleware ordering prevents security and runtime issues. This skill guides pipeline composition in Program.cs to ensure authentication, authorization, and error handling layers are registered predictably.

How do I configure dependency injection lifetimes using the Options pattern in ASP.NET Core?

Configuring DI lifetimes with the Options pattern requires consistent service registration. This skill enforces correct patterns for AddControllers and minimal APIs, ensuring safe dependency resolution and configuration layering.

Does this approach support both minimal APIs and MVC controllers in dotnet?

Yes, applying these conventions supports both minimal APIs and MVC controllers. It codifies correct service registration patterns in Program.cs to ensure consistent app architecture regardless of your chosen web API approach.

How do I implement ProblemDetails-based error handling in an ASP.NET Core web API?

Implementing ProblemDetails-based error handling standardizes API failure responses. This skill provides guidance on scaffolding structured error flows within the middleware pipeline for robust and predictable API behavior.

Why do I need structured logging and health checks in my ASP.NET Core app?

Structured logging and health checks are required for robust application monitoring. This skill satisfies these requirements by guiding their configuration in Program.cs alongside JWT authentication scaffolding for secure web apps.

Can I use these ASP.NET Core conventions for JWT authentication flows?

Yes, these ASP.NET Core conventions support JWT authentication scaffolding. They ensure authentication and authorization flows are correctly ordered within the middleware pipeline to prevent security vulnerabilities.