AGENT SKILL
csharp
C# programming language best practices and patterns
- License 许可
- MIT
- 所属仓库
- NeuralBlitz/Mito
- 最近更新
- 2026-11-12
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- csharp
- license
- MIT
- metadata
- { "audience": "developers", "category": "programming" }
- description
- C# programming language best practices and patterns
- compatibility
- opencode
03 SKILL.md 正文
What I do
- Write idiomatic C# code
- Use .NET features effectively
- Implement async/await patterns
- Use LINQ for queries
- Apply SOLID principles
- Handle exceptions properly
- Use dependency injection
- Write unit tests
When to use me
When writing C# or .NET code.
C# Best Practices
// Async/await patterns
public async Task<UserDto> GetUserAsync(int id)
{
return await _repository.GetByIdAsync(id)
.ConfigureAwait(false);
}
// LINQ queries
var activeUsers = await _context.Users
.Where(u => u.IsActive)
.OrderBy(u => u.CreatedAt)
.Skip(page * pageSize)
.Take(pageSize)
.ToListAsync();
// Dependency injection
services.AddScoped<IUserService, UserService>();
services.AddSingleton<IConfiguration>(Configuration);
// Records for DTOs
public record UserDto(
int Id,
string Email,
string Name,
DateTime CreatedAt);
// Pattern matching
public decimal CalculateDiscount(Order order) => order switch
{
{ IsPremium: true } => 0.2m,
{ Items.Count: > 10 } => 0.1m,
{ Total: > 100 } => 0.05m,
_ => 0m
};
04 同仓库更多 Skills
wireless-communications
Wireless systems, mobile networks, and 5G/6G
★ 0
websockets
WebSocket implementation and best practices
★ 0
vulnerability-auditing
Vulnerability assessment and auditing
★ 0
vulnerability-assessment
Finding and assessing security vulnerabilities
★ 0
vlsi-design
Very-Large-Scale Integration circuit design and semiconductor engineering
★ 0
unsupervised
Unsupervised learning concepts
★ 0