AGENT SKILL

Discovery 入门工具包部署

discovery-services-starter-kit-deployer

端到端部署 Discovery 目录中的入门工具包(starter-kit):验证 kit.json 中的 agentRefs、构建并部署每个引用的智能体工具、逐一部署每个引用的智能体,并汇总已部署的智能体/工具以及可直接提供给客户的示例提示词。当用户要求部署 Discovery 入门工具包,或部署 starter-kits/*/kit.json 中列出的所有智能体时使用此技能。

适用职业SRE 工程师
License 许可
MIT
最近更新
2026-11-14
Stars
★ 289
Forks
101

01 前言 Front Matter

name
discovery-services-starter-kit-deployer
description
Deploy Discovery catalog starter-kits end-to-end: validate kit.json agentRefs, build and deploy every referenced agent tool, deploy each referenced agent individually, and summarize deployed agents/tools plus customer-ready sample prompts. Use this skill whenever the user asks to deploy a Discovery starter-kit or deploy all agents listed in starter-kits/*/kit.json.
allowed-tools
shell

02 资源文件 2

03 SKILL.md 正文

Discovery Starter-Kit Deployer

Compatibility

Runs on Windows, macOS, and Linux through PowerShell 7+ (pwsh). Requires git, python with pip, and Azure CLI (az). Docker is optional because the runner can use Azure Container Registry Tasks when local Docker is unavailable.

New configurations default to Discovery GA 2026-06-01. Explicit preview versions in local configs and saved runs remain unchanged; knowledge-base bindings are validated against the selected API version.

What this skill does

Deploy a starter-kit from starter-kits\ as individual Discovery prompt agents:

pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 <starter-kit-name>

The runner reads starter-kits\<starter-kit>\kit.json, validates every top-level agentRefs[].ref resolves to an existing agents\<agent>\ folder, builds every tool from those agents, deploys the tool resources in parallel, patches each referenced source agent with its own deployed tool resource ids, deploys all referenced agents in parallel, and prints a summary of deployed agents, deployed tools, and all top-level samplePrompts the customer can run manually.

For each deployed agent, the runner sets humanInTheLoop and every bound tool's confirmation to Disabled, even if the source YAML enables them. This persists for subsequent uses of the deployed agents; source YAML files remain unchanged. It does not bypass Supercomputer nodepool confirmation or approval requests in agent instructions. Starter-kit deployment does not run validation or create conversations.

When to use

Use this skill for requests like:

  • "/discovery-services-starter-kit-deployer drug-discovery"
  • "Deploy the protein-structure-analysis starter-kit"
  • "Deploy the agents in this starter-kit"
  • "Deploy all agents referenced by this starter-kit kit.json"

If the user only wants one agent deployed, use discovery-services-agent-deployer instead. If the user only wants inventory, use discovery-catalog.

Customer inputs

Parameter Purpose
<starter-kit-name> or -StarterKitName <name> Starter-kit folder name directly under starter-kits/. Required for init and -WhatIfPlan.
-PublisherName <name> Deprecated. Tolerated for backwards compatibility but ignored — kits live in the flat starter-kits/<kit-name>/ layout with no publisher folder. The deployer prints a one-line deprecation notice when the flag is supplied.
-BuildMode remote|local Required for every new starter-kit deployment during init; ask the customer to choose. remote queues ACR builds; local uses local Docker and pushes to ACR. Do not store build mode in config.json.
-Stage init|build-tools|deploy-tools|deploy-agent|summary|stop Runs exactly one stage so Copilot TODOs can advance between commands.
-RunDir <RunDir> Required with -Stage after init.
-KnowledgeBasesJson <json-or-path> Required during init when any referenced agent declares discoveryExtensions.knowledgeBases. Pass either inline JSON or a path to a JSON file keyed by agent name.
-ConfirmSupercomputerNodepools Run-scoped confirmation that the customer chose Proceed for the current run's tool/SKU plan. Pass it to init if the confirmation was collected before the run directory is created, or to the rerun of build-tools if the runner requested confirmation there. Do not store this in config.json.
-WhatIfPlan Prints kit discovery, agentRefs, and stage plan without Azure calls.

