Curated Category 10 hand-picked skills Updated

Top 10 C# Skills for AI Coding Agents

C# coding agents require deliberate tool selection. A production-ready .NET workflow pairs modern language standards with focused execution: records and readonly record structs, nullability, pattern matching, asynchronous Task management, XML API documentation, unit and integration tests, runtime diagnostics, Native AOT compilation, native P/Invoke bindings, ASP.NET Core web endpoints, and OpenTelemetry instrumentation.

This guide curates ten primary-source skills across five verified repositories. Aaron Stannard's modern-csharp-coding-standards acts as the single universal core standards default for all C# repositories. Every other skill defines an explicit conditional boundary: activate async, testing, documentation, performance, trace collection, Native AOT trimming, unmanaged interop, web API, or observability workflows only when your project architecture demands them.

Editorial illustration of a magenta loop of code brackets threading through an indigo diagnostic waveform and an amber compass on clean off-white.

How this list was picked

  • Primary source verification. Every workflow is inspected directly against its repository SKILL.md file, verifying concrete prompt rules, tool calls, and conventions for AI coding agents.
  • Five verified maintainer sources. The catalog selects ten cards from Aaronontheweb/dotnet-skills, github/awesome-copilot, affaan-m/ecc, dotnet/skills, and openai/skills, combining core language patterns with official Microsoft diagnostic plugins.
  • Single universal core standard. modern-csharp-coding-standards serves as the single core baseline. It provides guidance on records, nullability, composition, performance-oriented APIs, and async/cancellation without imposing framework-specific baggage.
  • Explicit conditional scope. Every remaining card carries a Conditional tier label. Diagnostic, AOT, interop, web, and telemetry skills are selected only when the target framework and operational tasks require them.

Top 10 C# Skills for AI Coding Agents at a glance

A comparative index of the top picks. Click any card to navigate directly to its detailed review.

#01

csharp-async

GitHub avatar for github
GitHub account @github

Guide Task-based Asynchronous Pattern development, ValueTask usage, CancellationToken propagation, and deadlock prevention

github/awesome-copilot
10.3Kinstalls
#02

csharp-docs

GitHub avatar for github
GitHub account @github

Author standard XML documentation comments for public classes, methods, parameters, return values, and exceptions

github/awesome-copilot
9.5Kinstalls
#03

aspnet-core

GitHub avatar for openai
GitHub account @openai

Architect ASP.NET Core web APIs, Minimal APIs, middleware pipelines, and EF Core persistence layers

openai/skills
2.8Kinstalls
#04

csharp-testing

GitHub avatar for affaan-m
GitHub account @affaan-m

Structure xUnit-centered unit and integration tests with FluentAssertions, NSubstitute/Moq, WebApplicationFactory, Testcontainers, and data builders

affaan-m/ecc
2.4Kinstalls
#05

analyzing-dotnet-performance

GitHub avatar for dotnet
GitHub account @dotnet

Scan C#/.NET source for async, allocation, string, LINQ, regex, and I/O performance anti-patterns

dotnet/skills
2.4Kinstalls
#06

configuring-opentelemetry-dotnet

GitHub avatar for dotnet
GitHub account @dotnet

Instrument .NET applications with OpenTelemetry traces, metrics, and OTLP exporters for observability

dotnet/skills
2.0Kinstalls
#07

modern-csharp-coding-standards

GitHub avatar for aaronontheweb
GitHub account @aaronontheweb

Guide records and readonly record structs, nullability, pattern matching, composition, Result handling, Span/Memory, async/cancellation, and high-performance API design

Aaronontheweb/dotnet-skills
1.9Kinstalls
#08

dotnet-trace-collect

GitHub avatar for dotnet
GitHub account @dotnet

Collect CPU sampling and runtime event traces from live .NET processes with the dotnet-trace CLI tool

dotnet/skills
1.8Kinstalls
#09

dotnet-aot-compat

GitHub avatar for dotnet
GitHub account @dotnet

Resolve trimming and AOT warnings, adopt source generators, and verify Native AOT publish readiness

dotnet/skills
1.6Kinstalls
#10

dotnet-pinvoke

GitHub avatar for dotnet
GitHub account @dotnet

Implement native library interop with DllImport for .NET Framework or LibraryImport for modern .NET 7+/Native AOT, plus custom marshaling and SafeHandle

dotnet/skills
1.5Kinstalls

Install counts are hydrated observations from the skills.sh registry. Core and conditional labels explain how each skill should be selected.

Core Language Standards and Quality

