iiuniversitet.ruЦентр обучения нейросетямОткрыть каталог

Разработка на ASP.NET Core

Помогает выбрать модель приложения ASP.NET Core, собрать хост и конвейер запросов и писать код по актуальным рекомендациям Microsoft.

СкиллOpenAICodexApache-2.0Нужен терминалПроверка не требуется
Что делает
Помогает выбрать модель приложения ASP.NET Core, собрать хост и конвейер запросов и писать код по актуальным рекомендациям Microsoft.
Когда брать
При создании, проверке, рефакторинге или обновлении веб-приложения на ASP.NET Core: Blazor, Razor Pages, MVC, API, SignalR, gRPC.
Когда не брать
Если проект не на .NET или нужна задача вне веб-разработки.
Пример запроса
Спроектируй веб-API на ASP.NET Core с авторизацией и тестами и предложи структуру проекта.
Нужно подключить
терминал, репозиторий с кодом
Работает лучше с
доступ к документации Microsoft Learn

Как включить

  1. Скачайте архив и распакуйте его.
  2. Положите папку aspnet-core в ~/.agents/skills/.
  3. Вызовите скилл командой $aspnet-core или найдите его через /skills.

Текст

---
name: aspnet-core
description: Создавай, проверяй, рефакторь и проектируй веб-приложения на ASP.NET Core по актуальным официальным рекомендациям для веб-разработки на .NET. Используй при работе с Blazor Web Apps, Razor Pages, MVC, Minimal APIs, веб-API на контроллерах, SignalR, gRPC, middleware, внедрением зависимостей, конфигурацией, аутентификацией, авторизацией, тестированием, производительностью, развёртыванием и обновлением ASP.NET Core.
---

ASP.NET Core

Обзор

Выбери подходящую модель приложения ASP.NET Core, правильно собери хост и конвейер обработки запросов и реализуй функции так, как сегодня описывает Microsoft.

Загружай минимальный набор справочников, который подходит под задачу. Не загружай все справочники по умолчанию.

Рабочий процесс

  1. Уточни целевой фреймворк, SDK и текущую модель приложения.
  2. Для новых приложений и крупных рефакторингов сначала открой [references/stack-selection.md](references/stack-selection.md).
  3. Затем открой [references/program-and-pipeline.md](references/program-and-pipeline.md): там Program.cs, внедрение зависимостей (DI), конфигурация, middleware, маршрутизация, логирование и статические файлы.
  4. Открой ровно один основной справочник по модели приложения:
  5. [references/ui-blazor.md](references/ui-blazor.md)
  6. [references/ui-razor-pages.md](references/ui-razor-pages.md)
  7. [references/ui-mvc.md](references/ui-mvc.md)
  8. [references/apis-minimal-and-controllers.md](references/apis-minimal-and-controllers.md)
  9. Сквозные справочники добавляй только по необходимости:
  10. [references/data-state-and-services.md](references/data-state-and-services.md)
  11. [references/security-and-identity.md](references/security-and-identity.md)
  12. [references/realtime-grpc-and-background-work.md](references/realtime-grpc-and-background-work.md)
  13. [references/testing-performance-and-operations.md](references/testing-performance-and-operations.md)
  14. Прежде чем вводить новые API платформы в старое решение или переходить между основными версиями, открой [references/versioning-and-upgrades.md](references/versioning-and-upgrades.md).
  15. Если нужен раздел Microsoft Learn под задачу, которую не покрывают профильные справочники, используй [references/source-map.md](references/source-map.md).

Допущения по умолчанию

  • Выбирай последние стабильные ASP.NET Core и .NET, если репозиторий или запрос пользователя не фиксируют более старую целевую версию.
  • По состоянию на март 2026 года для новых рабочих проектов выбирай .NET 10 / ASP.NET Core 10. ASP.NET Core 11 считай предварительной версией, пока пользователь прямо не попросит предварительные возможности.
  • Предпочитай WebApplicationBuilder и WebApplication. Не используй старые шаблоны Startup и WebHost, если их уже применяет кодовая база или если задача — миграция.
  • Прежде чем подключать сторонние решения, используй встроенное: DI, параметры и конфигурацию, логирование, ProblemDetails, OpenAPI, проверки работоспособности (health checks), ограничение частоты запросов, кэширование вывода и Identity.
  • Держи срезы функций цельными, чтобы страницу, компонент, конечную точку, контроллер, проверку данных, сервис, доступ к данным и тесты было легко проследить.
  • Уважай существующую модель приложения. Не переписывай Razor Pages на MVC и контроллеры на Minimal APIs без веской причины.

