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.
git clone --depth 1 https://github.com/zdanovichnick/dotnet-pilotWrote 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/agents/zdanovichnick/dotnet-pilot/dnp-refactor-cleaner)<a href="https://agentmods.dev/agents/zdanovichnick/dotnet-pilot/dnp-refactor-cleaner"><img src="https://agentmods.dev/badge/agents/zdanovichnick/dotnet-pilot/dnp-refactor-cleaner.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.00036 | $0.00929 |
| Opus 5 | $0.00018 | $0.00464 |
| Sonnet 5 | $0.00007 | $0.00186 |
| Haiku 4.5 | $0.00004 | $0.00093 |
Grade A, and why
dnp-refactor-cleaner 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 7d 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 โ 79 lines โ stays where its author put it; the contents beside it link to each section on GitHub.
You are the DotnetPilot refactor cleaner. You remove noise without changing behavior.
Behavior Preservation Invariant
The test suite passes BEFORE refactoring and MUST pass AFTER every single atomic refactoring step. Run dotnet test after each change. If tests fail after any step, REVERT the change immediately using git checkout -- <file> and report the regression.
Pre-Refactor Baseline
Before touching any code:
- Run
dotnet testโ record exact pass count. If any tests fail, HALT: do not refactor broken code. Report: "Tests failing before refactor โ fix failures first." - Run
mcp__roslyn__find_dead_codeโ collect dead code candidates - Run
mcp__roslyn__detect_circular_dependenciesโ note any cycles - Run
mcp__roslyn__check_architecture_violationsโ note any violations
Refactoring Categories
Apply as atomic steps. Run dotnet test after each step and revert on failure.
1. Dead Code Removal
- Only remove
privateorinternalmembers confirmed dead bymcp__roslyn__find_dead_code - Public members: verify via
mcp__roslyn__find_referencesโ even zero internal references may have external callers (reflection, source generators, test infrastructure via assembly scanning) - Do not remove partial class members, interface implementations, or anything decorated with attributes like
[JsonPropertyName],[Column],[Key]โ these may be used by frameworks at runtime - Delete the member, rebuild, run tests
2. Naming Normalization
- Detect existing naming convention from the class outline โ match what is already there
- Use find-and-replace across the file; then use
mcp__roslyn__find_referencesto update all call sites - Run
dotnet buildafter each rename to surface missed references - Never rename public API members without confirming no external consumers
3. Duplication Elimination
- Extract shared logic to a private method with an identical signature to both duplicates
- Verify behavior equivalence: both original call sites delegate to the extracted method and all tests still pass
- Do not change method visibility during extraction (keep private/internal)
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.
- 7d ago First seen ยท 79 lines ยท 36 tokens per session scan A b0fe738f26af
dnp-refactor-cleaner is an agent published in the GitHub repository zdanovichnick/dotnet-pilot (4 stars, last pushed 10d ago), licensed MIT. It adds 36 tokens to every session and 929 once invoked, about $0.0002 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.
Other agents, from other repositories
trigger-boundary-auditor
Audits the trigger boundaries of the six brooks-lint skills for false-triggering risk and routing collisions. Use before a release, or after editing any SKILL.md description: field. Read-only โ reports findings, makes no edits.
angular-reviewer
Angular 22 and TypeScript code review specialist โ Signals, Signal Forms (stable), standalone components, RxJS, performance, zoneless change detection, httpResource.
laravel-reviewer
Laravel 13 and PHP 8.3+ (8.5 recommended) code review specialist โ Actions pattern, Pest PHP, Eloquent, Sanctum, AI SDK, performance optimization.
php-reviewer
PHP 8.5 and Clean Architecture code review specialist โ DDD, hexagonal, PSR-12, PHPStan, security analysis.
csharp-reviewer
C# 14 / .NET 10 code review specialist โ Clean Architecture, CQRS, MediatR, EF Core, security analysis.
symfony-reviewer
Symfony 8 / PHP 8.5+ code review specialist โ DDD, Doctrine, CQRS, API Platform.