Start with modern-csharp-coding-standards for baseline C# design guidance. The remaining cards in this group provide specialized execution for Task-based concurrency, public XML documentation, and automated test suites.

GitHub Open Graph preview for Aaron Stannard's modern C# coding standards skill.

modern-csharp-coding-standards

1.9K installs Aaron Stannard / PetabridgeCore · C# 12+ Standards

Best for: Designing maintainable, null-safe, composable, and high-performance C# APIs

modern-csharp-coding-standards focuses on practical C# design across records and readonly record structs, nullability, pattern matching, and composition. Authored by Aaron Stannard and Petabridge, it also covers Result handling, Span/Memory, asynchronous code with cancellation, and high-performance API design.

This card serves as the single universal core standards default in the C# catalog. Use it broadly when authoring, modifying, or refactoring C# source code, while loading the other cards only for their specific testing, diagnostic, runtime, or framework workflows.

  • Records and readonly record structs for clear data-oriented design
  • Nullability and pattern matching for safer, expressive code
  • Composition and Result handling for explicit application flow
  • Span/Memory, async/cancellation, and high-performance API design
Install this skill
$npx skills add https://github.com/aaronontheweb/dotnet-skills --skill modern-csharp-coding-standards
Aaronontheweb/dotnet-skills source skills.sh listing
Works with + more
GitHub Open Graph preview for GitHub's awesome-copilot C# async programming skill.

csharp-async

10.3K installs GitHub/Aaron PowellConditional · Async / Concurrency Focus

Best for: Asynchronous method authoring, cancellation plumbing, and async concurrency performance

csharp-async provides specialized guidance for the Task-based Asynchronous Pattern in C#. It teaches coding agents how to structure asynchronous methods cleanly, correctly propagate CancellationToken instances through async call stacks, and select ValueTask for high-frequency methods that frequently complete synchronously.

Load this skill conditionally when working on asynchronous workflows, concurrent pipelines, background hosted services, or I/O-bound integrations. It explicitly guards against sync-over-async hazards like .Result and .GetAwaiter().GetResult() that lead to thread pool starvation and application deadlocks.

  • CancellationToken propagation and cooperative cancellation handling
  • ValueTask allocation reduction on synchronous completion paths
  • Deadlock prevention by avoiding sync-over-async blocking calls
  • IAsyncEnumerable streaming for asynchronous data sequences
Install this skill
$npx skills add https://github.com/github/awesome-copilot --skill csharp-async
github/awesome-copilot source skills.sh listing
Works with + more
GitHub Open Graph preview for GitHub's awesome-copilot C# XML documentation skill.

csharp-docs

9.5K installs GitHub/Aaron PowellConditional · XML Documentation

Best for: Documenting public C# APIs, NuGet package libraries, and IntelliSense annotations

csharp-docs directs agents in generating accurate XML documentation comments for C# types and public members. It structures standard documentation tags including summary, param, typeparam, returns, exception, and remarks blocks so that public interfaces are thoroughly documented for consumers.

Select this skill conditionally when building public libraries, preparing NuGet packages, writing shared API contracts, or executing codebase documentation audits. It is not required during internal logic modifications where XML doc authoring is out of scope.

  • Standard XML documentation tags for classes, methods, and properties
  • Explicit exception documentation with cref type references
  • Generic type parameter annotations and remarks examples
  • IntelliSense-friendly formatting and NuGet package doc generation
Install this skill
$npx skills add https://github.com/github/awesome-copilot --skill csharp-docs
github/awesome-copilot source skills.sh listing
Works with + more
GitHub Open Graph preview for Affaan Mustafa's C# automated testing skill.

csharp-testing

2.4K installs Affaan MustafaConditional · Testing / Quality Assurance

Best for: Writing maintainable xUnit unit and integration tests, parameterizing cases, and asserting behavior

csharp-testing is an xUnit-centered workflow for .NET unit and integration tests. It guides clean Arrange-Act-Assert structures, parameterized test cases, and expressive assertion chains with FluentAssertions, alongside test doubles using NSubstitute or Moq.

Activate this skill conditionally when writing tests, validating bug fixes with regression coverage, or building integration environments. It covers WebApplicationFactory, Testcontainers, and data builders while keeping tests isolated, readable, and resilient to refactoring.

  • xUnit-centered unit and integration test structure
  • Parameterized test theories for diverse scenario validation
  • FluentAssertions for readable and expressive test verifications
  • NSubstitute/Moq, WebApplicationFactory, Testcontainers, and data builders
