Best-of
    csharp
    dotnet
    aspnet

    Best AI Agent Skills for C# and .NET Developers (2026)

    C# and .NET carry framework decisions generic AI skills get wrong. These SKILL.md skills encode ASP.NET Core patterns, test conventions, and EF Core discipline.

    August 11, 20266 min read
    Share:

    C# and .NET carry framework decisions generic AI skills get wrong. These SKILL.md skills encode ASP.NET Core patterns, test conventions, and EF Core discipline.

    Quick Answer: The best skills for C# and .NET developers cover xUnit and NUnit test generation, ASP.NET Core minimal APIs versus controllers, Entity Framework Core query patterns, nullable reference type enforcement, and async/await discipline. All use the SKILL.md format and work across Claude Code, OpenClaw, Codex CLI, Cursor, and other compatible agents. Browse them at agensi.io/skills.

    Why generic skills fall short for .NET

    .NET has moved fast, and an agent's training data spans every version of it at once.

    Whether you're on .NET Framework or modern .NET changes almost everything. Whether the API layer uses minimal APIs or MVC controllers. Whether nullable reference types are enabled, which changes what compiles. Whether the test project uses xUnit, NUnit, or MSTest, and whether it uses FluentAssertions. Whether data access is Entity Framework Core, Dapper, or raw ADO.NET.

    Without those stated, an agent produces code that is idiomatic for some .NET project, just not yours.

    Testing skills

    The three major .NET test frameworks have genuinely different idioms, and mixing them is immediately visible.

    xUnit uses [Fact] and [Theory], has no [SetUp], and uses constructors and IDisposable for setup and teardown. NUnit uses [Test] and [SetUp]. MSTest uses [TestMethod] and [TestInitialize]. An agent that generates NUnit attributes into an xUnit project produces a file that doesn't compile.

    A .NET testing skill should detect the framework from the .csproj package references, match the assertion style (Assert.Equal versus FluentAssertions' result.Should().Be()), and know whether the project mocks with Moq or NSubstitute.

    Browse testing and QA skills on Agensi.

    Code review for C#

    code-reviewer (764 uses, free) is the most used skill on Agensi and handles C# well for general bugs, security issues, and error handling.

    The C#-specific criteria worth adding in a custom skill:

    Async discipline. No async void outside event handlers. No .Result or .Wait() on a Task, which deadlocks in some contexts. ConfigureAwait(false) in library code. CancellationToken threaded through async call chains.

    Disposal. using declarations for anything IDisposable, and whether HttpClient is being newed up per call rather than injected via IHttpClientFactory.

    Nullable reference types. If the project has <Nullable>enable</Nullable>, the agent needs to respect it rather than sprinkling ! to silence warnings.

    LINQ efficiency. Multiple enumeration of an IEnumerable, and ToList() calls that materialise a query too early.

    ASP.NET Core conventions

    Minimal APIs and controllers are both current and idiomatic, and an agent will pick whichever it saw more of unless told.

    A skill should state which the project uses, how dependency injection is registered (AddScoped, AddSingleton, AddTransient and when each applies), how validation is handled (FluentValidation, data annotations, or manual), and the error response shape — ProblemDetails or a custom envelope.

    Authentication and authorisation conventions are worth encoding too. Whether endpoints default to [Authorize] with explicit [AllowAnonymous], or the reverse, is a security decision the agent should not be guessing.

    Entity Framework Core

    EF Core is where generated code most often works in development and falls over in production.

    The patterns worth stating: whether tracking or AsNoTracking() is the default for reads, how eager loading is handled with Include versus projection to a DTO, whether migrations are code-first and who is allowed to generate them, and the N+1 query problem that a lazy-loaded navigation property in a loop creates.

    A skill that says "always project to a DTO, never return entities from a controller, use AsNoTracking for reads" prevents an entire class of performance bug.

    Browse database engineering skills on Agensi.

    Build and environment

    env-doctor (86 uses, free) diagnoses why a project won't start — runtime versions, missing dependencies, environment variables, ports. SDK version mismatches against global.json are a common .NET cause.

    git-commit-writer (232 uses, free) writes conventional commit messages from staged changes, and is language-agnostic.

    Installing these skills

    ~/.claude/skills/
    ├── code-reviewer/
    │   └── SKILL.md
    ├── env-doctor/
    │   └── SKILL.md
    

    Claude Code reads from ~/.claude/skills/, OpenClaw from ~/.openclaw/skills/, Codex CLI from ~/.codex/skills/. Skills load at session start, so restart after adding one.

    Full walkthrough: How to Install Skills in Claude Code.

    Browse .NET-compatible skills for any AI coding agent on Agensi.

    Frequently Asked Questions

    The highest-value categories are xUnit or NUnit test generation matched to your framework, ASP.NET Core convention enforcement, Entity Framework Core query patterns, and C#-specific review covering async discipline and disposal. code-reviewer and env-doctor are both free on Agensi.

    Because .NET has moved fast and training data spans every version at once. Whether you are on .NET Framework or modern .NET, minimal APIs or controllers, and whether nullable reference types are enabled all change what correct code looks like.

    Async discipline including no async void and no .Result or .Wait() on a Task, proper disposal with using declarations and IHttpClientFactory rather than newing up HttpClient, nullable reference type respect rather than silencing warnings with the null-forgiving operator, and LINQ multiple enumeration.

    EF Core code often works in development and fails under load. A skill can require AsNoTracking for reads, projection to DTOs rather than returning entities, and eager loading with Include to prevent N+1 queries from lazy-loaded navigation properties in loops.

    One skill can handle all three if it detects the framework from the csproj package references. The attributes differ completely — Fact and Theory in xUnit, Test and SetUp in NUnit, TestMethod in MSTest — so generating the wrong ones produces code that does not compile.

    Claude Code reads from ~/.claude/skills/, OpenClaw from ~/.openclaw/skills/, Codex CLI from ~/.codex/skills/. Each skill goes in its own folder containing SKILL.md. Restart your session after adding one.