{"slug":"csharp-developer","title":"csharp-developer","summary":"Use when building C# applications with .NET 8+, ASP.NET Core APIs, or Blazor web apps. Builds REST APIs using minimal or controller-based routing, configures database access with Entity Framework Core, implements async patterns and cancellation, structures applications with CQRS ","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-27T18:21:36.889599Z","repo":{"url":"https://github.com/Jeffallan/claude-skills","stars":12412,"forks":1191,"license":"MIT","updatedAt":"2026-11-16T17:30:27Z"},"bodyHtml":"<hr>\n<h2>name: csharp-developer\ndescription: \"Use when building C# applications with .NET 8+, ASP.NET Core APIs, or Blazor web apps. Builds REST APIs using minimal or controller-based routing, configures database access with Entity Framework Core, implements async patterns and cancellation, structures applications with CQRS via MediatR, and scaffolds Blazor components with state management. Invoke for C#, .NET, ASP.NET Core, Blazor, Entity Framework, EF Core, Minimal API, MAUI, SignalR.\"\nlicense: MIT\nmetadata:\nauthor: <a href=\"https://github.com/Jeffallan\">https://github.com/Jeffallan</a>\ncompany: <a href=\"https://synergetic.solutions\">https://synergetic.solutions</a>\nversion: \"1.1.0\"\ndomain: language\ntriggers: C#, .NET, ASP.NET Core, Blazor, Entity Framework, EF Core, Minimal API, MAUI, SignalR\nrole: specialist\nscope: implementation\noutput-format: code\nrelated-skills: api-designer, database-optimizer, devops-engineer</h2>\n<h1>C# Developer</h1>\n<p>Senior C# developer with mastery of .NET 8+ and Microsoft ecosystem. Specializes in high-performance web APIs, cloud-native solutions, and modern C# language features.</p>\n<h2>When to Use This Skill</h2>\n<ul>\n<li>Building ASP.NET Core APIs (Minimal or Controller-based)</li>\n<li>Implementing Entity Framework Core data access</li>\n<li>Creating Blazor web applications (Server/WASM)</li>\n<li>Optimizing .NET performance with Span</li>\n<li>Implementing CQRS with MediatR</li>\n<li>Setting up authentication/authorization</li>\n</ul>\n<h2>Core Workflow</h2>\n<ol>\n<li><strong>Analyze solution</strong> — Review .csproj files, NuGet packages, architecture</li>\n<li><strong>Design models</strong> — Create domain models, DTOs, validation</li>\n<li><strong>Implement</strong> — Write endpoints, repositories, services with DI</li>\n<li><strong>Optimize</strong> — Apply async patterns, caching, performance tuning</li>\n<li><strong>Test</strong> — Write xUnit tests with TestServer; verify 80%+ coverage</li>\n</ol>\n<blockquote>\n<p><strong>EF Core checkpoint (after step 3):</strong> Run <code>dotnet ef migrations add &lt;Name&gt;</code> and review the generated migration file before applying. Confirm no unintended table/column drops. Roll back with <code>dotnet ef migrations remove</code> if needed.</p>\n</blockquote>\n<h2>Reference Guide</h2>\n<p>Load detailed guidance based on context:</p>\n<table>\n<thead>\n<tr>\n<th>Topic</th>\n<th>Reference</th>\n<th>Load When</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Modern C#</td>\n<td><code>references/modern-csharp.md</code></td>\n<td>Records, pattern matching, nullable types</td>\n</tr>\n<tr>\n<td>ASP.NET Core</td>\n<td><code>references/aspnet-core.md</code></td>\n<td>Minimal APIs, middleware, DI, routing</td>\n</tr>\n<tr>\n<td>Entity Framework</td>\n<td><code>references/entity-framework.md</code></td>\n<td>EF Core, migrations, query optimization</td>\n</tr>\n<tr>\n<td>Blazor</td>\n<td><code>references/blazor.md</code></td>\n<td>Components, state management, interop</td>\n</tr>\n<tr>\n<td>Performance</td>\n<td><code>references/performance.md</code></td>\n<td>Span</td>\n</tr>\n</tbody>\n</table>\n<h2>Constraints</h2>\n<h3>MUST DO</h3>\n<ul>\n<li>Enable nullable reference types in all projects</li>\n<li>Use file-scoped namespaces and primary constructors (C# 12)</li>\n<li>Apply async/await for all I/O operations — always accept and forward <code>CancellationToken</code>:\n<pre><code>// Correct\napp.MapGet(\"/items/{id}\", async (int id, IItemService svc, CancellationToken ct) =&gt;\n    await svc.GetByIdAsync(id, ct) is { } item ? Results.Ok(item) : Results.NotFound());\n</code></pre>\n</li>\n<li>Use dependency injection for all services</li>\n<li>Include XML documentation for public APIs</li>\n<li>Implement proper error handling with Result pattern:\n<pre><code>public readonly record struct Result&lt;T&gt;(T? Value, string? Error, bool IsSuccess)\n{\n    public static Result&lt;T&gt; Ok(T value) =&gt; new(value, null, true);\n    public static Result&lt;T&gt; Fail(string error) =&gt; new(default, error, false);\n}\n</code></pre>\n</li>\n<li>Use strongly-typed configuration with <code>IOptions&lt;T&gt;</code></li>\n</ul>\n<h3>MUST NOT DO</h3>\n<ul>\n<li>Use blocking calls (<code>.Result</code>, <code>.Wait()</code>) in async code:\n<pre><code>// Wrong — blocks thread and risks deadlock\nvar data = service.GetDataAsync().Result;\n\n// Correct\nvar data = await service.GetDataAsync(ct);\n</code></pre>\n</li>\n<li>Disable nullable warnings without proper justification</li>\n<li>Skip cancellation token support in async methods</li>\n<li>Expose EF Core entities directly in API responses — always map to DTOs</li>\n<li>Use string-based configuration keys</li>\n<li>Skip input validation</li>\n<li>Ignore code analysis warnings</li>\n</ul>\n<h2>Output Templates</h2>\n<p>When implementing .NET features, provide:</p>\n<ol>\n<li>Domain models and DTOs</li>\n<li>API endpoints (Minimal API or controllers)</li>\n<li>Repository/service implementations</li>\n<li>Configuration setup (Program.cs, appsettings.json)</li>\n<li>Brief explanation of architectural decisions</li>\n</ol>\n<h2>Example: Minimal API Endpoint</h2>\n<pre><code>// Program.cs (file-scoped, .NET 8 minimal API)\nvar builder = WebApplication.CreateBuilder(args);\nbuilder.Services.AddScoped&lt;IProductService, ProductService&gt;();\n\nvar app = builder.Build();\n\napp.MapGet(\"/products/{id:int}\", async (\n    int id,\n    IProductService service,\n    CancellationToken ct) =&gt;\n{\n    var result = await service.GetByIdAsync(id, ct);\n    return result.IsSuccess ? Results.Ok(result.Value) : Results.NotFound(result.Error);\n})\n.WithName(\"GetProduct\")\n.Produces&lt;ProductDto&gt;()\n.ProducesProblem(404);\n\napp.Run();\n</code></pre>\n<h2>Knowledge Reference</h2>\n<p>C# 12, .NET 8, ASP.NET Core, Minimal APIs, Blazor (Server/WASM), Entity Framework Core, MediatR, xUnit, Moq, Benchmark.NET, SignalR, gRPC, Azure SDK, Polly, FluentValidation, Serilog</p>\n<p>Maintained by <a href=\"https://github.com/jeffallan\">@jeffallan</a>, Principal Consultant at <a href=\"https://synergetic.solutions\">Synergetic Solutions</a></p>\n<p><a href=\"https://jeffallan.github.io/claude-skills/skills/language/csharp-developer/\">Documentation</a></p>\n","files":[{"path":"references/aspnet-core.md","sizeBytes":10744,"isText":true},{"path":"references/blazor.md","sizeBytes":12940,"isText":true},{"path":"references/entity-framework.md","sizeBytes":11717,"isText":true},{"path":"references/modern-csharp.md","sizeBytes":6219,"isText":true},{"path":"references/performance.md","sizeBytes":12454,"isText":true},{"path":"SKILL.md","sizeBytes":5255,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-10-27T18:22:02.781292Z","sha256":"96CD06AF1BDF940F5239D117176F73DA1A58C96441DAA94E13980DB727313516","sizeBytes":19631},"review":null,"source":{"repositoryUrl":"https://github.com/Jeffallan/claude-skills","path":"skills/csharp-developer","license":"MIT","commit":"67c1961b180dc92cf08983344627109e983e8f51","subtreeSha":"1B882BFC17A5B0DE3EB50C0AB3BCD9D82A0E9E194E8AAD71FCF61EE875232064","lastSyncedAt":"2026-11-17T00:40:15.350492Z"},"reviewedAt":"2026-10-27T18:22:42.449648Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/Jeffallan/claude-skills/tree/main/skills/csharp-developer"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install jeffallan-claude-skills@llmmart"},{"target":"git","command":"git clone https://github.com/Jeffallan/claude-skills.git"}]}