Install this skill
$npx skills add https://github.com/affaan-m/ecc --skill csharp-testing
affaan-m/ecc source skills.sh listing
Works with + more

Performance, Diagnostics, and Low-Level Runtimes

Use these diagnostic and low-level runtime cards conditionally when scanning source for performance anti-patterns, capturing live process traces, migrating to Native AOT trimming, or invoking native unmanaged libraries.

GitHub Open Graph preview for Microsoft .NET diagnostic performance analysis skill.

analyzing-dotnet-performance

2.4K installs Microsoft .NET / dotnet-diagConditional · Hot-Path & .NET 8+ Target Framework Only

Best for: Static source scans for known C#/.NET performance anti-patterns

analyzing-dotnet-performance is a static C#/.NET source scan from the official Microsoft .NET diagnostics repository. It checks for known performance anti-patterns across async code, allocations, strings, LINQ, regex, and I/O operations.

Use this card conditionally during source review and refactoring to find those known patterns. It is not algorithmic complexity analysis or runtime profiling, so use dotnet-trace-collect for investigation of a running process.

  • Static scan for known C#/.NET performance anti-patterns
  • Async and allocation pattern checks
  • String, LINQ, regex, and I/O pattern checks
  • Explicitly separate from algorithmic complexity analysis and runtime profiling
Install this skill
$npx skills add https://github.com/dotnet/skills --skill analyzing-dotnet-performance
dotnet/skills source skills.sh listing
Works with + more
GitHub Open Graph preview for Microsoft .NET dotnet-trace collection skill.

dotnet-trace-collect

1.8K installs Microsoft .NET / dotnet-diagConditional · OS/Runtime Environment & Admin Privileges Dependent

Best for: Diagnosing live production or staging process hangs, CPU spikes, and GC stalls across platforms

dotnet-trace-collect provides command recipes and procedures for collecting diagnostic traces from running .NET applications using the dotnet-trace CLI tool. It guides process discovery, provider configuration (such as EventPipe CPU sampling and GC events), trace duration management, and export into Speedscope or Chromium trace formats.

Select this skill conditionally when investigating active runtime issues, CPU spikes, or deadlocks in environments where diagnostic tools can be executed. Because it requires process-level access, it is a runtime operations workflow rather than a static source code authoring skill.

  • dotnet-trace command synthesis for live process inspection
  • EventPipe provider selection for CPU and runtime event capture
  • Cross-platform trace output generation for Speedscope and PerfView
  • Low-overhead collection suitable for production troubleshooting
Install this skill
$npx skills add https://github.com/dotnet/skills --skill dotnet-trace-collect
dotnet/skills source skills.sh listing
Works with + more
GitHub Open Graph preview for Microsoft .NET Native AOT compatibility skill.

dotnet-aot-compat

1.6K installs Microsoft .NET / dotnet-upgradeConditional · Modern .NET (.NET 8+) & Native AOT/Trimming Only

Best for: Preparing .NET 8+ applications for Native AOT publishing, trimming, and small container images

dotnet-aot-compat assists in adapting .NET applications for Native Ahead-Of-Time (AOT) compilation and IL trimming. It guides agents in identifying and fixing IL2026 and IL3050 warnings, replacing dynamic reflection with compile-time C# source generators, and configuring System.Text.Json source generation.

Load this skill conditionally when targeting Native AOT deployments, building lightweight container images, or optimizing cold-start latency on .NET 8+. It is not required for standard JIT-compiled applications that do not enable trimming.

  • Trimming and Native AOT warning diagnosis and resolution
  • Source generator adoption for JSON serialization and dependency injection
  • Type annotations with DynamicallyAccessedMembers and RequiresUnreferencedCode
  • Publish verification and container binary footprint minimization
Install this skill
$npx skills add https://github.com/dotnet/skills --skill dotnet-aot-compat
dotnet/skills source skills.sh listing
Works with + more
GitHub Open Graph preview for Microsoft .NET P/Invoke native interop skill.

dotnet-pinvoke

1.5K installs Microsoft .NET / dotnet-advancedConditional · Target Architecture & .NET 7+ LibraryImport

Best for: Calling C/C++ native libraries and operating system APIs from .NET Framework or modern .NET 7+/Native AOT

dotnet-pinvoke delivers advanced patterns for platform invocation (P/Invoke) across .NET targets. It distinguishes traditional DllImport for .NET Framework from the compile-time LibraryImport source generator for modern .NET 7+ and Native AOT scenarios, and covers custom marshaling plus safe unmanaged resource encapsulation with SafeHandle.

