用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/richlander/dotnet-install --skill dotnet-install命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | dotnet-install |
| description | Build, install, list, and remove .NET tools using dotnet-install. |
| argument-hint | [owner/repo | path | --package name | ls | rm name | search | info | env] |
| allowed-tools | Bash, Read, Glob, Grep |
You are helping the user work with dotnet-install,
a tool that installs .NET executables to PATH
— like cargo install and go install.
dotnet-install relates to dotnet tool install -g
the way yarn relates to npm: it uses the same package
registry (NuGet) but provides a different installation
model. Where dotnet tool install -g places shim
scripts in ~/.dotnet/tools/ backed by deeply nested
binaries in .store/, dotnet-install places real
binaries directly in ~/.dotnet/bin/ — a flat,
transparent layout like Go's ~/go/bin/ or Cargo's
~/.cargo/bin/. Users can acquire dotnet-install
itself via dotnet tool install -g; it stays a managed
.NET tool and runs dotnet-install doctor --fix to add
~/.dotnet/bin/ to PATH.
| Directory | Owner | Contents |
|---|---|---|
~/.dotnet/tools/ | dotnet tool install -g | Shim scripts → .store/ |
~/.dotnet/bin/ | dotnet-install | Real binaries, flat layout |
dotnet-install itself lives at ~/.dotnet/bin/dotnet-install.
Override with DOTNET_TOOL_BIN env var, -o, or
--local-bin (~/.local/bin/).
dotnet-install <args>
# or via dotnet prefix matching:
dotnet install <args>
When working in this repo (development):
dotnet run --project src/dotnet-install -- <args>
The tool lives at src/dotnet-install/ in this repo:
Program.cs — CLI entry pointCommandLineBuilder.cs — System.CommandLine command/option
definitions and handler wiringInstaller.cs — Core install logic: project eval,
dotnet publish, single-file placement,
NuGet package install, file-based app supportGitSource.cs — Git clone/fetch from GitHub repos,
project discovery, .dotnet-install.json manifestShellHint.cs — PATH detection, shell-specific
setup instructions, DOTNET_TOOL_BIN env varDoctorCommand.cs — Shell PATH config and
environment checks (doctor)EnvCommand.cs — Print environment info (cargo env style)ProjectSelector.cs — Interactive arrow-key selector
for repos with multiple executable projectsListCommand.cs — Lists installed toolsRemoveCommand.cs — Removes installed toolsUpdateCommand.cs — Updates installed toolsSearchCommand.cs — Search NuGet for packagesInfoCommand.cs — Show tool details and provenanceOutdatedCommand.cs — Check for newer versionsCompletionCommand.cs — Shell completion setupSkillCommand.cs — Prints embedded skill definitionskill.md — Embedded skill for AI assistants (end-user)HelpWriter.cs — Markout-based help formattingEvery source installs to ~/.dotnet/bin: --package,
--repo, --github, --project, and bare positional paths.
This matches cargo install and go install — you point at a
thing, you get a tool on PATH. There is a single install
location; -o <dir> overrides it, and --local-bin selects
~/.local/bin. Nothing about a repo's contents changes where
a tool lands.
dotnet install with no args treats the current directory as
the source, like dotnet publish. --help prints help.
The two source-build gestures differ only in what they read:
dotnet install <path>, or no argument (meaning the current
directory), looks for a project. It never reads
.dotnet-install/.dotnet-install.json.dotnet install --repo <path> builds what the repo
advertises in that manifest — one tool or a toolset.Builds and installs from a local project directory.
Supports both .csproj projects and file-based apps (.cs with #:property directives).
The tree is scanned for executable projects. If several are found,
the interactive selector is shown only when a path was named —
the bare command lists candidates and exits non-zero instead, so it
never prompts unasked (important for scripts and agent loops).
dotnet install # current dir, never prompts
dotnet install . # current dir, enables the picker
dotnet install src/my-tool # subdirectory
dotnet install ~/git/my-tool # explicit path
dotnet install app.cs # file-based app
--repo / --github)Clones (or fetches) a repo, discovers the advertised project,
builds, and installs globally.
--repo takes a git URL (clone) or a local repo path (build in place);
--github owner/repo is shorthand for a --repo GitHub URL.
--git is a deprecated hidden alias for --repo.
dotnet install --repo https://example.com/some/repo.git
dotnet install --repo ../some/local/repo
dotnet install --github richlander/dotnet-runtimeinfo
dotnet install --github richlander/dotnet-runtimeinfo@v3.0.1
dotnet install --github richlander/dotnet-runtimeinfo --ssh
dotnet install --github richlander/dotnet-runtimeinfo --project dotnet-runtimeinfo.csproj
--repo/--github require the repo to advertise a tools
array in .dotnet-install/.dotnet-install.json, unless
--project names one explicitly. If the user types
owner/repo without --github, the tool prompts for
confirmation before cloning (anti-typosquatting).
Downloads and installs a pre-built tool from NuGet.
dotnet install --package dotnet-inspect
dotnet install --package dotnet-inspect@0.16.0
--repo)A repo advertises its toolset in
.dotnet-install/.dotnet-install.json. Each entry in tools
names exactly one source:
| Source | Means | Optional |
|---|---|---|
project | repo-relative .csproj or .cs app | |
package | NuGet package id | version |
repository | owner/repo on GitHub | ref |
All three can be mixed, so a manifest can describe a whole
environment, not just what the repo builds. Each installed
tool records its own source, so update pulls it from where
it actually came from.
Positional args can mix sources. When multiple args are given, confirmation prompts are skipped.
dotnet install dotnet-inspect dotnet-runtimeinfo # two NuGet packages
dotnet install richlander/dotnet-runtimeinfo app.cs # GitHub + local file-based app
dotnet install ls # list installed tools
dotnet install rm <tool> # remove one or more tools
dotnet install update <tool> # update installed tools
dotnet install search <query> # search NuGet
dotnet install info <tool> # show tool details
dotnet install outdated # check for newer versions
dotnet install doctor # configure PATH + DOTNET_TOOL_BIN
dotnet install env # print environment info
dotnet install completion # shell completion setup
--package, --github, --repo) skip all prompts--repo/--github require the
repo to advertise a tools array in
.dotnet-install/.dotnet-install.json (or name one with
--project)dotnet tool installdotnet publish and suggests
--package as the SDK-free alternative# Build
dotnet build src/dotnet-install/dotnet-install.csproj
# Run (via dotnet run)
dotnet run --project src/dotnet-install/dotnet-install.csproj -- <args>
# Tests
dotnet test test/dotnet-install.Tests/dotnet-install.Tests.csproj
CommandLineBuilder.csHelpWriter.cs)net10.0 with
PublishAot=true — all code must be AOT-compatibleManifestContext in
GitSource.cs)"error: <message>" to stderrdotnet tool install)~/.nuget/git-tools/<owner>/<repo>/--project > manifest >
auto-detect Exe > file-based apps (≤12 → selector)DESIGN.md for full architecture rationale