Skills Plugins MCP Prompt Model 博客 我的中心

dotnet-best-practices

Ensure .NET/C# code meets best practices for the solution/project.

DeepseekModel 官方收录技能 质量 优秀 · 90 v1.0.0

获取

https://deepseekmodel.com/api/download.php?id=github-awesome-copilot-skills-dotnet-best-practices-skill-md&format=skill
下载 .skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name dotnet-best-practices description Ensure .NET/C# code meets best practices for the solution/project. .NET/C# Best Practices Your task is to ensure .NET/C# code in ${selection} meets the best practices specific to this solution/project. This includes: Documentation & Structure Create comprehensive XML documentation comments for all public classes, interfaces, methods, and properties Include parameter descriptions and return value descriptions in XML comments Follow the established namespace structure: {Core|Console|App|Service}.{Feature} Design Patterns & Architecture Use primary constructor syntax for dependency injection (e.g., public class MyClass(IDependency dependency) ) Implement the Command Handler pattern with generic base classes (e.g., CommandHandler<TOptions> ) Use interface segregation with clear naming conventions (prefix interfaces with 'I') Follow the Factory pattern for complex object creation. Dependency Injection & Services Use constructor dependency injection with null checks via ArgumentNullException Register services with appropriate lifetimes (Singleton, Scoped, Transient) Use Microsoft.Extensions.DependencyInjection patterns Implement service interfaces for testability Resource Management & Localization Use ResourceManager for localized messages and error strings Separate LogMessages and ErrorMessages resource files Access resources via _resourceManager.GetString("MessageKey") Async/Await Patterns Use async/await for all I/O operations and long-running tasks Return Task or Task from async methods Use ConfigureAwait(false) where appropriate Handle async exceptions properly Testing Standards Use MSTest framework with FluentAssertions for assertions Follow AAA pattern (Arrange, Act, Assert) Use Moq for mocking dependencies Test both success and failure scenarios Include null parameter validation tests Configuration & Settings Use strongly-typed configuration classes with data annotations Implement validation attributes (Required, NotEmptyOrWhitespace) Use IConfiguration binding for settings Support appsettings.json configuration files Semantic Kernel & AI Integration Use Microsoft.SemanticKernel for AI operations Implement proper kernel configuration and service registration Handle AI model settings (ChatCompletion, Embedding, etc.) Use structured output patterns for reliable AI responses Error Handling & Logging Use structured logging with Microsoft.Extensions.Logging Include scoped logging with meaningful context Throw specific exceptions with descriptive messages Use try-catch blocks for expected failure scenarios Performance & Security Use C# 12+ features and .NET 8 optimizations where applicable Implement proper input validation and sanitization Use parameterized queries for database operations Follow secure coding practices for AI/ML operations Code Quality Ensure SOLID principles compliance Avoid code duplication through base classes and utilities Use meaningful names that reflect domain concepts Keep methods focused and cohesive Implement proper disposal patterns for resources
Agent 识别该技能的关键词,点击任意一个即可复制。

该技能未提供触发词。

下载的 .skill 包内含以下字段。
字段 说明
format格式标识(skill/v1)
skill_id技能唯一 ID
name技能名称
version版本号
description技能描述
category所属分类(数组)
trigger_words触发词列表
tags标签列表
source来源标识
source_url来源链接(本页地址)
exported_at导出时间(每次下载生成)
system_prompt系统提示词正文
model_config模型参数:provider / model / temperature / max_tokens / top_p
examples示例
install_guide各平台导入说明(Coze / Dify / Claude / 自定义框架)
同一份技能可按不同平台格式导出。
.skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用 下载
.skillpro 增强格式,额外含脚本 / 工具 / 依赖 / 钩子占位 下载
.json 纯 JSON 导出,只含 system_prompt 与模型参数 下载
Coze 带 frontmatter 的 Markdown,Coze 平台导入用 下载
Dify Dify DSL,创建应用后直接导入 下载

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

验证码 --

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。