From backend-csharp
Use when writing or reviewing C# code — enforces idiomatic C# patterns including naming conventions, async/await, nullable reference types, LINQ, pattern matching, error handling, and dependency injection
How this skill is triggered — by the user, by Claude, or both
Slash command
/backend-csharp:csharp-codingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
| Element | Convention | Example |
| Element | Convention | Example |
|---|---|---|
| Namespace | PascalCase, match folder | YourOrg.Payments.Domain |
| Class/Record | PascalCase | OrderService, PaymentRequest |
| Interface | IPascalCase | IOrderRepository |
| Method | PascalCase | GetOrderByIdAsync |
| Property | PascalCase | TotalAmount |
| Parameter/Local | camelCase | orderId, paymentResult |
| Private field | _camelCase | _orderRepository |
| Constant | PascalCase | MaxRetryCount |
| Async method | Suffix with Async | ProcessPaymentAsync |
async/await for I/O-bound operations — never .Result or .Wait()Task<T> or ValueTask<T> from async methodsConfigureAwait(false) in library code, omit in application codeValueTask<T> for hot paths that often complete synchronouslyCancellationToken parameters on all async public APIs// Good
public async Task<Order> GetOrderAsync(int id, CancellationToken ct = default)
{
return await _repository.FindByIdAsync(id, ct);
}
// Bad — blocks thread
public Order GetOrder(int id)
{
return _repository.FindByIdAsync(id).Result;
}
<Nullable>enable</Nullable> in all projects? for nullable references: string? nameorder?.Customer?.Namename ?? "Unknown"! unless absolutely necessary (document why)is patterns for type checks: if (result is SuccessResult success)switch expressions for multi-branch logicas + null checkvar message = result switch
{
SuccessResult s => $"Order {s.OrderId} created",
ValidationError e => $"Validation failed: {e.Message}",
NotFoundError => "Order not found",
_ => "Unknown error"
};
for loops.ToList(), .ToArray()Result<T> pattern in application layer — never throw for expected failurescatch (Exception)ExceptionFilter middleware for unhandled exceptions in ASP.NET Core_logger.LogError(ex, "Failed to process order {OrderId}", orderId)Program.cs or dedicated ServiceCollectionExtensionsServiceLocator patternIOptions<T> for configurationrecord for DTOs, value objects, and request/response typesinit properties for immutable objectsIReadOnlyList<T>) in public APIsGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
npx claudepluginhub gagandeepp/software-agent-teams --plugin backend-csharp