Add azd tool install/upgrade azure-skills with per-host selection#8704
Add azd tool install/upgrade azure-skills with per-host selection#8704hemarina wants to merge 23 commits into
azd tool install/upgrade azure-skills with per-host selection#8704Conversation
Reword comments to satisfy cspell: CLI's->CLI, prereq->prerequisite, recognise->recognize, and avoid the 'dotall' term. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR extends azd tool to support installing “skill” plugins via an existing agentic CLI host on the user’s PATH, adding azure-skills (microsoft/azure-skills) as the first built-in skill entry. It introduces a new tool category and adds host-specific install/update/list command metadata, plus detection and installer flows that run the host CLI interactively.
Changes:
- Added
ToolCategorySkill+ per-hostSkillHostdefinitions and registered theazure-skillsbuilt-in tool. - Implemented skill detection (
plugin list/extensions listparsing) and skill install/upgrade flows (marketplace add handling, host selection, verification retries). - Updated Copilot agent required plugin source to the new
microsoft/azure-skillsplugin manifest path and added unit tests covering the skill installer behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
cli/azd/pkg/tool/manifest.go |
Adds the new “skill” tool category, SkillHost model, registers azure-skills, and updates the Azure MCP Server website field. |
cli/azd/pkg/tool/manifest_test.go |
Updates built-in tool expectations and adds skill-specific registry assertions. |
cli/azd/pkg/tool/installer.go |
Adds a skill-specific install/upgrade execution path with host selection, marketplace add, and verification retries. |
cli/azd/pkg/tool/installer_test.go |
Adds table-driven tests for host selection, prereqs, marketplace idempotency, and codex upgrade behavior. |
cli/azd/pkg/tool/detector.go |
Adds skill detection logic using per-host list commands and regex-based version extraction. |
cli/azd/internal/agent/copilot_agent_factory.go |
Updates required Copilot plugin source to the new azure-skills repo path. |
…na/azd-tool-skill-plugins
…hemarina/azure-dev into hemarina/azd-tool-skill-plugins
…o support in future once data is increase.
azd tool install/upgrade azure-skills with per-host selection
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Add
azd tool install/upgrade azure-skillswith per-host selectionFixes #8596.
Adds
azure-skillsas a built-inToolCategorySkill, so users can install,upgrade, and inspect the Microsoft Azure Skills plugin
(
microsoft/azure-skills) throughwhichever supported agentic CLI they already have on
PATH:Supported hosts
The skill installs through an agentic CLI host's native plugin commands. Two
hosts are supported today (apm/codex/gemini were dropped for now due to low
traffic and may return as usage grows):
copilot)plugin marketplace add microsoft/azure-skills→plugin install azure@azure-skillsplugin update azure@azure-skillsplugin listclaude)plugin marketplace add https://github.com/microsoft/azure-skills→plugin install azureplugin update azure@azure-skillsplugin list azure@azure-skillsHost selection (
--host, on both install and upgrade)--host copilot/--host claude— target specific host(s). Comma-separatedor repeatable:
--host copilot,claudeor--host copilot --host claude. Eachnamed host must be a configured host that is on
PATH, otherwise adescriptive error names the supported hosts.
--host all— target every detected host. Cannot be combined with specificnames.
Install, without
--host:azd tool install azure-skills) with a single host onPATH→ that preferred host.choose (
--host <host>or--host all) rather than silently picking one.--allor the interactive picker) → installs throughevery available host, resolved at run time so a host CLI installed earlier
in the same batch is picked up. (This is also why
--alldoes not abort whenseveral hosts are present.)
Upgrade, without
--host: refreshes every host the skill is currentlyinstalled through (not just the first), so a multi-host install stays fully up
to date; it never runs an update against a host that never installed it, falling
back to the preferred host.
Upgrade
--host all: targets only the on-PATHhosts that actually have theskill; hosts that are present but do not have it are skipped with a warning
(
Skipping upgrade for <host>: Azure Skills is not installed on it.), and anerror is returned only when no available host has it.
Install / upgrade behavior
"already registered/added" response as idempotent success), then the plugin
install, and verifies via the host's plugin list with retry + exponential
backoff (the initial backoff is injectable so tests stay fast).
confirms the skill is detectable through host X specifically (via
DetectSkillHosts) and records that host's version. Verifying via the genericdetector would report success whenever any host already had the skill — so
--host claudewhile copilot already had it could be falsely reported assuccess with copilot's version.
Prerequisites
PATH,install fails with an
errorhandler.ErrorWithSuggestionthat points the userat
azd tool install github-copilot-cliand links the Copilot CLI installdocs.
nodeis missing, a warning is written to stderr(the Azure MCP server needs Node.js via
npx) and the install proceeds.Writing to stderr keeps
azd tool install --output jsonstdout clean.Detection
detectSkillruns each host's plugin-list command and uses a two-stage gate:PluginNamemust appear in stdout, then the host'sVersionRegexmust capture aversion (the authoritative existence signal, since some hosts echo the queried
name even when the plugin is not installed).
DetectSkillHostsprobes allconfigured hosts and returns each one the skill is installed through together
with its version (
InstalledSkillHost{Host, Version}), which drives themulti-host upgrade and the host-scoped install verification above.
Agent integration
internal/agent/copilot_agent_factory.go— the Copilot session'srequiredPluginssource is updated tomicrosoft/azure-skills:.github/plugins/azure-skills(the canonical Copilotplugin directory, whose
.plugin/plugin.jsondeclaresname: "azure"). Boththis agent-bootstrap path and
azd tool install azure-skillsland a plugin namedazure, and the agent dedupes required plugins on that name, so the two paths donot double-install.
Files changed
pkg/tool/manifest.goToolCategorySkill,SkillHoststruct,azureSkills()registration (copilot, claude)pkg/tool/detector.godetectSkill,DetectSkillHosts,InstalledSkillHost{Host, Version}pkg/tool/installer.go--host all, per-host install + host-scoped verify, injectable retry backoffpkg/tool/manager.goInstallTools/UpgradeToolsoptions,AvailableSkillHostscmd/tool.go--hostflag on install & upgrade, host-option resolution, multiple-host guidanceinternal/agent/copilot_agent_factory.gorequiredPluginssource*_test.go,cmd/testdata/*Verification
go build ./...✓go test ./pkg/tool/... ./cmd ./cmd/middleware ./internal/agent✓go vet ./...— cleanUPDATE_SNAPSHOTS=true go test ./cmd -run 'TestFigSpec|TestUsage'— snapshots updated