Приложения на ASP.NET Core
Делает работу с ASP.NET Core по актуальным правилам: выбор между Blazor, Razor Pages, MVC и Minimal APIs, Program.cs и порядок middleware, авторизация, EF Core, тесты, переход на .NET 10. Для случаев, когда вы создаёте, ревьюите или обновляете приложение.
aspnet-core- Автор
- OpenAI
- Источник
- openai/skills/skills/.curated/aspnet-core @ 49f948f
- Лицензия
- Apache-2.0
Об этом скилле
Что делает
Скилл даёт агенту карту актуальных практик ASP.NET Core и велит читать только ту часть, которая нужна задаче. Сначала агент уточняет целевой фреймворк, SDK и модель приложения. Для нового приложения он открывает stack-selection.md — таблицу с Blazor Web App, Razor Pages, MVC, Minimal APIs, API на контроллерах, SignalR и gRPC и подходящим шаблоном dotnet new. Потом program-and-pipeline.md: Program.cs, время жизни сервисов в DI и порядок middleware из десяти шагов, — и ровно один файл под выбранную модель. Файлы по сквозным темам покрывают EF Core и IHttpClientFactory, Identity и авторизацию, SignalR, gRPC и фоновые сервисы, интеграционные тесты на WebApplicationFactory<Program>. В versioning-and-upgrades.md — ломающие изменения при переходе на ASP.NET Core 8, 9 и 10.
Установки по умолчанию — на март 2026 года: .NET 10 для новых проектов, ASP.NET Core 11 как превью, WebApplicationBuilder вместо Startup. Сначала — встроенные ProblemDetails, OpenAPI, ограничение частоты запросов и Identity, сторонние пакеты — потом, и никакого перевода приложения на другую модель без причины. Если в задаче сказано «последняя версия», агент сверяется с Microsoft Learn, а не с памятью.
Когда включать и когда не надо
Чтобы начать, расширить, отревьюить или обновить приложение на ASP.NET Core — особенно когда надо выбрать модель приложения или разобраться с порядком middleware.
Другие области .NET, например десктоп, скилл не покрывает, а советы по версиям заканчиваются мартом 2026 года.
Как поставить и вызвать
Команда установки ниже скачивает всю папку: SKILL.md, тринадцать справочных файлов, логотип, файл метаданных для Codex и лицензию. Ключи API не нужны; для dotnet new и тестов нужен .NET SDK. Агент сам подхватывает скилл, когда речь заходит об ASP.NET Core. Вызвать вручную:
- Claude Code:
/aspnet-coreили попросить скилл по имени. - Codex:
$aspnet-core. - Cursor: наберите
/в чате Agent и выберитеaspnet-core.
Пример: /aspnet-core Добавь в это приложение на Razor Pages Minimal API для заказов, с политиками авторизации и интеграционными тестами.
В метаданных для Codex скилл помечен «только Windows», хотя справочники описывают и Kestrel за Nginx на Linux. OpenAI пометила репозиторий openai/skills устаревшим; наша копия зафиксирована на одном из его коммитов, а новой версии этого скилла в openai/plugins на ноябрь 2026 года нет.
Чем отличается от похожих
Других скиллов про веб-разработку на .NET в каталоге нет. Ревью безопасности по стеку из того же набора содержит справочники только для Python, JavaScript/TypeScript и Go, так что для ASP.NET Core остаётся security-and-identity.md из этого скилла. Проектирование API и интерфейсов добавит правила для HTTP-контрактов, ошибок и пагинации без привязки к фреймворку.
Установка
Выполните одну команду — она сохранит SKILL.md и файлы, которые он использует, в папку скиллов агента. Claude Code и Codex подхватывают новый скилл без перезапуска; если скилл не появился, перезапустите агента.
Скилл написан на английском — агент поймёт его и ответит вам по-русски.
curl -fsSL --create-dirs -o ~/.claude/skills/aspnet-core/SKILL.md https://anymodel.org/en/skills/openai/aspnet-core/SKILL.md -o ~/.claude/skills/aspnet-core/LICENSE.txt https://anymodel.org/en/skills/openai/aspnet-core/LICENSE.txt -o ~/.claude/skills/aspnet-core/agents/openai.yaml https://anymodel.org/en/skills/openai/aspnet-core/agents/openai.yaml -o ~/.claude/skills/aspnet-core/assets/dotnet-logo.png https://anymodel.org/en/skills/openai/aspnet-core/assets/dotnet-logo.png -o ~/.claude/skills/aspnet-core/references/_sections.md https://anymodel.org/en/skills/openai/aspnet-core/references/_sections.md -o ~/.claude/skills/aspnet-core/references/apis-minimal-and-controllers.md https://anymodel.org/en/skills/openai/aspnet-core/references/apis-minimal-and-controllers.md -o ~/.claude/skills/aspnet-core/references/data-state-and-services.md https://anymodel.org/en/skills/openai/aspnet-core/references/data-state-and-services.md -o ~/.claude/skills/aspnet-core/references/program-and-pipeline.md https://anymodel.org/en/skills/openai/aspnet-core/references/program-and-pipeline.md -o ~/.claude/skills/aspnet-core/references/realtime-grpc-and-background-work.md https://anymodel.org/en/skills/openai/aspnet-core/references/realtime-grpc-and-background-work.md -o ~/.claude/skills/aspnet-core/references/security-and-identity.md https://anymodel.org/en/skills/openai/aspnet-core/references/security-and-identity.md -o ~/.claude/skills/aspnet-core/references/source-map.md https://anymodel.org/en/skills/openai/aspnet-core/references/source-map.md -o ~/.claude/skills/aspnet-core/references/stack-selection.md https://anymodel.org/en/skills/openai/aspnet-core/references/stack-selection.md -o ~/.claude/skills/aspnet-core/references/testing-performance-and-operations.md https://anymodel.org/en/skills/openai/aspnet-core/references/testing-performance-and-operations.md -o ~/.claude/skills/aspnet-core/references/ui-blazor.md https://anymodel.org/en/skills/openai/aspnet-core/references/ui-blazor.md -o ~/.claude/skills/aspnet-core/references/ui-mvc.md https://anymodel.org/en/skills/openai/aspnet-core/references/ui-mvc.md -o ~/.claude/skills/aspnet-core/references/ui-razor-pages.md https://anymodel.org/en/skills/openai/aspnet-core/references/ui-razor-pages.md -o ~/.claude/skills/aspnet-core/references/versioning-and-upgrades.md https://anymodel.org/en/skills/openai/aspnet-core/references/versioning-and-upgrades.md
curl -fsSL --create-dirs -o ~/.agents/skills/aspnet-core/SKILL.md https://anymodel.org/en/skills/openai/aspnet-core/SKILL.md -o ~/.agents/skills/aspnet-core/LICENSE.txt https://anymodel.org/en/skills/openai/aspnet-core/LICENSE.txt -o ~/.agents/skills/aspnet-core/agents/openai.yaml https://anymodel.org/en/skills/openai/aspnet-core/agents/openai.yaml -o ~/.agents/skills/aspnet-core/assets/dotnet-logo.png https://anymodel.org/en/skills/openai/aspnet-core/assets/dotnet-logo.png -o ~/.agents/skills/aspnet-core/references/_sections.md https://anymodel.org/en/skills/openai/aspnet-core/references/_sections.md -o ~/.agents/skills/aspnet-core/references/apis-minimal-and-controllers.md https://anymodel.org/en/skills/openai/aspnet-core/references/apis-minimal-and-controllers.md -o ~/.agents/skills/aspnet-core/references/data-state-and-services.md https://anymodel.org/en/skills/openai/aspnet-core/references/data-state-and-services.md -o ~/.agents/skills/aspnet-core/references/program-and-pipeline.md https://anymodel.org/en/skills/openai/aspnet-core/references/program-and-pipeline.md -o ~/.agents/skills/aspnet-core/references/realtime-grpc-and-background-work.md https://anymodel.org/en/skills/openai/aspnet-core/references/realtime-grpc-and-background-work.md -o ~/.agents/skills/aspnet-core/references/security-and-identity.md https://anymodel.org/en/skills/openai/aspnet-core/references/security-and-identity.md -o ~/.agents/skills/aspnet-core/references/source-map.md https://anymodel.org/en/skills/openai/aspnet-core/references/source-map.md -o ~/.agents/skills/aspnet-core/references/stack-selection.md https://anymodel.org/en/skills/openai/aspnet-core/references/stack-selection.md -o ~/.agents/skills/aspnet-core/references/testing-performance-and-operations.md https://anymodel.org/en/skills/openai/aspnet-core/references/testing-performance-and-operations.md -o ~/.agents/skills/aspnet-core/references/ui-blazor.md https://anymodel.org/en/skills/openai/aspnet-core/references/ui-blazor.md -o ~/.agents/skills/aspnet-core/references/ui-mvc.md https://anymodel.org/en/skills/openai/aspnet-core/references/ui-mvc.md -o ~/.agents/skills/aspnet-core/references/ui-razor-pages.md https://anymodel.org/en/skills/openai/aspnet-core/references/ui-razor-pages.md -o ~/.agents/skills/aspnet-core/references/versioning-and-upgrades.md https://anymodel.org/en/skills/openai/aspnet-core/references/versioning-and-upgrades.md
foreach ($f in 'SKILL.md','LICENSE.txt','agents/openai.yaml','assets/dotnet-logo.png','references/_sections.md','references/apis-minimal-and-controllers.md','references/data-state-and-services.md','references/program-and-pipeline.md','references/realtime-grpc-and-background-work.md','references/security-and-identity.md','references/source-map.md','references/stack-selection.md','references/testing-performance-and-operations.md','references/ui-blazor.md','references/ui-mvc.md','references/ui-razor-pages.md','references/versioning-and-upgrades.md') { $p = Join-Path "$HOME\.claude\skills\aspnet-core" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/openai/aspnet-core/$f" -UseBasicParsing -OutFile $p }foreach ($f in 'SKILL.md','LICENSE.txt','agents/openai.yaml','assets/dotnet-logo.png','references/_sections.md','references/apis-minimal-and-controllers.md','references/data-state-and-services.md','references/program-and-pipeline.md','references/realtime-grpc-and-background-work.md','references/security-and-identity.md','references/source-map.md','references/stack-selection.md','references/testing-performance-and-operations.md','references/ui-blazor.md','references/ui-mvc.md','references/ui-razor-pages.md','references/versioning-and-upgrades.md') { $p = Join-Path "$HOME\.agents\skills\aspnet-core" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/openai/aspnet-core/$f" -UseBasicParsing -OutFile $p }Другой агент: сохраните файл в его папку скиллов или дайте ему ссылку на файл: https://anymodel.org/en/skills/openai/aspnet-core/SKILL.md
SKILL.md
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
- Confirm the target framework, SDK, and current app model.
- Open references/stack-selection.md first for new apps or major refactors.
- Open references/program-and-pipeline.md next for
Program.cs, DI, configuration, middleware, routing, logging, and static assets. - Open exactly one primary app-model reference:
- Add cross-cutting references only as needed:
- Open references/versioning-and-upgrades.md before introducing new platform APIs into an older solution or when migrating between major versions.
- 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
WebApplicationBuilderandWebApplication. Avoid olderStartupandWebHostpatterns 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 newtemplate 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.
Подключить через AnyModel API
Скилл работает на той модели, которую использует агент. Подключите Claude Code, Codex или Cursor к AnyModel и запускайте его на Claude, GPT, Gemini и других моделях по одному ключу — оплата за токены, без подписки.
AnyModel