Local environment values live in .github\skills\discovery-services-starter-kit-deployer\config.json, copied from config.template.json. If that file is absent, the runner falls back to .github\skills\discovery-services-agent-deployer\config.json for the shared Azure/Discovery settings; starter-kit config values override the fallback when both files exist. The populated files are intentionally gitignored; never commit them. Build mode and Supercomputer nodepool confirmation are per-run choices, not config values; never write buildMode or confirmSupercomputerNodepools to config.json, and ignore/remove stale copies if they are present from older runs. During full deployment init, the runner checks required config before asking for build mode. If it emits CONFIG_INPUT_REQUIRED=true, ask the user only for the fields listed in CONFIG_FIELDS_TO_COLLECT, keep the optional defaults shown in the suggested config shape, write the ignored starter-kit config.json only when the fallback does not already provide the values, and rerun init. Only after config is complete, if the runner emits BUILD_MODE_INPUT_REQUIRED=true, ask the customer to choose remote or local, then rerun init with -BuildMode <choice>. For build-tools, first show the tool/SKU nodepool plan and collect the Proceed/Stop decision before asking for Azure build config. build/deploy-tools need subscriptionId, resourceGroup, acrName, and location; set optional acrResourceGroup when the ACR registry is in a different resource group than the Discovery deployment resources. forceToolImageRebuild must be explicitly present in either deployer config; set it to true only when build-tools should rebuild and repush images even if the same repository:tag already exists in ACR, otherwise set it to false. deploy-agent needs workspaceEndpoint, project, tenantId, and chatModel. Do not invent missing values.

When .github\skills\discovery-services-starter-kit-deployer\config.json is missing or still contains template placeholders, ask the customer for these values and create the ignored config file:

Config field Ask the customer for
subscriptionId Azure subscription id that contains the Discovery resources and ACR.
resourceGroup Resource group for Discovery tool and agent resources.
acrName Azure Container Registry name without .azurecr.io.
acrResourceGroup Optional ACR resource group when different from resourceGroup; otherwise use the same value as resourceGroup.
location Discovery region. Present eastus, swedencentral, and uksouth as the supported choices, and allow a freeform text value only for future expansion or explicit customer override.
workspaceEndpoint Discovery workspace endpoint, for example https://<workspace>.workspace.discovery.azure.com.
project Discovery project name.
tenantId Azure tenant id GUID.
chatModel Chat model deployment name for the deployed agents.
forceToolImageRebuild Whether to rebuild tool images even when the same ACR repository:tag already exists; ask explicitly and default to false unless the customer asks to force rebuilds.

For location, use a multiple-choice prompt with eastus, swedencentral, and uksouth, while still allowing freeform input. Discovery currently supports only those three regions; treat any other value as an explicit future-expansion override from the customer.

Workflow

  1. For planning or uncertain names, run -WhatIfPlan first.
  2. Validate the starter-kit exists at starter-kits\<starter-kit>\kit.json.
  3. Parse agentRefs[].ref and ensure every referenced agents\<agent>\agent.yaml exists before creating deployment TODOs.
  4. Create the native Copilot TODO list only after starter-kit preflight succeeds.
  5. Run stages from the repo root. Keep all starter-kit-level run artifacts under starter-kits\tmp\<starter-kit>\<timestamp>\. For every new starter-kit run, choose remote or local build mode during init; do not let auto proceed silently.
  6. During init, the runner scans every referenced agent.yaml for discoveryExtensions.knowledgeBases. Knowledge bases are not deployed by this skill. If any are declared, the runner emits KNOWLEDGE_BASE_INPUT_REQUIRED=true plus one KNOWLEDGE_BASE_REQUIRED agent=<name> count=<n> line per affected agent and a suggested JSON shape. Ask the user to provide the actual knowledgeBaseId values in /bookshelves/{bookshelf_name}/knowledgeBases/{knowledgebase_name} format for GA 2026-06-01 (the default). Explicit preview configs also accept a /versions/{version} suffix; GA rejects it. Follow the runner's KNOWLEDGE_BASE_ID_FORMAT; do not silently strip versions. Save the IDs to a temporary JSON file or pass inline JSON, and rerun init with -KnowledgeBasesJson <json-or-path>. The JSON must be keyed by agent name and each value must be an array of objects with knowledgeBaseId; the runner stores these values in run-state.json and patches each agent before deployment.
  7. Before building tools, run the runner's build-tools stage without -ConfirmSupercomputerNodepools so it prints the authoritative TOOL_BUILD_PLAN lines, writes <RunDir>\build-plan.json, and pauses with TASK_STATUS=build-tools:input_required. Do not use rg, grep, or ad-hoc file scanning to inspect generated tool.yaml files; those tools may not be installed in the customer's shell, and the runner already parses recommended_sku choices consistently. Show the customer every tool image and the recommendedSkus choices from the TOOL_BUILD_PLAN output or BUILD_PLAN_JSON path. Explain that the SKUs listed for a tool are alternative nodepool choices, not cumulative requirements; the customer needs capacity for at least one listed SKU per tool. Then ask whether to proceed or stop based on their Supercomputer nodepool capacity. Use ask_user with choices Proceed - I have Supercomputer nodepool capacity for at least one listed SKU per tool and Stop - I do not have the required Supercomputer nodepool capacity. Ask this at most once per run. If they choose Proceed after build-tools requested confirmation, rerun build-tools with -ConfirmSupercomputerNodepools; do not persist that confirmation in config.json because it must be reconfirmed for every new starter-kit run. If they choose Stop, do not run build-tools; immediately run -Stage stop -RunDir <RunDir> so the runner emits TASK_STATUS=<stage>:stopped for every full-deployment task (init, build-tools, deploy-tools, deploy-agent, summary), even if init had already completed. Existing ACR tags are reused by default; forceToolImageRebuild: true overrides reuse and queues a rebuild for the same tag. In remote mode, submit all required ACR builds first, then track every run independently; if any build fails, stop the deployment and report the failed tool list. Agents without tools\*\tool.yaml are recorded as skipped.
  8. Deploy every built tool in the deploy-tools stage and capture each Microsoft.Discovery/tools/<tool> resource id. The runner deploys tool resources in parallel.
  9. Deploy every referenced source agent individually in the deploy-agent stage. The runner patches each agent's discoveryExtensions.tools to point to the tool resources deployed for that agent, patches discoveryExtensions.knowledgeBases with user-provided knowledge base ids when required, writes run-local patched YAML files under <RunDir>\agents\, and upserts the agents in parallel. It does not synthesize a combined starter-kit agent.
  10. Do not create an investigation as part of starter-kit deployment. The final summary lists the sample prompts the customer can run after deployment.
  11. Report only the final summary printed by the runner.