Use this card conditionally when integrating native C or C++ dynamic libraries, operating system APIs, or custom unmanaged drivers into a .NET solution. Pure managed C# applications do not need this interop workflow.

  • DllImport for .NET Framework and LibraryImport for modern .NET 7+/Native AOT
  • SafeHandle encapsulation for unmanaged resource lifetime safety
  • Custom marshallers for complex native struct and string conversions
  • Architecture-specific calling conventions and platform target handling
Install this skill
$npx skills add https://github.com/dotnet/skills --skill dotnet-pinvoke
dotnet/skills source skills.sh listing
Works with + more

Web Services and Observability

These framework cards guide web application architecture and telemetry. Load them only when building ASP.NET Core endpoints or instrumenting .NET services with OpenTelemetry.

GitHub Open Graph preview for OpenAI's ASP.NET Core web development skill.

aspnet-core

2.8K installs OpenAIConditional · ASP.NET Core Web Tier

Best for: Building REST APIs, backend microservices, and web endpoints in ASP.NET Core

aspnet-core from OpenAI provides structured architecture workflows for building web applications and backend APIs in ASP.NET Core. It guides agents through Minimal API route declarations, controller design, dependency injection service lifetime registration (Transient, Scoped, Singleton), and HTTP middleware pipeline orchestration.

Choose this skill conditionally when implementing web endpoints, REST services, or backend APIs with ASP.NET Core. It provides domain-specific expertise for web servers that goes beyond general language syntax.

  • Minimal APIs and controller-based routing patterns
  • Dependency injection service lifetime management and configuration binding
  • HTTP middleware pipeline construction and exception handling
  • Entity Framework Core integration with LINQ query optimization
Install this skill
$npx skills add https://github.com/openai/skills --skill aspnet-core
openai/skills source skills.sh listing
Works with + more
GitHub Open Graph preview for Microsoft .NET OpenTelemetry configuration skill.

configuring-opentelemetry-dotnet

2.0K installs Microsoft .NET / dotnet-aspnetcoreConditional · OpenTelemetry/.NET Observability

Best for: Exporting distributed traces and runtime metrics to OpenTelemetry collectors and monitoring backends

configuring-opentelemetry-dotnet guides the setup of standardized OpenTelemetry observability within .NET services. It covers ActivitySource tracing, Meter metrics instrumentation, built-in telemetry for ASP.NET Core and HttpClient, and OTLP exporter integration for streaming telemetry to monitoring platforms.

Load this skill conditionally when adding distributed tracing, metrics dashboards, or structured telemetry pipelines to .NET microservices. It focuses specifically on telemetry configuration rather than core business logic.

  • ActivitySource and Meter setup for custom application telemetry
  • Built-in instrumentation for ASP.NET Core, HttpClient, and SQL queries
  • OTLP exporter configuration for OpenTelemetry collector ingestion
  • Resource attribute tagging with service names and environment metadata
Install this skill
$npx skills add https://github.com/dotnet/skills --skill configuring-opentelemetry-dotnet
dotnet/skills source skills.sh listing
Works with + more

Choose the C# skill that matches the job

Select a skill by matching its purpose to your repository target framework and task boundary. Always start with the core coding standards workflow for general code construction, then load conditional cards when specific asynchronous, testing, diagnostic, compilation, or web features are required.

  1. 1.Establish core C# coding standards. Load modern-csharp-coding-standards by default across all C# projects. It instructs agents on records and readonly record structs, nullability, pattern matching, composition, Result handling, Span/Memory, async/cancellation, and high-performance API design for day-to-day feature development and refactoring.
  2. 2.Handle asynchronous tasks and documentation. Activate csharp-async when implementing asynchronous methods, ValueTask allocations, and CancellationToken propagation. Switch to csharp-docs when documenting public API contracts, NuGet packages, or class libraries with standardized XML doc tags.
  3. 3.Verify behavior with automated test suites. Use csharp-testing when authoring xUnit-centered unit or integration tests. It covers structured Arrange-Act-Assert flows, parameterized test cases, FluentAssertions, NSubstitute/Moq, WebApplicationFactory, Testcontainers, and data builders.
  4. 4.Scan performance patterns and collect runtime traces. Load analyzing-dotnet-performance for a static C#/.NET scan of known async, allocation, string, LINQ, regex, and I/O performance anti-patterns; it is not algorithmic complexity analysis or runtime profiling. When investigating live production stalls, invoke dotnet-trace-collect to capture EventPipe traces from running processes.
  5. 5.Build web APIs, Native AOT, and observability. Select aspnet-core for Minimal APIs and middleware pipelines, dotnet-aot-compat when preparing applications for Ahead-Of-Time trimming, dotnet-pinvoke for native C/C++ interop using DllImport on .NET Framework or LibraryImport on modern .NET 7+/Native AOT, and configuring-opentelemetry-dotnet to export metrics and distributed traces via OTLP.

