.NET Doctor

Check and repair scoped .NET changes with formatting, analyzers, relevant tests, and JetBrains tools.

What it does

.NET Doctor gives an AI coding agent a scoped verification workflow for .NET changes. It starts with deterministic repository tools, then uses their findings to guide targeted fixes. It keeps your current task separate from unrelated pending work.

When to use it

Use it to check pending C# changes, diagnose verified findings, or prepare completed work for a commit or pull request. The final verification gate runs once at handoff rather than after every edit. If relevant files change afterward, run it again.

Install the skill

Download the ZIP and extract it into your repository’s .agents/skills/ directory. Keep the whole dotnet-doctor folder: the main instructions depend on both reference files. The bundle also includes Codex interface metadata.

.agents/skills/dotnet-doctor/
├── SKILL.md
├── agents/openai.yaml
└── references/
    ├── repository.md
    └── tooling.md

Use an agent that supports repository skills in .agents/skills/. For another skill location, place the complete folder in the location your agent documents.

Try it on your changes

Start with a read-only check:

$dotnet-doctor check my pending .NET changes without modifying files

When you want formatting and targeted fixes:

$dotnet-doctor fix the .NET changes from this task and verify them before I commit

For a broader analysis of a named project:

$dotnet-doctor run a deep check of the named project, including InspectCode

Choose the depth

  • Automatic check: read-only, scoped Debug formatting, analyzer build, and relevant tests.
  • Explicit check: honors the files or projects you name; read-only unless you ask for fixes.
  • Deep check: Release verification, explicit restores, InspectCode, and a broader relevant test set.
  • Fix: scoped formatting and CleanupCode, targeted fixes, then verification.

Repository requirements

The workflow uses the .NET SDK and the repository’s existing build and analyzer configuration. JetBrains CleanupCode is used in fix mode; InspectCode is used for deep checks. Configure the required JetBrains command-line tools in your repository’s tool manifest.

The references include TUnit examples for Microsoft.Testing.Platform. Other test runners use the repository’s own documented commands. SDK versions, solution paths, and test targets are discovered from the repository rather than fixed by the skill.

What a result means

The agent reports the selected scope, checks run, affected projects, and unresolved findings. A required check that failed or could not run prevents a clean result. Existing debt and verification limitations are reported separately.

The portable copy keeps the original workflow and replaces its source repository’s paths and settings with discovery guidance. Read the instructions before using it in a trusted repository: formatting, builds, restores, and tests can modify files or execute repository code.

All AI skills