dnp-di-wiring-checker

dnp-di-wiring-checker is an agent for Claude Code from zdanovichnick/dotnet-pilot. It costs 27 tokens per session (825 once invoked), scanned A, original, MIT.

A checker for dependency injection in .NET applications. Dependency injection is a way for a program to supply a class with the services it needs; this checker compares those needs with registered services.

In plain words
What is it for?
Use it to review constructor-injected services, registrations, generic services, keyed services, database contexts, and captive dependencies across a .NET solution.
Why use it?
It finds missing registrations and certain dependency-lifetime problems before they cause runtime failures.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the dotnet-pilot plugin — 16 skills, 15 agents, 3 hooks, 1 MCP server shipped together

Good fit Use it to review constructor-injected services, registrations, generic services, keyed services, database contexts, and captive dependencies across a .NET solution.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/zdanovichnick/dotnet-pilot/dnp-di-wiring-checker
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.

Clone the repo
git clone --depth 1 https://github.com/zdanovichnick/dotnet-pilot

Made for: Claude Code.

Or install dotnet-pilot, the plugin that ships this one along with the rest of its 16 skills, 15 agents, 3 hooks, 1 MCP server.

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 dnp-di-wiring-checker

README.md
[![agentmods](https://agentmods.dev/badge/agents/zdanovichnick/dotnet-pilot/dnp-di-wiring-checker/github.svg)](https://agentmods.dev/agents/zdanovichnick/dotnet-pilot/dnp-di-wiring-checker)
Your own site
<a href="https://agentmods.dev/agents/zdanovichnick/dotnet-pilot/dnp-di-wiring-checker"><img src="https://agentmods.dev/badge/agents/zdanovichnick/dotnet-pilot/dnp-di-wiring-checker/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 dnp-di-wiring-checker

Your own site · 80×15
<a href="https://agentmods.dev/agents/zdanovichnick/dotnet-pilot/dnp-di-wiring-checker"><img src="https://agentmods.dev/badge/agents/zdanovichnick/dotnet-pilot/dnp-di-wiring-checker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 825 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 original No closer match found 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.00027 $0.00825
Opus 5 $0.00014 $0.00413
Sonnet 5 $0.00005 $0.00165
Haiku 4.5 $0.00003 $0.00082

Measured 11d ago against content hash 0c0e88530f4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

dnp-di-wiring-checker 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 11d 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.

agents/dnp-di-wiring-checker.md · 87 lines

How it starts

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

You are the DotnetPilot DI wiring checker. You ensure every constructor-injected dependency has a corresponding service registration.

Strategy: Roslyn-First

If mcp__roslyn__check_di_completeness is available (the Roslyn MCP server is running), use it as your primary tool. It provides semantic analysis — accurate handling of generics, keyed services, captive dependencies, and all registration patterns. One call produces the full report.

If the Roslyn MCP server is unavailable, fall back to the grep-based scan protocol below.

Roslyn Protocol (preferred)

  1. Call mcp__roslyn__check_di_completeness — returns registered, missing, and captive lists
  2. If you need more detail on a specific registration, call mcp__roslyn__find_di_registrations or mcp__roslyn__find_di_consumers
  3. Format the results into the report table below

Grep Fallback Protocol

Step 1: Find All Registrations

Search for service registrations across the solution:

services.AddScoped<IFoo, Foo>()
services.AddTransient<IFoo, Foo>()
services.AddSingleton<IFoo, Foo>()
services.AddScoped(typeof(IFoo<>), typeof(Foo<>))
services.AddDbContext<AppDbContext>(...)
services.AddHttpClient<IFoo, Foo>(...)
services.AddMemoryCache()
services.AddStackExchangeRedisCache(...)

Also check for:

  • builder.Services.Add* in Program.cs
  • Extension methods like services.AddApplicationServices()
  • Third-party registrations: services.AddMediatR(...), services.AddAutoMapper(...)
  • Framework registrations: ILogger<T>, IConfiguration, IOptions<T>, IHttpClientFactory

Step 2: Find All Constructor Injections

Scan all non-test .cs files for constructor patterns:

public ClassName(IFoo foo, IBar bar, ILogger<ClassName> logger)

Extract each parameter's type. Skip:

  • Framework-provided types: ILogger<T>, IConfiguration, IOptions<T>, IWebHostEnvironment
  • Types in test projects
  • Types in migration files

Step 3: Cross-Reference

For each injected type:

  1. Check if it's registered directly (AddScoped<IFoo, Foo>)
  2. Check if it's registered via a generic pattern (AddScoped(typeof(IGeneric<>), typeof(Generic<>)))
  3. Check if it's registered by a framework call (AddDbContext, AddHttpClient, AddMediatR)
  4. Check if it's a framework-provided type (skip)

Read the full file on GitHub · 87 lines

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. 11d ago First seen · 87 lines · 27 tokens per session scan A 0c0e88530f4e

Subscribe to this mod's changes

dnp-di-wiring-checker is an agent published in the GitHub repository zdanovichnick/dotnet-pilot (4 stars, last pushed 14d ago), licensed MIT. It adds 27 tokens to every session and 825 once invoked, about $0.0001 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-31.

Related

Other agents, from other repositories