openai/skills

aspnet-core

按现有.NET项目模型实现功能与检查请求管线

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

aspnet-core 是什么?

面向 ASP.NET Core 应用的开发、架构选择、评审与升级,按 Blazor、Razor Pages、MVC、Minimal API 或控制器 API 选择对应资料,再处理宿主、依赖注入、中间件、身份认证和测试。它强调沿用现有项目模型,避免为了套新写法重写整套应用。

中文说明由本站依据来源整理;英文原文保留在页面下方。

适合用在

  • 正在维护 Blazor、Razor Pages、MVC、Minimal API 或控制器 API 项目,需要按当前 ASP.NET Core 应用模型实现功能、调整请求管线或升级框架。

这些情况不适合

  • 与 ASP.NET Core Web 应用无关的通用 .NET 桌面界面任务;此来源的参考体系针对 ASP.NET Core。
按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 aspnet-core,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 aspnet-core

请在 Codex 的当前工作环境中安装并检查 aspnet-core 这个 Skill。

项目身份:openai/skills / aspnet-core
来源:https://github.com/openai/skills/blob/49f948faa9258a0c61caceaf225e179651397431/skills/.curated/aspnet-core/SKILL.md
已定位的源文件:skills/.curated/aspnet-core/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 提供 .csproj、目标框架、SDK、Program.cs 和要改的功能;新建项目需明确 UI 或 API 需求。

会得到什么

  • 符合项目框架和模型的实现、配置或评审意见,以及构建和相关检查结果。

实际使用顺序

  1. 确认真实 target framework、SDK 和应用模型;新项目或大重构先读 stack-selection,再读 program-and-pipeline。
  2. 选择一份主要应用模型参考,按需要补数据、安全、后台工作或测试资料;升级与旧版本引入新API前先读版本迁移说明。
  3. 沿用解决方案约定实现局部功能,核对路由、DI和中间件顺序;用现有构建和相关测试验证,并交代未覆盖部分。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

教学示例:用 aspnet-core 审查我提供的 .NET Web API 项目,只检查 Program.cs 中认证、授权和路由的配置及顺序。先读取 csproj 与已有认证方案,再给出带文件位置的发现和最小改动建议。这次不改文件,不升级框架,不把控制器重写为Minimal API。
预期结果

预期得到针对实际请求管线的审查,而非通用框架重写方案;本站未执行。

使用前先看这些限制

使用条件与边界

  • 绑定源文件中“.NET 10优先、11预览”的说明有其2026年3月时间背景,不应当作当前版本状态;需要最新功能时必须再查 Microsoft Learn。
针对这个 Skill 的疑问

常见问题

可以自动把所有项目升级到最新版吗?

不能根据Skill默认值升级。先确认项目锁定版本、依赖和破坏性变更,再制定实际迁移与验证范围。

现有MVC必须改成Minimal API吗?

来源明确要求尊重现有应用模型;只有需求或架构理由足够时才考虑改型,不能只因为新模板支持另一种模式。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

skills/.curated/aspnet-core/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 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.

查看源文件章节 / Source sections
  • 原文:ASP.NET Core
  • 原文:Overview
  • 工作流程 / Workflow
  • 原文:Default Operating Assumptions
  • 原文:Reference Guide
  • 原文:Execution Notes
原文: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.

文件 SHA256:1f487ef3565e5ac1ee6c93cbeb9ac666292b30285877c82ddb0a77c9777fe92f

仓库许可证记录:未提供;not-established,查看来源。

SKILL.md原文description · 2026-11-16T12:36:35.145Z

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.

查看历史简介来源

历史收录数据

来源仓库openai/skills
Skill源路径skills/.curated/aspnet-core/SKILL.md

安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源