Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

dotnet-maui-doctordotnet 毛伊岛医生

Agent Skill

dotnet-maui-doctor 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,227

周安装

220

GitHub Stars

1,498

下载量

1,830
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/dotnet/skills --skill dotnet-maui-doctor

简介

用于查找、检索和筛选相关信息。dotnet-maui-doctor 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合根据关键词或场景快速定位候选结果。
  • 可结合来源仓库进一步核验具体用法。
  • 安装前建议确认权限范围与维护状态。
  • 注意:版本要求动态获取自 NuGet API,非硬编码。

SKILL.md

.NET MAUI Doctor

Validate and fix.NET MAUI development environments. All version requirements are discovered dynamically from NuGet APIs — never hardcode versions.

When to Use

  • Setting up a new.NET MAUI development environment
  • Build errors mentioning missing SDKs, workloads, JDK, or Android components
  • Errors like "Android SDK not found", "Java version", or "Xcode not found"
  • Verifying environment health after SDK or OS updates

When Not to Use

  • Non-MAUI.NET projects (use standard.NET SDK troubleshooting instead)
  • Xamarin.Forms apps (different toolchain and workload requirements)
  • Runtime app crashes unrelated to environment setup
  • App store publishing or signing issues
  • IDE-specific issues (Visual Studio or VS Code configuration)

Important:.NET Version Currency

Your training data may be outdated regarding.NET versions..NET ships new major releases annually (November). Always check the releases-index.json (Task 2) to discover the latest active major release — do not assume your training data reflects the current version. For example, if you know about.NET 9.0 but the releases index shows.NET 10.0 as active, use.NET 10.0.

Inputs

  • A development machine running macOS, Windows, or Linux
  • Shell access (Bash on macOS/Linux, PowerShell on Windows)
  • Internet access for NuGet API queries and SDK downloads
  • Admin/sudo access may be required for installing SDKs and workloads
  • Bash prerequisites: curl, jq, and unzip (macOS/Linux)
  • PowerShell prerequisites: Invoke-RestMethod and System.IO.Compression (built-in on Windows)

Behavior

  • Run through ALL tasks autonomously
  • Re-validate after each fix
  • Iterate until complete or no further actions possible
  • After detecting platform (Task 1), load only the matching platform-specific references

Workflow

Task 1: Detect Environment

# macOS
sw_vers && uname -m

# Windows
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"

# Linux
cat /etc/os-release && uname -m

After detection, load the matching platform references:

  • macOS: references/platform-requirements-macos.md, references/installation-commands-macos.md, references/troubleshooting-macos.md
  • Windows: references/platform-requirements-windows.md, references/installation-commands-windows.md, references/troubleshooting-windows.md
  • Linux: references/platform-requirements-linux.md

Task 2: Check.NET SDK

dotnet --info

Compare installed vs latest-sdk from https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json where support-phase is "active".

Task 3: Check MAUI Workloads

WorkloadmacOSWindowsLinux
mauiRequiredRequired❌ Use maui-android
maui-androidAliasAliasRequired
androidRequiredRequiredRequired
iosRequiredOptionalN/A

Task 4: Discover Requirements from NuGet

See references/workload-dependencies-discovery.md for complete process.

Query NuGet for workload manifest → extract WorkloadDependencies.json → get:

  • jdk.version range and jdk.recommendedVersion
  • androidsdk.packages, buildToolsVersion, apiLevel
  • xcode.version range

Task 5: Validate Java JDK

Only Microsoft OpenJDK supported. Verify java -version output contains "Microsoft". See references/microsoft-openjdk.md for detection paths.

Use the JDK version recommended by WorkloadDependencies.json (jdk.recommendedVersion), ensuring it satisfies the jdk.version range. Do not hardcode JDK versions.

JAVA_HOME is NOT required..NET MAUI tools auto-detect Microsoft OpenJDK installations from known paths. Do not tell users to set JAVA_HOME — it is unnecessary and risks pointing to a non-Microsoft JDK.

JAVA_HOME stateOK?Action
Not setNone needed — auto-detection works
Set to Microsoft JDKNone needed
Set to non-Microsoft JDK⚠️Report as anomaly — let user decide to unset or redirect

Task 6: Validate Android SDK

