Skip to content

Guide · Agent skill

How to use the .NET Backend Patterns agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The dotnet-backend-patterns skill is a reference guide that teaches an AI agent established C#/.NET backend conventions. Once it is installed, the agent uses these patterns when you ask for help with a .NET API, service, or data access layer. This guide shows you how to install the skill, how to trigger it with ordinary requests, and what to check before you rely on its output.

.NET Backend Patternswshobson/agents · MIT

Quick start

  1. 1Download the skill ZIP. Download the dotnet-backend-patterns ZIP file from this page.
  2. 2Unzip into a skills folder. Unzip the skill into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one codebase.
  3. 3Or upload it in the Claude apps. In the Claude apps, go to Settings, then Capabilities, then Skills, and upload the skill.
  4. 4Check the files. Confirm the skill folder contains SKILL.md and the two files in references/.
  5. 5Ask a .NET question. Describe a C# or .NET task in plain words, naming the technology, such as EF Core, Dapper, DI or xUnit.
  6. 6Review the output. Check the agent's code against your .NET version and project conventions before you use it.

What this skill makes the agent do

Agent skills are folders of instructions that an AI agent loads when a task matches the skill's description. This one covers C#/.NET backend development: async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching with Redis, and testing with xUnit.

The visible content is mostly code examples and do/don't rules rather than executable tools. The agent uses them as guidance when it writes or reviews code, for example by favouring clean architecture folder layout, correct dependency injection lifetimes, and avoiding blocking calls and async void.

  • Project layout based on clean architecture (Domain, Application, Infrastructure, Api)
  • Dependency injection lifetimes: scoped, singleton and transient registrations
  • Async/await rules, including avoiding .Result and GetAwaiter().GetResult() and avoiding async void
  • Configuration with the IOptions, IOptionsSnapshot and IOptionsMonitor patterns
  • Result pattern for handling failures without exceptions for flow control
  • Guidance on EF Core query practices and Dapper patterns, with a reference for each

How do you install the dotnet-backend-patterns skill?

Download the ZIP file for the skill from this page. Unzip it so that the skill folder lands in one of two locations: your personal skills folder at ~/.claude/skills/, or a project-specific .claude/skills/ folder inside the project you are working on. Use the personal folder if you want the skill available everywhere, and the project folder if you want it only for one codebase or to share it with a team through the repository.

If you use the Claude apps instead, you can upload the skill under Settings, then Capabilities, then Skills. Use whichever route matches how you work with the agent.

The skill folder includes SKILL.md, which holds the main instructions, and two reference files: references/dapper-patterns.md and references/ef-core-best-practices.md.

  • Personal install: unzip into ~/.claude/skills/
  • Project install: unzip into the project's .claude/skills/ folder
  • Claude apps: Settings, then Capabilities, then Skills, then upload

How do you trigger the skill with natural requests?

You do not need a special command. The skill's description says it applies when you are developing .NET backends, reviewing C# code, or designing API architectures, so the agent should pick it up when your request matches those tasks. Name the technology in your request so the match is clear.

Ask for a concrete outcome in your own words. The more specific your request, the more useful the patterns will be for your code.

  • Review this C# service for async problems and blocking calls
  • Design a clean architecture folder structure for a new ASP.NET Core Web API
  • Should I use EF Core or Dapper for this read-heavy product catalogue query?
  • Register these services with the right dependency injection lifetimes
  • Set up IOptions configuration for a Redis connection and a catalog section
  • Write xUnit tests for this order service

What does the skill check or suggest in practice?

The skill gives the agent specific rules to apply. For dependency injection, it describes scoped services as one instance per HTTP request, singletons as one instance for the application lifetime, and transients as a new instance every time. For configuration, it shows how to bind a section such as Catalog to an options class and how to choose between reading values once at startup and reading them fresh.

For async code, the skill lists calls to avoid, such as blocking on a task with .Result, and recommends passing a CancellationToken through the call chain. For data access, the EF Core reference recommends AsNoTracking for read-only queries and projecting only the columns you need into a DTO.

  • Registration with services.Configure<CatalogOptions>(configuration.GetSection(CatalogOptions.SectionName));
  • Use IOptionsSnapshot for values that should refresh per request, and IOptionsMonitor when you need change notifications
  • Use AsNoTracking for read-only EF Core queries
  • Project to a DTO with Select instead of fetching every column
  • Choose Dapper when you need full SQL control or have hot read paths; choose EF Core when you want change tracking and migrations
services.Configure<CatalogOptions>(configuration.GetSection(CatalogOptions.SectionName));

What do you need before you use it?

The skill itself is only instructions, so you need the tools that the code examples target. The examples reference keyed services, so you need a recent .NET SDK. The caching examples assume Redis, and the testing guidance assumes xUnit.

Check these requirements against your own project before you apply the code, because the examples are general and are not tested against your codebase.

  • .NET SDK (the examples use keyed services, which are a newer .NET feature)
  • Redis, if you follow the caching examples
  • xUnit, for the testing guidance

What are the safety notes for this skill?

This skill does not run scripts and does not use the network, according to its listing. It is made of Markdown instructions and code examples. The risk is not that the skill runs something on your machine; the risk is that you apply its examples without checking them.

Treat the output as a starting point. Review generated code against your framework version, your security requirements and your existing conventions, and run your own tests before you deploy anything.

  • Runs scripts: no
  • Uses network: no
  • Review all generated code before committing it
  • Verify against your project and framework version before production use

Tips for getting the best results

Give the agent your context. Tell it which .NET version, database and framework you use, and whether you are building a Web API, an MCP server or a library. The patterns differ between those cases.

When you use the skill for code review, paste the specific file or method. Ask the agent to explain each finding so you can judge whether it applies to your situation.

  • State your .NET version and whether you use Controllers or Minimal APIs
  • Name your database and whether you need change tracking
  • Ask for the reason behind each recommendation
  • Use the skill as one review input alongside your own standards and tests

What people use it for

  • Reviewing a C# service for async/await mistakes such as blocking calls and async void methods
  • Designing the folder layout of a new clean architecture Web API
  • Choosing between EF Core and Dapper for a read-heavy data access layer
  • Registering services with scoped, singleton and transient lifetimes
  • Setting up IOptions configuration for a Redis connection and feature settings

Frequently asked questions

How do I install the dotnet-backend-patterns skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings, then Capabilities, then Skills.

Is the dotnet-backend-patterns skill free?

The skill is published under the MIT licence, as listed on this page. Check the licence file in the source repository for the full terms before you reuse it.

What do I need to use this skill?

You need a .NET SDK because the examples use keyed services. Redis is needed if you follow the caching examples, and xUnit is needed for the testing guidance.

Does the skill run scripts or use the internet?

According to its listing, the skill does not run scripts and does not use the network. It consists of instructions, reference files and code examples.

Can I use this skill for non-.NET projects?

No. The patterns cover C#/.NET backends, so they do not apply to Node, Python or Java stacks. Use a skill written for your own stack instead.

Is this skill a substitute for code review or testing?

No. The examples are general guidance and are not tested against your codebase. Use the skill to inform reviews and designs, and verify the results with your own tests and framework version.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits C#/.NET developers building Web APIs, MCP servers or enterprise backends, and teams that want consistent async, dependency injection and data access checks during code review. If you work in another language or need production sign-off, use it only as one input and verify everything against your own project and framework version.

Download the skill