Language standards versus runtime diagnostics

Modern C# provides high-level developer ergonomics alongside low-level memory control. General coding tasks benefit from records and readonly record structs, pattern matching, composition, Result handling, and strict nullability guidance. The standards skill also covers Span/Memory, async/cancellation, and high-performance API design.

Diagnostic and performance workflows address different operational concerns. Static performance scans identify known async, allocation, string, LINQ, regex, and I/O anti-patterns in source; they are not algorithmic complexity analysis or runtime profiling. Keeping core coding standards separated from diagnostic workflows ensures that agents use the right source review or live-trace workflow for the task.

Ahead-of-Time compilation, native interop, and observability

Modern .NET deployments increasingly target containerized cloud environments, serverless functions, and microservice architectures. Native AOT compilation and assembly trimming drastically reduce binary size and startup latency. Achieving clean AOT builds requires replacing runtime reflection with compile-time source generation for JSON serialization and dependency injection.

Similarly, native interop depends on the target framework: use DllImport for .NET Framework, while modern .NET 7+ and Native AOT scenarios can use source-generated LibraryImport to avoid runtime marshaling overhead. Pairing these compiled binaries with standardized OpenTelemetry distributed tracing and metrics gives engineering teams complete runtime visibility into microservices, database calls, and outgoing HTTP requests.

Keep C# skills visible with LazySkills

LazySkills scans installed skills across your machine, shows which coding agents can discover them, validates SKILL.md configurations, and searches the same skills.sh registry used for this catalog. Install the catalog manager to inspect and manage your .NET agent workflows with interactive terminal keybindings.

curl -fsSL https://lazyskills.sh/install | sh
More about LazySkills

Frequently asked questions about C# agent skills

Which C# skill should I install as my default across every .NET project?

Install modern-csharp-coding-standards from Aaron Stannard and Petabridge. It is the single core C# standards default in this catalog, covering records and readonly record structs, nullability, pattern matching, composition, Result handling, Span/Memory, async/cancellation, and high-performance API design. Every other skill in this guide is conditional on a specific runtime, platform, diagnostic, or framework requirement.

How does modern-csharp-coding-standards guide C# design?

Without an explicit coding standards skill, language models can miss important C# design guidance. Loading modern-csharp-coding-standards focuses generated code on records and readonly record structs, nullability, pattern matching, composition, Result handling, Span/Memory, async/cancellation, and high-performance API design.

When should I load csharp-async instead of relying on general coding standards?

Activate csharp-async when implementing asynchronous methods, background workers, concurrent data pipelines, or cancellation flows. The skill guides agents through CancellationToken propagation, ValueTask allocation optimizations on hot paths, and avoiding sync-over-async anti-patterns like .Result or .Wait() that cause thread pool starvation and deadlocks.

How do .NET diagnostic skills differ from code authoring skills?

Code authoring skills instruct agents on design and structure during feature development. analyzing-dotnet-performance performs a static C#/.NET scan for known async, allocation, string, LINQ, regex, and I/O anti-patterns; it is not algorithmic complexity analysis or runtime profiling. dotnet-trace-collect separately guides EventPipe trace collection from running processes using the dotnet-trace CLI tool.

Can these skills help migrate applications to Native AOT and trimming?

Yes. The dotnet-aot-compat skill specifically targets Ahead-Of-Time (AOT) compilation and trimming compatibility on .NET 8+. It helps agents diagnose IL2026 and IL3050 warnings, replace runtime reflection with compile-time C# source generators (such as System.Text.Json source generation), and apply DynamicallyAccessedMembers annotations for safe assembly trimming.

How does LazySkills manage per-agent visibility and project-level C# skills?

LazySkills inspects your workspace and global configuration directories across Claude Code, Codex, Cursor, Gemini CLI, OpenCode, and Copilot. It verifies that skill files adhere to standard SKILL.md specifications, displays agent compatibility matrices, and allows you to install skills directly from skills.sh into project or global scope with interactive keybindings.

Related guides

More curated skill catalogs to keep browsing.

by Alvin