Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ngxtm-c-best-practices
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/c-best-practices
What's inside
- Skill name
C# Best Practices- Description
- Idiomatic C# patterns for clean, maintainable code.
- License
- MIT
- Instructions
- 93 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: only lowercase letters, digits and single hyphens allowed
- name: "C# Best Practices" does not match folder "best-practices"
Files (2)
- SKILL.md
- REFERENCE.md · references/
SKILL.md (first lines)
# C# Best Practices
## **Priority: P1 (OPERATIONAL)**
Idiomatic patterns for clean, maintainable C# code.
## Implementation Guidelines
- **Naming Conventions**:
- `PascalCase`: Types, methods, properties, events, namespaces
- `camelCase`: Parameters, local variables
- `_camelCase`: Private fields
- `IPascalCase`: Interfaces (prefix with `I`)
- `TPascalCase`: Type parameters (prefix with `T`)
- **Project Structure**: Clean/Onion architecture. Feature folders over layer folders.
- **Dependency Injection**: Constructor injection only. Register in `IServiceCollection`.
- **Logging**: `ILogger<T>` with structured logging. Use appropriate log levels.
- **Configuration**: `IOptions<T>` pattern with validation. Never hardcode settings.
- **File Organization**: One type per file. Use `global using` for common namespaces.
- **Immutability**: Prefer `readonly`, `init`, `record` for data integrity.
- **Expression-bodied Members**: Use for simple single-line methods/properties.
## Anti-Patterns
- **No static services**: Use DI instead of `static class ServiceHelper`.
- **No service locator**: Avoid `IServiceProvider.GetService()` in business logic.
- **No `new()` for dependencies**: Inject via constructor.
- **No magic strings**: Use `nameof()`, constants, or configuration.
- **No God classes**: Split large classes by responsibility.
- **No regions**: Use partial classes or extract types instead.
## Code
```csharp
// Proper DI registration
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddApplicationServices(this IServiceCollection services)
{
services.AddScoped<IUserService, UserService>();
services.AddScoped<IOrderService, OrderService>();
services.AddOptions<EmailSettings>()
.BindConfiguration("Email")
.ValidateDataAnnotations()
.ValidateOnStart();
return services;
}
}
// Structured logging with semantic names
public class OrderService(IOrderRepository repo, ILogger<OrderService> logger)
{
public async Task<Order?> GetOrderAsync(int orderId, CancellationToken ct)
{
logger.LogDebug("Fetching order {OrderId}", orderId);
var order = await repo.GetByIdAsync(orderId, ct);
if (order is null)
logger.LogWarning("Order {OrderId} not found", orderId);
return order;
}
}
// Options pattern with validation
public class EmailSettings
{
public const string SectionName = "Email";
[Required]
public string SmtpHost { get; init; } = string.Empty;
[Range(1, 65535)]
public int SmtpPort { get; init; } = 587;
[Required, EmailAddress]
public string FromAddress { get; init; } = string.Empty;
}
```
## Reference & Examples
For project structure templates and DI patterns:
See [references/REFERENCE.md](references/REFERENCE.md).
## Related Topics
language | security | toolingFrom ngxtm/devkit, MIT.
More from ngxtm/devkit
- 0.463score
Flutter Feature-Based Clean Architecture
ngxtm
Standards for organizing code by feature at the root level to improve scalability and maintainability.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter GetX Navigation
ngxtm
Context-less navigation, named routes, and middleware using GetX.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
C# Language Patterns
ngxtm
Modern C# standards for type safety, performance, and maintainability.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Razor Pages
ngxtm
ASP.NET Core Razor Pages patterns for server-rendered web apps.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
.NET Security
ngxtm
Security standards for .NET applications based on OWASP guidelines.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter BLoC State Management
ngxtm
Standards for predictable state management using flutter_bloc, freezed, and equatable.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter CI/CD
ngxtm
Continuous Integration and Deployment standards for Flutter apps.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter Dependency Injection (Injectable)
ngxtm
Standards for automated service locator setup using injectable and get_it.
SkillDFreshness: D★ 8Claude Code +9 - 0.460score
ASP.NET Core Web API
ngxtm
Modern ASP.NET Core patterns for building RESTful APIs.
SkillDFreshness: D★ 8Claude Code +9 - 0.460score
Flutter AutoRoute Navigation
ngxtm
Typed routing, nested routes, and guards using auto_route.
SkillDFreshness: D★ 8Claude Code +9 - 0.460score
Flutter Error Handling
ngxtm
Functional error handling using Dartz and Either.
SkillDFreshness: D★ 8Claude Code +9 - 0.460score
.NET Tooling
ngxtm
Essential tooling for .NET development and CI/CD.
SkillDFreshness: D★ 8Claude Code +9
Signals
- Stars
- 8
- Forks
- 5
- Open issues
- 0
- Last commit (this folder)
- Feb 3, 2026 (8 months ago)
- Last release
- Feb 28, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ngxtm/devkit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ngxtm
- 0.463score
Flutter BLoC State Management
ngxtm
Standards for predictable state management using flutter_bloc, freezed, and equatable.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
C# Language Patterns
ngxtm
Modern C# standards for type safety, performance, and maintainability.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Razor Pages
ngxtm
ASP.NET Core Razor Pages patterns for server-rendered web apps.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
.NET Security
ngxtm
Security standards for .NET applications based on OWASP guidelines.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter GetX Navigation
ngxtm
Context-less navigation, named routes, and middleware using GetX.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter CI/CD
ngxtm
Continuous Integration and Deployment standards for Flutter apps.
SkillDFreshness: D★ 8Claude Code +9
Cite this page
C# Best Practices skill. Agent Mart. https://agentmart.dev/skills/ngxtm-c-best-practices (last updated 2026-10-24)