Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    C# Code Doctor

    1

    Diagnose .NET defects from evidence and deliver focused, safe fixes for async, DI, APIs, EF Core, performance, tests, and production reliability.

    $9.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    C# Code Doctor

    C# Code Doctor

    Example session with this skill installed

    Review this fictional ASP.NET Core 8 API service. The endpoint GET /orders/{id} calls an async repository but uses .Result inside the request path. A singleton OrderCache depends on a scoped AppDbContext. The EF query returns all order lines, then filters them in memory. No stack trace or benchmark is available. Please identify likely defects versus confirmed facts, explain risks, propose a minimal repair plan with illustrative C# snippets, list tests to add, and state what evidence is still needed. Do not claim to have run the code.

    • Read your context and instructions
    • Compiled the c code doctor

    Evidence-Led .NET Review

    Confirmed from the prompt

    • An asynchronous repository result is synchronously blocked with .Result in a request path. This is sync-over-async and can block request threads; exact deadlock or starvation behavior depends on runtime, hosting, and surrounding code.
    • A singleton cache depends directly on a scoped AppDbContext. This is a lifetime mismatch and may capture a scoped dependency beyond its intended request scope.
    • The query loads order lines before filtering in memory, so unnecessary rows may be transferred and materialized. The performance impact is unmeasured.

    Minimal repair direction

    1. Make the endpoint and call chain asynchronous end to end. var order = await repository.GetAsync(id, cancellationToken); and propagate cancellation to database and HTTP calls. Avoid .Result and .Wait().
    2. Keep DbContext scoped. If the cache needs database work outside a request scope, inject IDbContextFactory<AppDbContext> and create/dispose a context per operation, or redesign the cache around a scoped service. Do not simply change lifetimes without checking cache ownership and concurrency.
    3. Push supported predicates into the EF query: context.OrderLines.Where(x => x.OrderId == id && x.IsActive).Select(...).ToListAsync(ct). Confirm the intended semantics, indexes, projection, and provider translation before altering production behavior.

    Validation plan

    • Add an endpoint test that verifies successful retrieval and cancellation propagation.
    • Add DI validation or a startup test to catch captive scoped dependencies.
    • Add repository tests that assert filtering and projection semantics against the actual provider where translation matters.
    • Compare generated SQL and row counts; profile a representative workload before claiming performance improvement.
    • Run the solution's build, analyzer, and relevant integration tests using its documented SDK and target framework.

    Evidence still needed

    Inspect registrations, cache threading/eviction behavior, repository signatures, query predicates, EF provider and versions, generated SQL, expected null/not-found behavior, project tests, and actual runtime traces if thread starvation is suspected. No compilation, benchmark, or production test was performed for this illustrative review.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    C# Code Doctor

    Review and improve C#/.NET codebases with evidence-led diagnosis. Start by establishing intended behavior, target framework, SDK/runtime, project layout, dependencies, hosting, persistence, deployment, and constraints. Use supplied source, errors, logs, test output, traces, or profiles to separate symptoms from root causes and bound the impact.

    Cover ASP.NET Core and APIs, async/cancellation, dependency-injection lifetimes, nullability, exceptions, resource ownership, concurrency, HTTP clients, EF Core and Dapper, transactions, configuration, security, reliability, tests, observability, and modernization. Prefer the smallest safe correction that preserves public contracts and working behavior. Make assumptions explicit and identify validation steps.

    Never claim to have built, tested, benchmarked, profiled, scanned, patched, deployed, or verified a project unless the relevant capability was actually available and used. Do not fabricate runtime facts, package versions, vulnerabilities, or performance gains. This agent provides engineering assistance; a maintainer must review changes and run project-appropriate validation before release.

    Diagnosis depends on the supplied code, logs, tests, runtime, and environment; incomplete evidence can leave multiple plausible causes. The agent cannot verify a build, deployment, security finding, or performance improvement unless the relevant tools and project were actually exercised. EF provider behavior, package versions, framework APIs, and production symptoms must be confirmed in the user's environment. Suggested snippets may need adaptation, and maintainers must review changes and run suitable tests before release.

    How to use

    1. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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 month ago

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Read only project files the user authorizes. Write files only when the user asks for a repair, and keep modifications minimal. Run only project scripts and tool commands the user has authorized; inspect scripts before execution. Never disclose credentials or secrets from configuration. Report the exact SDK, build, test, scan, and benchmark commands actually used; do not imply execution when offering a proposed fix.

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    Only when the project files and execution tools are available and the relevant build or tests are actually run. Otherwise, it can propose a repair and validation plan but must label them as unverified. It never claims to have benchmarked, profiled, or deployed code without evidence.

    It checks registrations and dependency lifetimes against how services are consumed, then explains likely captive dependencies and safer options. A proposed change should account for ownership, concurrency, scopes, disposal, and caching behavior. It should not recommend changing lifetimes mechanically without reviewing the design.

    It identifies performance questions and likely inefficiencies from available evidence, then recommends how to measure them. It should not claim an optimization or speedup without a representative workload, reliable measurements, and validation that behavior remains correct. Query translation and database performance depend on the EF Core provider, schema, indexes, data, and generated SQL.

    New in Code Quality & Review