Skip to main content

AI skills for C# / .NET

AI Coding Skills for C# / .NET

Browse the best AI coding skills for C# / .NET in 2026, ASP.NET Core 9 minimal APIs, EF Core schemas, xUnit + Moq tests, and Aspire orchestration. Works with every major AI coding tool.

Short answer

The best AI coding skills for C# are skills-hub's `code-review`, `unit-test` (xUnit + Moq + FluentAssertions), `api-scaffold` (ASP.NET Core 9 minimal APIs / controllers), `db-schema` (EF Core), `secure`, and `dependency-scan` (dotnet list package --vulnerable). All portable across Claude Code, Cursor, Codex CLI, Copilot, and Cline.

C# in 2026 means .NET 9, ASP.NET Core minimal APIs, EF Core with compiled queries, and Aspire for distributed-app orchestration. The skills below detect your .NET stack and emit idiomatic code with proper records, primary constructors, pattern matching switch expressions, file-scoped namespaces, and nullable reference types enabled.

Top skills for C# / .NET

  1. 01csharp-scripts

    1 installs

    Run file-based C# apps with the .NET CLI when the user explicitly wants C#/.NET code without creating a project. Use for C# language/API experiments, one-file C# apps, small multi-file C# apps composed with `#:include`/`#:exclude`, or C# file-based apps linked with `#:ref`. Do not use for language-agnostic throwaway scripts, generic computations, Python/PowerShell-style automation, full projects, or existing app integration.

    Buildfrom .NET
  2. 02mcp-csharp-debug

    Run and debug C# MCP servers locally. Covers IDE configuration, MCP Inspector testing, GitHub Copilot Agent Mode integration, logging setup, and troubleshooting. USE FOR: running MCP servers locally with dotnet run, configuring VS Code or Visual Studio for MCP debugging, testing tools with MCP Inspector, testing with GitHub Copilot Agent Mode, diagnosing tool registration issues, setting up mcp.json configuration, debugging MCP protocol messages, configuring logging for stdio and HTTP servers. DO NOT USE FOR: creating new MCP servers (use mcp-csharp-create), writing automated tests (use mcp-csharp-test), publishing or deploying to production (use mcp-csharp-publish).

    Buildfrom .NET
  3. 03migrate-dotnet9-to-dotnet10

    Migrate a .NET 9 project or solution to .NET 10 and resolve all breaking changes. USE FOR: upgrading TargetFramework from net9.0 to net10.0, fixing build errors after updating the .NET 10 SDK, resolving source and behavioral changes in .NET 10 / C# 14 / ASP.NET Core 10 / EF Core 10, updating Dockerfiles for Debian-to-Ubuntu base images, resolving obsoletion warnings (SYSLIB0058-SYSLIB0062), adapting to SDK/NuGet changes (NU1510, PrunePackageReference), migrating System.Linq.Async to built-in AsyncEnumerable, fixing OpenApi v2 API changes, cryptography renames, and C# 14 compiler changes (field keyword, extension keyword, span overloads). DO NOT USE FOR: .NET Framework migrations, upgrading from .NET 8 or earlier (use migrate-dotnet8-to-dotnet9 first), greenfield .NET 10 projects, or cosmetic modernization. LOADS REFERENCES: csharp-compiler, core-libraries, sdk-msbuild (always); aspnet-core, efcore, cryptography, extensions-hosting, serialization-networking, winforms-wpf, containers-int

    Buildfrom .NET
  4. 04mcp-csharp-test

    Test C# MCP servers at multiple levels: unit tests for individual tools and integration tests using the MCP client SDK. USE FOR: unit testing MCP tool methods, integration testing with in-memory MCP client/server, end-to-end testing via MCP protocol, testing HTTP MCP servers with WebApplicationFactory, mocking dependencies in tool tests, creating evaluations for MCP servers, writing eval questions, measuring tool quality. DO NOT USE FOR: testing MCP clients (this is server testing only), load or performance testing, testing non-.NET MCP servers.

    Buildfrom .NET
  5. 05mcp-csharp-publish

    Publish and deploy C# MCP servers. Covers NuGet packaging for stdio servers, Docker containerization for HTTP servers, Azure Container Apps and App Service deployment, and publishing to the official MCP Registry. USE FOR: packaging stdio MCP servers as NuGet tools, creating Dockerfiles for HTTP MCP servers, deploying to Azure Container Apps or App Service, publishing to the MCP Registry at registry.modelcontextprotocol.io, configuring server.json for MCP package metadata, setting up CI/CD for MCP server publishing. DO NOT USE FOR: publishing general NuGet libraries (not MCP-specific), general Docker guidance unrelated to MCP, creating new servers (use mcp-csharp-create), writing tests (use mcp-csharp-test).

    Buildfrom .NET
  6. 06mcp-csharp-create

    Create MCP servers using the C# SDK and .NET project templates. Covers scaffolding, tool/prompt/resource implementation, and transport configuration for stdio and HTTP. USE FOR: creating new MCP server projects, scaffolding with dotnet new mcpserver, adding MCP tools/prompts/resources, choosing stdio vs HTTP transport, configuring MCP hosting in Program.cs, setting up ASP.NET Core MCP endpoints with MapMcp. DO NOT USE FOR: writing tests (use mcp-csharp-test), publishing or deploying (use mcp-csharp-publish), building MCP clients, non-.NET MCP servers.

    Buildfrom .NET

Frequently asked questions

Do AI skills use minimal APIs or controllers?

Modern skills check the project shape, Program.cs with builder.Services and app.MapXxx routes signals minimal API style; ControllerBase subclasses signal controller style. The code-review skill respects the existing convention.

Can AI generate EF Core migrations?

Yes, the db-schema skill emits DbContext + entity configs, then runs dotnet ef migrations add with proper migration names. It also catches common gotchas like change-tracker churn and N+1 patterns.

What's the best AI tool for C#?

Visual Studio's official AI assist is still the deepest for big .NET solutions. Cursor with C# Dev Kit and Claude Code with the JetBrains Rider plugin are both strong second options.

Do AI skills handle Aspire?

Yes, the api-scaffold skill detects .NET Aspire and emits proper AppHost projects with service references, plus matching ServiceDefaults for OpenTelemetry + health checks.

Other languages and frameworks