dotnet-backend-patterns

dotnet-backend-patterns is a skill for Claude Code, Codex from mattmre/EVOKORE-MCP-PUBLIC. It costs 70 tokens per session (5,740 once invoked), scanned A, a copy of dotnet-backend-patterns, MIT.

A guide to building C# and .NET backends, including web APIs, MCP servers, databases, caching, configuration, and automated tests.

In plain words
What is it for?
Use it when creating or reviewing .NET APIs and services, connecting to databases with Entity Framework Core or Dapper, adding Redis caching, or writing xUnit tests.
Why use it?
It provides ways to organize backend code and handle common concerns such as dependency injection, errors, slow database access, and resilience.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or reviewing .NET APIs and services, connecting to databases with Entity Framework Core or Dapper, adding Redis caching, or writing xUnit tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mattmre/evokore-mcp-public/dotnet-backend-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mattmre/EVOKORE-MCP-PUBLIC --skill dotnet-backend-patterns
Clone the repo
git clone --depth 1 https://github.com/mattmre/EVOKORE-MCP-PUBLIC

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dotnet-backend-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/mattmre/evokore-mcp-public/dotnet-backend-patterns/github.svg)](https://agentmods.dev/skills/mattmre/evokore-mcp-public/dotnet-backend-patterns)
Your own site
<a href="https://agentmods.dev/skills/mattmre/evokore-mcp-public/dotnet-backend-patterns"><img src="https://agentmods.dev/badge/skills/mattmre/evokore-mcp-public/dotnet-backend-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dotnet-backend-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/mattmre/evokore-mcp-public/dotnet-backend-patterns"><img src="https://agentmods.dev/badge/skills/mattmre/evokore-mcp-public/dotnet-backend-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,740 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.05740
Opus 5 $0.00035 $0.02870
Sonnet 5 $0.00014 $0.01148
Haiku 4.5 $0.00007 $0.00574

Measured 6d ago against content hash 4e71624d0dc5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

dotnet-backend-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

92% identical to dotnet-backend-patterns — 13 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

SKILLS/WSHOBSON PLUGINS/dotnet-contribution/dotnet-backend-patterns/SKILL.md · 822 lines

How it starts

The opening of the file, as written. The whole thing — 822 lines — stays where its author put it; the contents beside it link to each section on GitHub.

.NET Backend Development Patterns

Master C#/.NET patterns for building production-grade APIs, MCP servers, and enterprise backends with modern best practices (2024/2025).

When to Use This Skill

  • Developing new .NET Web APIs or MCP servers
  • Reviewing C# code for quality and performance
  • Designing service architectures with dependency injection
  • Implementing caching strategies with Redis
  • Writing unit and integration tests
  • Optimizing database access with EF Core or Dapper
  • Configuring applications with IOptions pattern
  • Handling errors and implementing resilience patterns

Core Concepts

1. Project Structure (Clean Architecture)

src/
├── Domain/                     # Core business logic (no dependencies)
│   ├── Entities/
│   ├── Interfaces/
│   ├── Exceptions/
│   └── ValueObjects/
├── Application/                # Use cases, DTOs, validation
│   ├── Services/
│   ├── DTOs/
│   ├── Validators/
│   └── Interfaces/
├── Infrastructure/             # External implementations
│   ├── Data/                   # EF Core, Dapper repositories
│   ├── Caching/                # Redis, Memory cache
│   ├── External/               # HTTP clients, third-party APIs
│   └── DependencyInjection/    # Service registration
└── Api/                        # Entry point
    ├── Controllers/            # Or MinimalAPI endpoints
    ├── Middleware/
    ├── Filters/
    └── Program.cs

2. Dependency Injection Patterns

// Service registration by lifetime
public static class ServiceCollectionExtensions
{
    public static IServiceCollection AddApplicationServices(
        this IServiceCollection services,
        IConfiguration configuration)
    {
        // Scoped: One instance per HTTP request
        services.AddScoped<IProductService, ProductService>();
        services.AddScoped<IOrderService, OrderService>();

        // Singleton: One instance for app lifetime
        services.AddSingleton<ICacheService, RedisCacheService>();
        services.AddSingleton<IConnectionMultiplexer>(_ =>
            ConnectionMultiplexer.Connect(configuration["Redis:Connection"]!));

        // Transient: New instance every time
        services.AddTransient<IValidator<CreateOrderRequest>, CreateOrderValidator>();

        // Options pattern for configuration
        services.Configure<CatalogOptions>(configuration.GetSection("Catalog"));
        services.Configure<RedisOptions>(configuration.GetSection("Redis"));

        // Factory pattern for conditional creation
        services.AddScoped<IPriceCalculator>(sp =>
        {
            var options = sp.GetRequiredService<IOptions<PricingOptions>>().Value;
            return options.UseNewEngine
                ? sp.GetRequiredService<NewPriceCalculator>()
                : sp.GetRequiredService<LegacyPriceCalculator>();
        });

        // Keyed services (.NET 8+)
        services.AddKeyedScoped<IPaymentProcessor, StripeProcessor>("stripe");
        services.AddKeyedScoped<IPaymentProcessor, PayPalProcessor>("paypal");

        return services;
    }
}

// Usage with keyed services
public class CheckoutService
{
    public CheckoutService(
        [FromKeyedServices("stripe")] IPaymentProcessor stripeProcessor)
    {
        _processor = stripeProcessor;
    }
}

Read the full file on GitHub · 822 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 822 lines · 70 tokens per session scan A 4e71624d0dc5

Subscribe to this mod's changes

dotnet-backend-patterns is a skill published in the GitHub repository mattmre/EVOKORE-MCP-PUBLIC (3 stars, last pushed 3mo ago), licensed MIT. It adds 70 tokens to every session and 5,740 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to dotnet-backend-patterns, differing in 13 lines, and is treated as a copy.