aspnet-core

Guide ASP.NET Core app model selection and Program.cs pipeline construction.

779|80|Updated Jun 20, 2025
One-click install
npx skills add https://github.com/Haohao-end/openagent --skill aspnet-core-haohao-end
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspnet-core
Source: https://github.com/Haohao-end/openagent/tree/main/api/internal/core/skills/catalog/aspnet-core
Command: npx skills add https://github.com/Haohao-end/openagent --skill aspnet-core-haohao-end

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you avoid incorrect ASP.NET Core setup by guiding you to choose the right application model and wire up the host and request pipeline according to current official guidance.

Core Features & Use Cases

  • App-model selection: Pick exactly the primary ASP.NET Core model (Blazor, Razor Pages, MVC, or Minimal APIs/controllers) that matches your UI and API needs.
  • Host & pipeline construction: Structure Program.cs using the correct conventions for services, configuration, middleware, routing, logging, and static assets.
  • Cross-cutting additions on demand: Apply security/identity, data-state/services, realtime/background work, and testing/operations only when the task requires them.

Example use case: you are starting a new ASP.NET Core project and want a clean, maintainable Program.cs with the correct DI, middleware order, and the right routing and endpoint patterns for the chosen UI or API style.

Quick Start

Create a new ASP.NET Core website for me using the appropriate application model and a correct host and request pipeline.

Frequently Asked Questions about aspnet-core

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

FAQPage Schema
How do I structure Program.cs for an ASP.NET Core web API?

To structure Program.cs for an ASP.NET Core web API, follow current official guidance to construct the host and request pipeline, correctly wiring dependency injection, middleware, routing, and configuration services.

What is the correct middleware order in an ASP.NET Core request pipeline?

The correct middleware order in an ASP.NET Core request pipeline requires mapping each task to Microsoft Learn guidance, sequentially adding security, routing, and static assets to handle production requests properly.

How do I choose the right ASP.NET Core application model for my project?

To choose the right ASP.NET Core application model, match your specific UI and API needs to one primary model: Blazor, Razor Pages, MVC, or Minimal APIs/controllers.

How do I configure dependency injection in ASP.NET Core?

To configure dependency injection in ASP.NET Core, structure Program.cs using correct conventions for services, applying cross-cutting additions like data-state, security, and realtime background work only when the task requires them.

Does this guidance support major framework upgrades and refactors for ASP.NET Core?

Yes, this guidance supports major framework upgrades and refactors for ASP.NET Core by following a focused reference reading order to update your host and request pipeline according to current official guidance.