Справочники

  • [references/_sections.md](references/_sections.md): краткий указатель и порядок чтения.
  • [references/stack-selection.md](references/stack-selection.md): выбор подходящей модели приложения и шаблона ASP.NET Core.
  • [references/program-and-pipeline.md](references/program-and-pipeline.md): как устроить Program.cs, сервисы, middleware, маршрутизацию, конфигурацию, логирование и статические файлы.
  • [references/ui-blazor.md](references/ui-blazor.md): как строить Blazor Web Apps, выбирать режимы отрисовки и правильно пользоваться компонентами, формами и взаимодействием с JS.
  • [references/ui-razor-pages.md](references/ui-razor-pages.md): как строить серверные приложения с упором на страницы: обработчики, привязка модели, соглашения.
  • [references/ui-mvc.md](references/ui-mvc.md): как строить приложения на контроллерах и представлениях с чётким разделением ответственности.
  • [references/apis-minimal-and-controllers.md](references/apis-minimal-and-controllers.md): как строить HTTP API на Minimal APIs или контроллерах, включая проверку данных и шаблоны ответов.
  • [references/data-state-and-services.md](references/data-state-and-services.md): как грамотно использовать EF Core, DbContext, параметры, IHttpClientFactory, сессию, временные данные и состояние приложения.
  • [references/security-and-identity.md](references/security-and-identity.md): аутентификация, авторизация, Identity, секреты, защита данных, CORS, CSRF и HTTPS.
  • [references/realtime-grpc-and-background-work.md](references/realtime-grpc-and-background-work.md): SignalR, gRPC и фоновые службы (hosted services).
  • [references/testing-performance-and-operations.md](references/testing-performance-and-operations.md): интеграционные и браузерные тесты, кэширование, сжатие, проверки работоспособности, ограничение частоты запросов и вопросы развёртывания.
  • [references/versioning-and-upgrades.md](references/versioning-and-upgrades.md): целевые фреймворки, критические изменения, устаревшие API и миграции.
  • [references/source-map.md](references/source-map.md): соответствие дерева официальной документации ASP.NET Core справочникам этого скилла.

Заметки по выполнению

  • Когда создаёшь новый код, начинай с нужного шаблона dotnet new и сохраняй узнаваемую структуру проекта.
  • Когда правишь существующее решение, сначала следуй его соглашениям, а справочники используй, чтобы не допустить неверного применения фреймворка и устаревших приёмов.
  • Если в задаче упомянуто «последнее» («latest»), проверь возможность на Microsoft Learn или в репозитории документации ASP.NET Core, прежде чем полагаться на память.

Перевод: iiuniversitet. Оригинал: https://github.com/openai/skills/tree/main/skills/.curated/aspnet-core, лицензия Apache-2.0. Изменения: перевод на русский язык.

Оригинал на английском
---
name: aspnet-core
description: Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.
---

# 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](references/stack-selection.md) first for new apps or major refactors.
3. Open [references/program-and-pipeline.md](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-blazor.md)
   - [references/ui-razor-pages.md](references/ui-razor-pages.md)
   - [references/ui-mvc.md](references/ui-mvc.md)
   - [references/apis-minimal-and-controllers.md](references/apis-minimal-and-controllers.md)
5. Add cross-cutting references only as needed:
   - [references/data-state-and-services.md](references/data-state-and-services.md)
   - [references/security-and-identity.md](references/security-and-identity.md)
   - [references/realtime-grpc-and-background-work.md](references/realtime-grpc-and-background-work.md)
   - [references/testing-performance-and-operations.md](references/testing-performance-and-operations.md)
6. Open [references/versioning-and-upgrades.md](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](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](references/_sections.md): Quick index and reading order.
- [references/stack-selection.md](references/stack-selection.md): Choose the right ASP.NET Core application model and template.
- [references/program-and-pipeline.md](references/program-and-pipeline.md): Structure `Program.cs`, services, middleware, routing, configuration, logging, and static assets.
- [references/ui-blazor.md](references/ui-blazor.md): Build Blazor Web Apps, choose render modes, and use components, forms, and JS interop correctly.
- [references/ui-razor-pages.md](references/ui-razor-pages.md): Build page-focused server-rendered apps with handlers, model binding, and conventions.
- [references/ui-mvc.md](references/ui-mvc.md): Build controller/view applications with clear separation of concerns.
- [references/apis-minimal-and-controllers.md](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](references/data-state-and-services.md): Use EF Core, `DbContext`, options, `IHttpClientFactory`, session, temp data, and app state responsibly.
- [references/security-and-identity.md](references/security-and-identity.md): Apply authentication, authorization, Identity, secrets, data protection, CORS, CSRF, and HTTPS guidance.
- [references/realtime-grpc-and-background-work.md](references/realtime-grpc-and-background-work.md): Use SignalR, gRPC, and hosted services.
- [references/testing-performance-and-operations.md](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](references/versioning-and-upgrades.md): Handle target frameworks, breaking changes, obsolete APIs, and migrations.
- [references/source-map.md](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.

Источник: openai/skills / aspnet-core ↗. Ссылка проверена 2026-10-10.