Coding

aspnet-core

Try it

Build, review, and refactor ASP.NET Core apps using current official .NET guidance and framework patterns.

What it does

Generates code and architectural advice aligned with Microsoft's latest ASP.NET Core documentation for Blazor, Razor Pages, MVC, and Minimal APIs. It selects the correct application model references on demand to ensure accurate host composition, middleware configuration, and feature implementation. Outputs follow standard dotnet new templates and built-in infrastructure like DI and Identity before suggesting third-party libraries.

When to use it

  • Scaffolding a new Blazor Web App or Minimal API with correct project structure
  • Refactoring legacy Startup.cs to modern WebApplicationBuilder patterns
  • Implementing authentication and authorization using built-in Identity
  • Migrating between major ASP.NET Core versions with breaking change awareness

The skill document

ASP.NET Core

Overview

Choose the right ASP.NET Core application model, compose the host and request pipeline correctly, and implement features in the framework style Microsoft documents today.

Load the smallest set of references that fits the task. Do not load every reference by default.

Workflow

  1. Confirm the target framework, SDK, and current app model.
  2. Open references/stack-selection.md first for new apps or major refactors.
  3. Open references/program-and-pipeline.md next for Program.cs, DI, configuration, middleware, routing, logging, and static assets.
  4. Open exactly one primary app-model reference:
    • references/ui-blazor.md
    • references/ui-razor-pages.md
    • references/ui-mvc.md
    • references/apis-minimal-and-controllers.md
  5. Add cross-cutting references only as needed:
    • references/data-state-and-services.md
    • references/security-and-identity.md
    • references/realtime-grpc-and-background-work.md
    • references/testing-performance-and-operations.md
  6. Open references/versioning-and-upgrades.md before introducing new platform APIs into an older solution or when migrating between major versions.
  7. Use references/source-map.md when you need the Microsoft Learn section that corresponds to a task not already covered by the focused references.

Default Operating Assumptions

  • Prefer the latest stable ASP.NET Core and .NET unless the repository or user request pins an older target.
  • As of March 2026, prefer .NET 10 / ASP.NET Core 10 for new production work. Treat ASP.NET Core 11 as preview unless the user explicitly asks for preview features.
  • Prefer WebApplicationBuilder and WebApplication. Avoid older Startup and WebHost patterns unless the codebase already uses them or the task is migration.
  • Prefer built-in DI, options/configuration, logging, ProblemDetails, OpenAPI, health checks, rate limiting, output caching, and Identity before adding third-party infrastructure.
  • Keep feature slices cohesive so the page, component, endpoint, controller, validation, service, data access, and tests are easy to trace.
  • Respect the existing app model. Do not rewrite Razor Pages to MVC or controllers to Minimal APIs without a clear reason.

Reference Guide

  • references/_sections.md: Quick index and reading order.
  • references/stack-selection.md: Choose the right ASP.NET Core application model and template.
  • references/program-and-pipeline.md: Structure Program.cs, services, middleware, routing, configuration, logging, and static assets.
  • references/ui-blazor.md: Build Blazor Web Apps, choose render modes, and use components, forms, and JS interop correctly.
  • references/ui-razor-pages.md: Build page-focused server-rendered apps with handlers, model binding, and conventions.
  • references/ui-mvc.md: Build controller/view applications with clear separation of concerns.
  • references/apis-minimal-and-controllers.md: Build HTTP APIs with Minimal APIs or controllers, including validation and response patterns.
  • references/data-state-and-services.md: Use EF Core, DbContext, options, IHttpClientFactory, session, temp data, and app state responsibly.
  • references/security-and-identity.md: Apply authentication, authorization, Identity, secrets, data protection, CORS, CSRF, and HTTPS guidance.
  • references/realtime-grpc-and-background-work.md: Use SignalR, gRPC, and hosted services.
  • references/testing-performance-and-operations.md: Add integration tests, browser tests, caching, compression, health checks, rate limits, and deployment concerns.
  • references/versioning-and-upgrades.md: Handle target frameworks, breaking changes, obsolete APIs, and migrations.
  • references/source-map.md: Map the official ASP.NET Core documentation tree to the references in this skill.

Execution Notes

  • When generating new code, start from the correct dotnet new template and keep the generated structure recognizable.
  • When editing an existing solution, follow the solution's conventions first and use these references to avoid framework misuse or outdated patterns.
  • When a task mentions "latest", verify the feature on Microsoft Learn or the ASP.NET Core docs repo before relying on memory.

Questions people ask

Which ASP.NET Core versions does this skill target?
It defaults to the latest stable release, currently .NET 10 / ASP.NET Core 10 for new production work as of March 2026. ASP.NET Core 11 is treated as preview unless explicitly requested.
Does it support older Startup.cs based projects?
Yes, it respects existing app models and avoids rewriting patterns without clear reason. The workflow includes specific references for versioning and upgrades to handle migrations safely.
How does it handle third-party dependencies?
It prioritizes built-in features like options, logging, ProblemDetails, health checks, and rate limiting before adding external packages. Third-party infrastructure is only suggested when built-in capabilities are insufficient.

Related skills

figma-use

Official

Enforces mandatory Figma Plugin API rules and incremental workflows to prevent script failures during file modifications.

by OpenAI28.8k stars

cli-creator

Official

Generates durable, composable CLIs from API docs or scripts that return stable JSON for agent automation.

by OpenAI28.8k stars

Generates reproducible p5.js algorithmic art with interactive parameter controls from a custom computational philosophy.

by Anthropic197.1k stars

Create, test, and iteratively improve agent skills with structured evaluations and description optimization.

by Anthropic197.1k stars

Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.

by OpenAI28.8k stars

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state manag

by Anthropic197.1k stars

More from OpenAI

Browse all skills

chatgpt-apps

Official

Generate docs-aligned ChatGPT Apps SDK scaffolds with MCP server and widget UI.

by OpenAI28.8k stars

Builds or updates full Figma screens using published design system components, variables, and styles instead of hardcoded primitives.

by OpenAI28.8k stars

Orchestrates multi-phase Figma design system builds from codebases with mandatory validation checkpoints.

by OpenAI28.8k stars

figma-use

Official

Enforces mandatory Figma Plugin API rules and incremental workflows to prevent script failures during file modifications.

by OpenAI28.8k stars

hatch-pet

Official

Generates Codex-compatible animated pet spritesheets and packaging from concepts, brand cues, or reference images.

by OpenAI28.8k stars

imagegen

Official

Generate or edit raster images for projects using built-in AI tools without requiring an API key.

by OpenAI28.8k stars