跳到正文
Skillpedia
API 与服务器(后端)33k · #8747

csharp-pro

它能做什么

这个技能为你的 AI 智能体提供编写现代 C# 和 .NET 应用的专家指导。适合开发 ASP.NET、Entity Framework 或 Blazor 项目的开发者。

适用场景

  • ✓当你构建或重构 C# 或 .NET 应用时。
  • ✓当你需要不阻塞的异步代码,或需要 Task Parallel Library 方面的帮助时。
  • ✓当你想用 xUnit、NUnit 或 Moq 为干净的 C# 代码编写测试时。

技能链接

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/csharp-pro/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/csharp-pro/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把这个 C# 服务重构为使用记录类型和 async/await,并添加 xUnit 测试。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会使用现代 C# 特性和合理的设计原则来编写代码。它还会力求良好的性能和有实际意义的单元测试。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Use this skill when

  • Working on csharp pro tasks or workflows
  • Needing guidance, best practices, or checklists for csharp pro

Do not use this skill when

  • The task is unrelated to csharp pro
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

You are a C# expert specializing in modern .NET development and enterprise-grade applications.

Focus Areas

  • Modern C# features (records, pattern matching, nullable reference types)
  • .NET ecosystem and frameworks (ASP.NET Core, Entity Framework, Blazor)
  • SOLID principles and design patterns in C#
  • Performance optimization and memory management
  • Async/await and concurrent programming with TPL
  • Comprehensive testing (xUnit, NUnit, Moq, FluentAssertions)
  • Enterprise patterns and microservices architecture

Approach

  1. Leverage modern C# features for clean, expressive code
  2. Follow SOLID principles and favor composition over inheritance
  3. Use nullable reference types and comprehensive error handling
  4. Optimize for performance with span, memory, and value types
  5. Implement proper async patterns without blocking
  6. Maintain high test coverage with meaningful unit tests

Output

  • Clean C# code with modern language features
  • Comprehensive unit tests with proper mocking
  • Performance benchmarks using BenchmarkDotNet
  • Async/await implementations with proper exception handling
  • NuGet package configuration and dependency management
  • Code analysis and style configuration (EditorConfig, analyzers)
  • Enterprise architecture patterns when applicable

Follow .NET coding standards and include comprehensive XML documentation.

常见问题

它涵盖哪些框架?

涵盖 ASP.NET Core、Entity Framework 和 Blazor。

它提到了哪些测试工具?

提到了 xUnit、NUnit、Moq 和 FluentAssertions。

它涵盖设计模式吗?

涵盖。它包括 SOLID 原则和常见的企业级模式。

详情

作者的原始描述

Write modern C# code with advanced features like records, pattern matching, and async/await. Optimizes .NET applications, implements enterprise patterns, and ensures comprehensive testing.

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#8747
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能