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.
npx agentmods add skills/tranhieutt/software_development_department/dotnet-backend-patternsnpx skills add tranhieutt/software_development_department --skill dotnet-backend-patternsgit clone --depth 1 https://github.com/tranhieutt/software_development_departmentWrote 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.
[](https://agentmods.dev/skills/tranhieutt/software_development_department/dotnet-backend-patterns)<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/dotnet-backend-patterns"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/dotnet-backend-patterns.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00060 | $0.00851 |
| Opus 5 | $0.00030 | $0.00426 |
| Sonnet 5 | $0.00012 | $0.00170 |
| Haiku 4.5 | $0.00006 | $0.00085 |
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.
How it starts
The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
.NET Backend Development Patterns
C#/.NET patterns for production-grade APIs, MCP servers, and enterprise backends.
API Structure (Minimal API + Controllers)
```csharp // Program.cs - Minimal API var builder = WebApplication.CreateBuilder(args); builder.Services.AddDbContext(o => o.UseNpgsql(connStr)); builder.Services.AddScoped<IOrderService, OrderService>();
var app = builder.Build(); app.MapGet("/orders/{id}", async (int id, IOrderService svc) => await svc.GetByIdAsync(id) is { } order ? Results.Ok(order) : Results.NotFound()); ```
Dependency Injection Patterns
```csharp // Register services builder.Services.AddScoped<IPaymentService, StripePaymentService>(); builder.Services.AddSingleton<ICacheService, RedisCacheService>(); builder.Services.AddHttpClient<IApiClient, ExternalApiClient>(client => { client.BaseAddress = new Uri("https://api.external.com"); }); ```
Lifetime guide: Singleton (stateless/cache), Scoped (per-request), Transient (stateless utility).
Entity Framework Core
```csharp // DbContext with conventions public class AppDbContext : DbContext { public DbSet Orders => Set(); protected override void OnModelCreating(ModelBuilder builder) { builder.Entity().HasIndex(o => o.UserId); builder.Entity().Property(o => o.Total).HasPrecision(18, 2); } } ```
Performance tips:
- Use
.AsNoTracking()for read-only queries - Avoid N+1 with
.Include()or projection - Use compiled queries for hot paths
Middleware Pipeline
```csharp app.UseMiddleware(); app.UseAuthentication(); app.UseAuthorization(); app.UseRateLimiter(); app.MapControllers(); ```
Error Handling
```csharp // Global exception handler app.UseExceptionHandler(err => err.Run(async context => { var exception = context.Features.Get()?.Error; var (status, message) = exception switch { NotFoundException => (404, exception.Message), UnauthorizedAccessException => (403, "Forbidden"), _ => (500, "Internal server error") }; context.Response.StatusCode = status; await context.Response.WriteAsJsonAsync(new { error = message }); })); ```
What ships with it
5 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.
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.
- 6d ago First seen · 117 lines · 60 tokens per session scan A f3e4b38daaca
dotnet-backend-patterns is a skill published in the GitHub repository tranhieutt/software_development_department (72 stars, last pushed 3mo ago), licensed MIT. It adds 60 tokens to every session and 851 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
csharp-developer
Use when building C# applications with .NET 8+, ASP.NET Core APIs, or Blazor web apps. Builds REST APIs using minimal or controller-based routing, configures database access with Entity Framework Core, implements async patterns and cancellation, structures applications with CQRS via MediatR, and scaffolds Blazor…
dotnet-core-expert
Use when building .NET 8 applications with minimal APIs, clean architecture, or cloud-native microservices. Invoke for Entity Framework Core, CQRS with MediatR, JWT authentication, AOT compilation.
dotnet-architect
Expert .NET backend architect specializing in C#, ASP.NET Core, Entity Framework, Dapper, and enterprise application patterns. Masters async/await, dependency injection, caching strategies, and performance optimization. Use PROACTIVELY for .NET API development, code review, or architecture decisions.
csharp-pro
Write modern C# code with advanced features like records, pattern matching, and async/await. Optimizes .NET applications, implements enterprise patterns, and ensures comprehensive testing. Use PROACTIVELY for C# refactoring, performance optimization, or complex .NET solutions.
dotnet-backend-patterns
Master C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.
csharp-dotnet
Use when building on .NET 8+ with C# 12. Covers nullable reference types, records, async/await correctness, minimal APIs, dependency injection, and EF Core query performance.