一键导入
dotnet-modulith-controller-zh
规范 DotNetModulith 项目的 Controller、ApiResponse、DataAnnotations、错误码与 XML/OpenAPI 实践。用户修改 API、校验、文档、README 时调用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
规范 DotNetModulith 项目的 Controller、ApiResponse、DataAnnotations、错误码与 XML/OpenAPI 实践。用户修改 API、校验、文档、README 时调用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
规范 DotNetModulith 项目的对象映射、DTO 放置与 Mapperly 使用方式。用户修改映射、DTO、Mapper、Contracts 或做结构整理时调用。
Creates standardized .editorconfig files for .NET projects following Microsoft and Roslyn team conventions. Invoke when user needs to create or update .editorconfig for a .NET/C# project.
Provides guidance for implementing OpenTelemetry instrumentation in .NET codebases, covering tracing (Activities/Spans), metrics, naming conventions, error handling, performance, and API design best practices.
Provides guidance for implementing OpenTelemetry instrumentation in .NET codebases, covering tracing (Activities/Spans), metrics, naming conventions, error handling, performance, and API design best practices.
基于 SOC 职业分类
| name | dotnet-modulith-controller-zh |
| description | 规范 DotNetModulith 项目的 Controller、ApiResponse、DataAnnotations、错误码与 XML/OpenAPI 实践。用户修改 API、校验、文档、README 时调用。 |
用于在本仓库中实施统一的 API 设计与实现规范,确保代码、文档、测试、约定一致
ApiResponse<T> 或错误码 ApiCodes[ApiController]ApiResponse<T> 或 Task<ApiResponse<T>>ActionResult / IResult 作为常规返回HTTP 200ApiResponse.code 区分业务结果ApiCodes 分层常量(Common/Order/Inventory/Payment)InvalidModelStateResponseFactory 转换为统一响应。 和 .)record 允许主构造函数class/struct 禁止主构造函数(用显式构造函数 + 字段注入)DbSet<T>、IEntityTypeConfiguration<T>)必须使用 *Entity 后缀*Entity 后缀,避免与持久化模型混淆src/DotNetModulith.Api/Program.cssrc/DotNetModulith.Abstractions/Results/ApiResponse.cssrc/DotNetModulith.Abstractions/Results/ApiCodes.csdocs/development-standards.mdREADME.mdBusinessException 是否携带正确业务码dotnet formatdotnet builddotnet test tests/DotNetModulith.IntegrationTestsdotnet test tests/DotNetModulith.Modules.Orders.TestsREADME.mddocs/development-standards.mddocs/api-error-codes.md