Copilot task tracking

When a TODO UI is visible, create these starter-kit TODOs after kit.json and agentRefs pass preflight:

For full deployment requests, create:

  1. init - discover starter-kit, validate plugin, collect config, create starter-kits\tmp\<starter-kit>\<timestamp>
  2. build-tools - build and push all referenced agent tool images
  3. deploy-tools - create or update every Discovery tool resource in parallel
  4. deploy-agent - deploy every referenced agent individually in parallel
  5. summary - print deployed agents, tools, and customer-ready prompts

Run stage-at-a-time when TODOs are visible:

pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 drug-discovery -Stage init
pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 -RunDir <RunDir> -Stage build-tools
pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 -RunDir <RunDir> -Stage deploy-tools
pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 -RunDir <RunDir> -Stage deploy-agent
pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 -RunDir <RunDir> -Stage summary

If the customer chooses Stop at the Supercomputer nodepool confirmation prompt, run:

pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 -RunDir <RunDir> -Stage stop

Mark each TODO done only after the command exits successfully or emits TASK_STATUS=<stage>:done. If the runner emits TASK_STATUS=<stage>:input_required, keep that stage as waiting for input rather than failed, collect only the fields or confirmation requested by the runner, then rerun the same stage with -RunDir <RunDir>. If a stage fails, mark it failed and report the exact stage command with -RunDir <RunDir>.

Reporting contract

When the runner completes, summarize:

  • RUN_DIR
  • STARTER_KIT
  • referenced AGENTS
  • stage statuses from stage-todos.json and summary output
  • deployed AGENT_DEPLOYED names and run-local AGENT_YAML files
  • deployed TOOL_DEPLOYED values
  • numbered, complete sample prompts from kit.json, introduced with "You can now try any of the following prompts to test the deployment:"

If the runner fails, report the failed stage and required action from the output. Include the exact stage command with -RunDir <RunDir> for recoverable failures, except when the customer chose Stop for Supercomputer nodepool capacity; in that case, do not provide a direct PowerShell rerun command and say exactly: "When you have Supercomputer nodepool capacity for at least one of the listed SKUs per tool, rerun the skill."

04 同仓库更多 Skills

microsoft
microsoft/discovery

quickstart-runner

Follow a supplied full QuickStart Scenario guide and its exact input files from a fresh Discovery project. Use for run this QuickStart, BioPharma, SiPhy, CMS or Bookshelf setup. Check readiness, obtain separate setup and execution approvals, and validate actual outputs. Do not replace the guide with a generated profile or infer permission from examples.

★ 289
microsoft
microsoft/discovery

token-estimator-mvp

Estimate AI planning ranges from a work description or explicitly authorized safe project context. Provides coarse class ranges or conditional planning bases without requiring token guesses.

★ 289
microsoft
microsoft/discovery

build-research-paper

Cross-domain / Scientific writing and publication — Build beautifully-formatted, arxiv-ready research paper PDFs from a mix of hand-authored LaTeX and/or markdown + PNG figures, using `tectonic` (default) or `pandoc` (escape hatch). Captures the reusable pattern that research projects keep re-discovering: `report/main.tex` + `references.bib` + `generate_figures.py` + iterative feedback/response scaffolding, all buildable with a single command. WHEN: write a research paper, arxiv submission, prepub, generate PDF from markdown, LaTeX paper, build main.tex, journal manuscript, referee revision, response to referee, resubmission package, publication-quality figures, matplotlib publication style, tectonic build, pandoc build, generate arxiv-ready PDF, bibliography from BibTeX.

