Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

mtp-hot-reloadmtp 热重载

Agent Skill

mtp-hot-reload 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,304

周安装

183

GitHub Stars

1,469

下载量

1,508
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mtp-hot-reload(mtp 热重载)
来源仓库:https://github.com/dotnet/skills
仓库路径:skills/mtp-hot-reload
安装命令:
npx skills add https://github.com/dotnet/skills --skill mtp-hot-reload
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dotnet/skills --skill mtp-hot-reload

简介

mtp-hot-reload 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合整理项目状态与变更事项。

  • 适用于围绕仓库动态、代码提交或团队协作需求进行信息归纳的场景。
  • 通过 npx skills add 命令从 dotnet/skills 仓库安装使用。
  • 使用前应核实权限边界、项目活跃度及潜在的文件读写行为。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

MTP Hot Reload for Iterative Test Fixing

Set up and use Microsoft Testing Platform hot reload to rapidly iterate fixes on failing tests without rebuilding between each change.

When to Use

  • User has one or more failing tests and wants to iterate fixes quickly
  • User wants to avoid rebuild overhead while fixing test code or production code
  • User asks about hot reload for tests or speeding up the test-fix loop
  • 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 wants Visual Studio Test Explorer hot reload (different feature, built into VS)
  • Project uses VSTest -- hot reload requires Microsoft Testing Platform (MTP)
  • 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

Workflow

Step 1: Verify the project uses Microsoft Testing Platform

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

Follow the detection procedure in the platform-detection skill to determine the test platform.

If the project uses VSTest, inform the user that MTP hot reload is not available and suggest migrating to MTP first (see migrate-vstest-to-mtp), or using Visual Studio's built-in Test Explorer hot reload feature instead.

Step 2: Add the hot reload NuGet package

Install the Microsoft.Testing.Extensions.HotReload package:

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:

# 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:

{
  "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:

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.

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.

Step 6: Finalize

Once all tests pass:

  1. Stop the test host (Ctrl+C)
  2. Run a full dotnet test to confirm all tests pass with a clean build
  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 MTPHot reload requires MTP. Migrate to MTP first or use VS Test Explorer hot reload
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)Some changes (adding new types, changing method signatures) require a restart. Stop and re-run

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.94%
按下载量换算557

Claude

30.14%
按下载量换算455

Cursor

21.12%
按下载量换算318

Gemini CLI

9.35%
按下载量换算141

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills