Official agent skill

Mtp Hot Reload

by dotnet in dotnet/skills

Set up or recover MTP hot reload for a long-lived console-host edit/re-run loop in a Microsoft Testing Platform project.

OfficialMITAuto-check passedTesting & QA

Install Mtp Hot Reload

skills CLI
$ npx skills add dotnet/skills --skill mtp-hot-reload -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dotnet/skills mtp-hot-reload --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/dotnet-test/skills/mtp-hot-reload .claude/skills/mtp-hot-reload && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mtp-hot-reload
GitHub stars
5.6k
Used in
1 other repo
Token cost
~2.3k tokens
SKILL.md length
1,083 words
Files
1
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Set up or recover MTP hot reload for a long-lived console-host edit/re-run loop in a Microsoft Testing Platform project.

  • Works in 6 steps: Detect the platform before changing… → Add the hot reload NuGet package → Enable hot reload → …
  • Explicit MTP console requests such as enable hot reload
  • SKILL.md covers When to Use, When Not to Use, Inputs and Response sizing, plus 3 more sections
  • Calls dotnet

What it does

Mtp Hot Reload is an agent skill from dotnet/skills, published by the product's own GitHub organization. Set up or recover MTP hot reload for a long-lived console-host edit/re-run loop in a Microsoft Testing Platform project. Use for explicit MTP console requests such as "enable hot reload", "dotnet run to rerun on edit", or unsupported/rude edits. Covers setup, run/watch, restarts, filters, and the VSTest no-mutation fallback. For one-time runs, exact commands, filter errors, TRX/dumps, or merely a failing test, use run-tests. Do not use when Test Explorer or an IDE should rerun tests without an MTP console host…

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Failing and flaky tests. It works with .NET. The repository describes itself as: Repository for skills to assist AI coding agents with .NET and C. The licence is MIT.

When your agent uses it

  • Explicit MTP console requests such as enable hot reload
  • Dotnet run to rerun on edit
  • Unsupported/rude edits
  • An IDE should rerun tests without an MTP console host

Example prompts

  • “enable hot reload”
  • “dotnet run to rerun on edit”
  • “/mtp-hot-reload”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Detect the platform before changing anything
  2. Add the hot reload NuGet package
  3. Enable hot reload
  4. Run the tests with hot reload
  5. Iterate on the fix
  6. Finalize

What it can do on your machine

Read from SKILL.md and the folder at commit a660de8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mtp Hot Reload loads about 2.3k tokens when it runs. Until then it costs about 148 tokens; SKILL.md has 1,083 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~148
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dotnet/skills at commit a660de8, republished under its MIT licence (© dotnet). 1,083 words, ~2,280 tokens.

