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。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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
- Leverage modern C# features for clean, expressive code
- Follow SOLID principles and favor composition over inheritance
- Use nullable reference types and comprehensive error handling
- Optimize for performance with span, memory, and value types
- Implement proper async patterns without blocking
- 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.
热度
- GitHub 星标
- 33k
- 排名
- #8747
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
owasp-security
33k教你的智能体掌握面向网页应用、API、移动端、容器和 AI 智能体的 OWASP 安全指南,以便发现常见弱点并提出修复建议。
agent-management
33k让你的智能体使用 AI Maestro 命令行工具创建、列出、休眠、唤醒、重命名和删除 AI 智能体,管理每个智能体的生命周期。
agent-messaging
33k让你的智能体使用智能体消息协议,在 AI 智能体之间发送、接收和回复带签名的消息,大部分在你自己的电脑上完成。
docs-search
33k让你的智能体搜索自动生成的代码文档,查找函数签名、类定义和注释,从而在修改代码之前核对真实的 API。