★ 289
microsoft
microsoft/discovery

Discovery 示例智能体导入

add-example-agents

从公共的 microsoft/discovery GitHub 仓库将智能体添加到此工作区,方式可以是:(a) 本地方式,用于 Copilot 应用,为每个智能体生成一个 `.agent.md` 伴随文件(以便每个智能体都可通过 `runSubagent` 调用);(b) 通过 `UpsertAgent` 将上游最新来源的智能体添加到 Microsoft Discovery 项目(存在时绑定已有的工具 ARM 资源,缺失时先在 Azure 中构建、推送并注册这些资源);或 (c) 将已添加到本地 Copilot 应用的智能体(来源于其 `.github/agents/<name>.agent.md` 伴随文件;带工具的智能体还带有 `discovery_catalog/<name>/` 文件夹以及本地构建的工具容器,而无工具的智能体仅有伴随文件)提升到指定的 Microsoft Discovery 项目 + Azure,且不再从上游重新获取或刷新。用户每次运行只能从这三个目标中精确选择一个。适用场景:'添加 discovery 智能体''下载 discovery 智能体''安装所有 Microsoft discovery 智能体''从 microsoft/discovery 添加智能体''从 microsoft/discovery 创建 copilot 智能体''将 discovery 智能体部署到 Foundry''将 discovery 智能体部署到 Azure''将本地智能体提升到 Microsoft Discovery''将本地智能体及其容器推送到 Discovery 项目''将本地应用智能体复制到 Azure'。始终将上游仓库 `agents/<name>/` 下每个选中的子文件夹刷新到 `discovery_catalog/<name>/`,使本地目录保持最新(出现新智能体、显现已移除的智能体、应用更新后的内容)。判断智能体是否"已在本地添加"使用 `.github/agents/<name>.agent.md`(Copilot 伴随文件),而非 `discovery_catalog/` 文件夹。对于本地部署,每个生成的 `.agent.md` 都带有延迟的 Docker 引导前言,使智能体仅在首次使用且工具镜像不存在时才构建该镜像。对于 Discovery + Azure 部署,会针对工作区的资源组(RG)通过 `GetDiscoveryTool` 对每个声明的工具进行预检,并**在工具已存在时完全跳过 Docker 构建 / ACR 推送 / AcrPull RBAC**(这在 `mdqacr` 等注册表上的共享目录镜像中很常见);仅构建并注册实际缺失的工具。始终通过 `UpsertAgent` 在选定的 Discovery 项目中创建智能体,并轮询 `GetAgent` 直到 `provisioningState=Succeeded`(MCP 的 `GetAgentOperation` 工具在实践中会返回不透明错误;切勿依赖它)。所有 MCP 调用都通过嵌入在本 SKILL.md 中、并在步骤 4d 期间具体化为 `.vscode/` 的 PowerShell 脚本进行——该技能不依赖同级的辅助文件,也不依赖 VS Code MCP 运行时在会话中途浮现 `mcp_microsoft-dis_*` 工具。通过 `agents action=create` 进行的本地 Discovery 运行时注册是可选的,默认跳过。不要用于:运行已部署的智能体(使用 runSubagent),或编辑单个智能体的提示词(直接编辑 `agent.yaml`)。

AI 工程师智能体开发
★ 289
microsoft
microsoft/discovery

Podman Containerfile 迁移

migrate-podman-containerfile

将 Podman Containerfile 迁移为 Discovery 目录要求的规范 Dockerfile。当 PR 未通过 POL-022 检查、某个工具包含 Containerfile 或 Dockerfile.in,或贡献者要求将 Podman 构建文件转换为 Docker 构建文件时使用。仅在迁移在机械上安全时直接创建 Dockerfile,并拒绝处理存在歧义的预处理或多文件构建。

SRE 工程师云原生计算与容器编排
★ 289
microsoft
microsoft/discovery

Discovery 智能体端到端部署

discovery-services-agent-deployer

通过一个命令端到端部署 Discovery 目录中的智能体:发现智能体、在存在工具时构建并绑定该工具、对没有工具的智能体跳过工具相关阶段、部署智能体,并可选择运行验证。当用户要求部署 Discovery 智能体、发布或重建智能体工具镜像、从仓库中的 Dockerfile/tool.yaml 注册 Discovery 工具、恢复失败的部署,或为该目录中的某个智能体生成预演(dry-run)部署计划时使用此技能。

SRE 工程师部署与发布管理
★ 289