Download SKILL.mdSave it as .claude/skills/mtp-hot-reload/SKILL.md (or your agent's skills folder).
name
mtp-hot-reload
description
Set up or recover MTP hot reload for a long-lived console-host edit/re-run loop in a Microsoft Testing Platform project. Use for explicit MTP console requests such as "enable hot reload", "dotnet run to rerun on edit", or unsupported/rude edits. Covers setup, run/watch, restarts, filters, and the VSTest no-mutation fallback. For one-time runs, exact commands, filter errors, TRX/dumps, or merely a failing test, use run-tests. Do not use when Test Explorer or an IDE should rerun tests without an MTP console host. Excludes editor integration, CI, and writing/debugging tests.
license
MIT

MTP Hot Reload for Iterative Test Fixing

Set up and use a long-lived Microsoft Testing Platform host that applies code edits and automatically reruns tests.

When to Use

  • User explicitly asks for test hot reload
  • User wants a host to stay running and automatically rerun after repeated edits
  • User needs to set up MTP hot reload in their project

When Not to Use

  • User needs to write new tests from scratch (use general coding assistance)
  • User needs to diagnose why a test is failing (use diagnostic skills)
  • User asks about Visual Studio or VS Code Test Explorer hot reload or an IDE-integrated rerun experience (different feature, not MTP console-host hot reload)
  • User asks whether the editor can auto-rerun affected tests after source edits without using an MTP console host
  • User wants one normal run without rebuilding (use run-tests)
  • User needs CI/CD pipeline configuration

Inputs

InputRequiredDescription
Test project pathNoPath to the test project (.csproj). Defaults to current directory.
Failing test name or filterNoSpecific test(s) to iterate on

Response sizing

  • If setup is already complete and the user asks only which command to use, return one dotnet run --project <path> command and one sentence explaining that it starts the persistent host. Do not repeat package, launch profile, or rude-edit guidance.
  • If the package is already installed, show only the remaining enable-and-run steps. Do not suggest reinstalling it or add optional persistence/recovery paths unless requested.
  • For a named test, identify the framework and return one runnable command with that framework's filter syntax. Never substitute MSTest/NUnit --filter for xUnit v3 --filter-method or TUnit --treenode-filter.
  • A directly launched MTP host is itself the persistent watcher: dotnet run stays alive and the HotReload extension reacts to edits. Do not replace it with dotnet watch run for the normal MTP path; reserve dotnet watch for the explicit restart fallback below.

Workflow

Step 1: Detect the platform before changing anything

Hot reload requires MTP. It does not work with VSTest.

Follow the complete evaluated-property procedure in the platform-detection skill. Read imported props and package versions as well as the project file. Do this before installing packages, editing files, or returning an MTP launch command.

Hard stop for VSTest: report that MTP hot reload is unavailable for the project as configured and stop the MTP setup path. Do not install the extension, create launchSettings.json, set the environment variable, change runner properties/packages, or return a dotnet run hot-reload command. Never turn a setup request into an implicit VSTest-to-MTP migration.

Offer one valid non-MTP fallback that preserves the project:

shell
dotnet watch --project <project-path> test

This rebuilds and reruns the existing VSTest project when files change; it is not MTP hot reload. Offer an explicit migration as a separate option, but do not perform it unless the user asks. Exact one-shot test commands remain owned by run-tests.

Step 2: Add the hot reload NuGet package

First inspect the effective package references. If Microsoft.Testing.Extensions.HotReload is already installed, preserve its version and skip this step. Otherwise install it:

shell
dotnet add <project-path> package Microsoft.Testing.Extensions.HotReload

Note: When using Microsoft.Testing.Platform.MSBuild (included transitively by MSTest, NUnit, and xUnit runners), the extension is auto-registered when you install its NuGet package -- no code changes needed.

Step 3: Enable hot reload

Hot reload is activated by setting the TESTINGPLATFORM_HOTRELOAD_ENABLED environment variable to 1.

Option A -- Set it in the shell before running tests:

shell
# PowerShell
$env:TESTINGPLATFORM_HOTRELOAD_ENABLED = "1"

# bash/zsh
export TESTINGPLATFORM_HOTRELOAD_ENABLED=1

Option B -- Add it to launchSettings.json (recommended for repeatable use):

Create or update Properties/launchSettings.json in the test project:

json
{
  "profiles": {
    "<ProjectName>": {
      "commandName": "Project",
      "environmentVariables": {
        "TESTINGPLATFORM_HOTRELOAD_ENABLED": "1"
      }
    }
  }
}
Step 4: Run the tests with hot reload

Run the test project directly (not through dotnet test) to use hot reload in console mode:

shell
dotnet run --project <project-path>

To filter to specific failing tests, pass the filter after --. The syntax depends on the test framework -- see the filter-syntax skill for full details. Quick examples:

FrameworkFilter syntax
MSTestdotnet run --project <path> -- --filter "FullyQualifiedName~TestMethodName"
NUnitdotnet run --project <path> -- --filter "FullyQualifiedName~TestMethodName"
xUnit v3dotnet run --project <path> -- --filter-method "*TestMethodName"
TUnitdotnet run --project <path> -- --treenode-filter "/*/*/ClassName/TestMethodName"

The test host will start, run the tests, and remain running waiting for code changes.

Show full SKILL.md (420 more words)Show less
Step 5: Iterate on the fix
  1. Edit the source code (test code or production code) in your editor
  2. The test host detects the changes and re-runs the affected tests automatically
  3. Review the updated results in the console
  4. Repeat until all targeted tests pass

Important: Hot reload currently works in console mode only. There is no support for hot reload in Test Explorer for Visual Studio or Visual Studio Code.

Unsupported edits and rude edits

Method-signature changes, new types, and other unsupported edits cannot be applied to the active process. Never imply that the stale host picked them up.

For a directly launched MTP host:

  1. Preserve the exact command, profile, environment, filter, and arguments that started the current host.
  2. Stop it with Ctrl+C.
  3. Rebuild the same project: dotnet build <project-path>.
  4. Rerun the same original host command. Do not replace an unknown existing invocation with a generic dotnet run command.

If repeated unsupported edits are expected, offer a watch-managed restart fallback:

shell
# PowerShell
$env:TESTINGPLATFORM_HOTRELOAD_ENABLED = "1"
$env:DOTNET_WATCH_RESTART_ON_RUDE_EDIT = "1"
dotnet watch --project <project-path> run -- <existing-MTP-arguments>

dotnet watch restarts the process when a rude edit cannot be applied. Without the auto-restart variable, accept the restart prompt or press Ctrl+R. Preserve any existing test filter after --. DOTNET_WATCH_RESTART_ON_RUDE_EDIT is a documented .NET SDK switch, not an MTP extension setting. When correctness may be questioned, cite the dotnet watch documentation and say that it makes the watcher restart instead of prompting. Never omit the original filter or replace the requested watch-managed fallback with a one-shot dotnet run.

Step 6: Finalize

Once all tests pass:

  1. Stop the test host (Ctrl+C)
  2. Use run-tests when the user requests an exact one-shot validation command, flags, filter, TRX, or dump
  3. Optionally remove TESTINGPLATFORM_HOTRELOAD_ENABLED from the environment or keep launchSettings.json for future use

Validation

  • Project uses Microsoft Testing Platform (not VSTest)
  • Microsoft.Testing.Extensions.HotReload package is installed
  • TESTINGPLATFORM_HOTRELOAD_ENABLED environment variable is set to 1
  • Tests run and the host remains active waiting for changes
  • Code changes are picked up without manual restart

Common Pitfalls

PitfallSolution
Using dotnet test instead of dotnet runHot reload requires dotnet run --project <path> to run the test host directly in console mode
Project uses VSTest, not MTPDo not mutate it. Offer dotnet watch --project <path> test as a rebuild/rerun fallback or a separate explicit migration
Forgetting to set the environment variableSet TESTINGPLATFORM_HOTRELOAD_ENABLED=1 before running
Expecting Test Explorer integrationConsole mode only -- no VS/VS Code Test Explorer support
Making unsupported code changes (rude edits)Stop, rebuild, and rerun the same host invocation, or use dotnet watch with restart-on-rude-edit behavior

© dotnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/dotnet-test/skills/mtp-hot-reload of dotnet/skills.

Open the folder on GitHubat commit a660de8

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in dotnet/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Mtp Hot Reload next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mtp Hot Reload compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mtp Hot Reload this skilldotnet/skills5.6k1 repos~2.3kAutomated safety check: PassMIT
Fix Random CI Test Failuredotnet/macios2.9k—~1.3kAutomated safety check: PassCustom licence
Raven Test Triagemarinasundstrom/raven108—~1.4kAutomated safety check: PassMIT
Corvus Build And Testcorvus-dotnet/Corvus.JsonSchema199—~5.5kAutomated safety check: PassApache-2.0
Macios CI Failure Inspectordotnet/macios2.9k—~2.3kAutomated safety check: PassCustom licence
Analyze Azdo BuildDataDog/dd-trace-dotnet573—~3.5kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    Investigate and fix flaky/random CI test failures in dotnet/macios.

    2.9k GitHub stars~1.3k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Raven Test Triage

    marinasundstrom/raven

    Testing and stabilization workflow for the Raven compiler test suite.

    108 GitHub stars~1.4k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Corvus Build And Test

    corvus-dotnet/Corvus.JsonSchema

    Build, test, and run the Corvus.JsonSchema solution correctly.

    199 GitHub stars~5.5k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Official

    Investigate and triage CI failures for dotnet/macios from Azure DevOps build URLs.

    2.9k GitHub stars~2.3k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Analyze Azdo Build

    DataDog/dd-trace-dotnet

    Official

    Analyze Azure DevOps CI build failures in dd-trace-dotnet pipeline.

    573 GitHub stars~3.5k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Official

    Adds dotnet/maui-specific context for investigating failing PR checks and broken nightly builds: pipelines, Helix logs, binlogs and merge-readiness verdicts.

    23k GitHub stars~2k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from dotnet/skills

All 91 skills in this repo
  • Official

    Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.

    5.6k GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Official

    Resolves native crash frames from .NET Android tombstones to function names, source files and line numbers using BuildIds, Microsoft's symbol server and llvm-symbolizer.

    5.6k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Official

    Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.

    5.6k GitHub starsUsed in 3 repos~3.1k tokens
    Auto-check passed
  • Official

    Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.

    5.6k GitHub starsUsed in 1 repo~3.3k tokens
    Auto-check passed
  • Microbenchmarking

    dotnet/skills

    Official

    Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks.

    5.6k GitHub starsUsed in 3 repos~3.3k tokens
    Auto-check passed
  • Official

    Makes .NET projects compatible with Native AOT and trimming by resolving IL trim and AOT analyzer warnings through annotations rather than suppressions.

    5.6k GitHub starsUsed in 2 repos~4.2k tokens
    Auto-check passed

Works with

Questions about Mtp Hot Reload

What does Mtp Hot Reload do?

Set up or recover MTP hot reload for a long-lived console-host edit/re-run loop in a Microsoft Testing Platform project. Mtp Hot Reload is an agent skill from dotnet/skills, published by the product's own GitHub organization. Set up or recover MTP hot reload for a long-lived console-host edit/re-run loop in a Microsoft Testing Platform project.

When should I use Mtp Hot Reload?

Mtp Hot Reload fits situations like: explicit MTP console requests such as enable hot reload; dotnet run to rerun on edit; unsupported/rude edits; an IDE should rerun tests without an MTP console host.

How do I install Mtp Hot Reload in Claude Code?

Run `npx skills add dotnet/skills --skill mtp-hot-reload -a claude-code`. Or copy the skill folder (plugins/dotnet-test/skills/mtp-hot-reload in dotnet/skills) into .claude/skills/mtp-hot-reload in your project. Claude Code loads it when a task matches its description.

How do I install Mtp Hot Reload in Codex?

Run `npx skills add dotnet/skills --skill mtp-hot-reload -a codex`. Or copy the skill folder (plugins/dotnet-test/skills/mtp-hot-reload in dotnet/skills) into .agents/skills/mtp-hot-reload in your project. Codex loads it when a task matches its description.

Can I use Mtp Hot Reload in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/skills --skill mtp-hot-reload -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mtp-hot-reload, .gemini/skills/mtp-hot-reload, .github/skills/mtp-hot-reload and .opencode/skills/mtp-hot-reload in your project.

What does Mtp Hot Reload need to run?

Going by SKILL.md and its folder, Mtp Hot Reload needs the command-line tools its instructions call (dotnet).

Does Mtp Hot Reload access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mtp Hot Reload safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mtp Hot Reload use?

Mtp Hot Reload is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mtp Hot Reload use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mtp Hot Reload?

Skills that share tags, products or a category with Mtp Hot Reload: Fix Random CI Test Failure (dotnet/macios, 2.9k stars), Raven Test Triage (marinasundstrom/raven, 108 stars), Corvus Build And Test (corvus-dotnet/Corvus.JsonSchema, 199 stars) and Macios CI Failure Inspector (dotnet/macios, 2.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mtp Hot Reload?

dotnet (a GitHub organization, an official publisher) maintains it in dotnet/skills, which has 5,576 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 8, 2026.

Source: dotnet/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.