Check packages from androidsdk.packages, buildToolsVersion, apiLevel (Task 4). See references/installation-commands.md for sdkmanager commands.

Task 7: Validate Xcode (macOS Only)

xcodebuild -version

Compare against xcode.version range from Task 4. See references/installation-commands-macos.md.

Task 8: Validate Windows SDK (Windows Only)

The Windows SDK is typically installed as part of the.NET MAUI workload or Visual Studio. See references/installation-commands-windows.md.

Task 9: Remediation

See references/installation-commands.md for all commands.

Key rules:

  • Workloads: Always use --version flag. Never use workload update or workload repair.
  • JDK: Only install Microsoft OpenJDK. Do not set JAVA_HOME (auto-detected).
  • Android SDK: Use sdkmanager (from Android SDK command-line tools). On Windows use sdkmanager.bat.

Task 10: Re-validate

After each fix, re-run the relevant validation task. Iterate until all checks pass.

Validation

A successful run produces:

  • .NET SDK installed and matches an active release
  • All required workloads installed with consistent versions
  • Microsoft OpenJDK detected (java -version contains "Microsoft")
  • All required Android SDK packages installed (per WorkloadDependencies.json)
  • Xcode version in supported range (macOS only)
  • Windows SDK detected (Windows only)

Build Verification (Recommended)

After all checks pass, create and build a test project to confirm the environment actually works:

TEMP_DIR=$(mktemp -d)
dotnet new maui -o "$TEMP_DIR/MauiTest"
dotnet build "$TEMP_DIR/MauiTest"
rm -rf "$TEMP_DIR"

On Windows, use $env:TEMP or New-TemporaryFile for the temp directory.

If the build succeeds, the environment is verified. If it fails, use the error output to diagnose remaining issues.

Run Verification (Optional — Ask User First)

After a successful build, ask the user if they want to launch the app on a target platform to verify end-to-end:

# Replace net10.0 with the current major .NET version
dotnet build -t:Run -f net10.0-android
dotnet build -t:Run -f net10.0-ios        # macOS only
dotnet build -t:Run -f net10.0-maccatalyst # macOS only
dotnet build -t:Run -f net10.0-windows    # Windows only

Only run the target frameworks relevant to the user's platform and intent. This step deploys to an emulator/simulator/device, so confirm with the user before proceeding.

Common Pitfalls

  • maui vs maui-android workload: On Linux, the maui meta-workload is not available — use maui-android instead. On macOS/Windows, maui installs all platform workloads.
  • workload update / workload repair: Never use these commands. Always install workloads with an explicit --version flag to ensure version consistency.
  • Non-Microsoft JDK: Only Microsoft OpenJDK is supported. Other distributions (Oracle, Adoptium, Azul) will cause build failures even if the version is correct.
  • Unnecessary JAVA_HOME: Do not set JAVA_HOME. MAUI auto-detects JDK from known install paths. If JAVA_HOME is set to a non-Microsoft JDK (e.g., Temurin), report this as an anomaly — it may override auto-detection and cause failures. Let the user decide whether to unset it.
  • Hardcoded versions: Never hardcode SDK, workload, or dependency versions. Always discover them dynamically from the NuGet APIs (see Task 4).
  • Android SDK sdkmanager on Windows: Use sdkmanager.bat, not sdkmanager, on Windows.
  • Stale training data: LLM training data may reference outdated.NET versions. Always check the releases-index.json to discover the current active release.

References

  • references/workload-dependencies-discovery.md — NuGet API discovery process
  • references/microsoft-openjdk.md — JDK detection paths, identification, JAVA_HOME
  • references/installation-commands.md —.NET workloads, Android SDK (sdkmanager)
  • references/troubleshooting.md — Common errors and solutions
  • references/platform-requirements-{platform}.md — Platform-specific requirements
  • references/installation-commands-{platform}.md — Platform-specific install commands
  • references/troubleshooting-{platform}.md — Platform-specific troubleshooting

Official docs:

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

32.82%
按下载量换算601

Claude

29.7%
按下载量换算544

Cursor

19.2%
按下载量换算351

Gemini CLI

9.5%
按下载量换算174

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/dotnet/skills --skill dotnet-maui-doctor 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills