- Home
- Skills
- APIs & Backend
- dh dotnet architect
More screenshots
Works with the AI Agents you already use
dh dotnet architect
Senior .NET architect for pragmatic C# API design, EF Core optimization, and solution-wide architectural audits.
$19
dh dotnet architect
Example session with this skill installed
Analyze this .NET solution for N+1 query issues in the ProductService and suggest a fix using EF Core projections.
- Read your context and instructions
- Compiled the dh dotnet architect
I have analyzed the persistence logic in the ProductService. I identified a performance bottleneck where related Category and Review entities are being lazy-loaded inside a loop, causing multiple database round-trips.
Architectural Audit: N+1 Query Detection
| File Path | Location | Severity | Issue |
|---|---|---|---|
src/Services/ProductService.cs | GetActiveProductsAsync | HIGH | Implicit lazy-loading of Category inside a foreach loop. |
src/Services/ProductService.cs | GetProductDetailsAsync | MEDIUM | Multiple Include calls fetching unnecessary columns from the Reviews table. |
Proposed Refactoring (Projections)
// src/Services/ProductService.cs
public async Task<List<ProductDto>> GetActiveProductsAsync(CancellationToken ct = default)
{
// Refactored to use selective projection to avoid N+1 and over-fetching
return await _context.Products
.AsNoTracking()
.Where(p => p.IsActive)
.Select(p => new ProductDto
{
Id = p.Id,
Name = p.Name,
CategoryName = p.Category.Name, // Efficiently joined by EF Core
Price = p.Price
})
.ToListAsync(ct);
}
Next steps
- Run
dotnet buildto ensure the newProductDtomapping is consistent with the frontend contract. - Execute
dotnet test --filter Category=Integrationto verify the database query generates a single SQL JOIN. - Review the
ProductDtoto ensure no sensitive fields were accidentally exposed.
Connects securely to your tools. The creator never sees your data.
About this skill
Building .NET applications often leads to architectural bloat or rigid patterns that do not fit the problem. This skill provides senior-level guidance for C# and ASP.NET Core, focusing on pragmatic decisions grounded in your existing codebase rather than forced templates.
What it does
- Solution Auditing analyzes
.slnand.csprojfiles to identify technical debt, reference issues, and version mismatches. - Architectural Design structures Web APIs, Minimal APIs, and Background Workers using styles proportional to the project scale.
- Data Access Optimization tunes performance for EF Core, Dapper, NHibernate, and ADO.NET without forcing unwanted migrations.
- Security & Resilience detects SQL injection, secret leaks, and configures Polly retry policies.
- Code Refactoring eliminates async/await anti-patterns, sync-over-async blocking, and dependency injection misconfigurations.
How it works
- Discovery maps the project structure, Target Frameworks (up to .NET 11), and existing package dependencies.
- Diagnosis reports findings with exact file paths and severity ratings ranging from Low to Critical.
- Proposal delivers a proportional plan or Architectural Decision Record (ADR) before any destructive changes.
- Implementation executes surgical code edits while respecting local naming conventions and test frameworks.
- Verification confirms success by running actual
dotnet buildanddotnet testCLI commands.
Frameworks & tools
Modern .NET ecosystem including .NET 8/9/10/11, ASP.NET Core, Entity Framework Core, Dapper, xUnit, NUnit, MSTest, and Microsoft.Extensions.Resilience.
Why this beats prompting it yourself
Generic prompts often default to complex "Clean Architecture" or "CQRS" patterns for simple tasks. This skill prioritizes context before recipes, ensuring you don't add unnecessary abstractions like generic repositories or MediatR unless the domain complexity justifies the overhead.
Use cases
- Refactor a legacy .NET 8 service to utilize new C# 13 features and .NET 10 performance improvements.
- Identify N+1 query problems in an existing EF Core data layer and implement optimized projections.
- Secure an ASP.NET Core API by auditing middleware, CORS, and credential management.
- Scaffold a new Minimal API feature slice that directly uses Dapper while maintaining testability.
Known limitations
Does not support purely non-.NET languages or frontend-only development. Requires the presence of a .NET project or solution file for full architectural context.
Requires .sln or .csproj files for full context. Does not support non-.NET stacks (Node.js, Go, etc.) or pure frontend UI design decoupled from .NET APIs.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
Permissions
File Scopes
Read Files is required to inspect .NET solutions, source code, and configuration. Write Files is used only when the user explicitly requests modifications or refactoring. Terminal/Shell supports project inspection, builds, and tests when authorized. Access is limited to files relevant to the requested task. No external accounts or credentials are required.