discovery-services-agent-deployer
Skill286 starsChanged 6 months agoMITView on GitHub
Deploy Discovery catalog agents end-to-end with one command: discover the agent, build and bind its tool when present, skip tool stages for agents without tools, deploy the agent, and optionally run validation. Use this skill whenever the user asks to deploy a Discovery agent, publish or rebuild an agent tool image, register a Discovery tool from a repo Dockerfile/tool.yaml, resume a failed deployment, or produce a dry-run deployment plan for an agent in this catalog.
In this repository8 other files it gives its agents.
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 6 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Use this skill for requests like:
- Very specific: line 39
If the user only wants inventory, use the discovery-catalog skill instead.
- Very specific: line 63
Before creating native Copilot TODOs, validate every requested agent exists at agents/<agent-name>/agent.yaml.
- Distinctive: line 64
If any requested agent is missing, do not create deployment TODOs.
- Distinctive: line 65
After validation succeeds and before starting deployment work, create the native Copilot TODO list for every requested agent.
- Very specific: line 67
If the runner emits CONFIG_INPUT_REQUIRED=true, ask the user for the listed values in Copilot chat, write the ignored config.json, then …
- Very specific: line 68
If the runner emits BUILD_MODE_INPUT_REQUIRED=true, ask the user to choose remote or local, then rerun with -BuildMode <choice>.
- Very specific: line 70
Before validation for tool-backed agents, use this priority order for the validation prompt: explicit -ValidationPrompt, then non-empty …
- Very specific: line 71
If validation fails or semantically reports blocked/failed output, mark validate failed and summary stopped.
- Very specific: line 72
If a stage fails, fix the reported issue and rerun with -Resume <RunDir>, except for nodepool Stop where the user should rerun the skill …
- Very specific: line 102
If no task/TODO UI is available, use the concise [runner] START/DONE/SKIP lines and stage-todos.json as the progress record.
- Distinctive: line 106
Use this pattern when native Copilot TODOs are visible:
- Distinctive: line 118
After each command returns, update the matching native TODO before issuing the next command.
- Distinctive: line 160
When the runner completes, summarize:
- Very specific: line 169
If the runner fails, report the failed stage, the action required from the script output, and the exact -Resume <RunDir> command when a run …
- Very specific: line 177
Keep SKILL.md lean. Prefer the single public runner and references over ad-hoc scripts or long manual instructions.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Discovery Agent 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. See configuration for version-specific validation routes and knowledge-base binding formats.
What this skill does
Deploy one or more Discovery catalog agents from this repository with a single deterministic runner:
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 <agent-name>The single PowerShell script discovers the agent folder, selects its tool folder when present, builds and pushes the image, creates or updates the Microsoft.Discovery/tools resource, patches a run-local copy of agent.yaml, deploys the agent, validates it with a temporary investigation, and prints a final summary. If the agent has no tool, it skips build and deploy-tool and continues with agent deployment. It persists stage status to stage-todos.json in the run directory so the invoking assistant can keep native Copilot task tracking in sync without duplicating progress logs.
Agent deployment 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 agent, not just validation. The source YAML is unchanged. This does not bypass Supercomputer nodepool confirmation, platform-required actions, or approval requests in agent instructions; unexpected validation approvals still require user input.
When to use
Use this skill for requests like:
- "/discovery-services-agent-deployer
chembl" - "/discovery-services-agent-deployer
chemblaizynthfinder" - "Deploy the
aizynthfinderagent" - "Build and publish the tool image for this Discovery agent"
- "Create the Discovery tool resource from this agent's Dockerfile and tool.yaml"
- "Resume the failed deployment in this run folder"
- "Show me what would be deployed for this agent before running it"
If the user only wants inventory, use the discovery-catalog skill instead.
Customer inputs
The happy path needs only the agent name. Optional parameters reduce rework or make automation explicit:
| Parameter | Purpose |
<agent-name> [agent-name...] or -AgentName <name>[,<name>...] | Agent folder name under agents/. Positional names are preferred for slash-style use such as /discovery-services-agent-deployer chembl aizynthfinder. Required unless resuming. |
-PublisherName <name> | Deprecated. Tolerated for backwards compatibility but ignored — agents live in the flat agents/<agent-name>/ layout with no publisher folder. The deployer prints a one-line deprecation notice when the flag is supplied. |
-BuildMode auto|remote|local | Defaults to auto; if input is required, ask the customer for remote or local. Do not store build mode in config.json. |
-Resume <RunDir> | Continues from a prior checkpointed run. |
-Stage init|build|deploy-tool|deploy-agent|validate|summary|stop | Runs exactly one stage, allowing Copilot to update native TODOs between terminal commands. |
-RunDir <RunDir> | Required with -Stage after init. |
-ConfirmSupercomputerNodepools | Run-scoped confirmation that the customer chose Proceed for the current run's tool/SKU plan. Do not store this in config.json. |
-ValidationPrompt <prompt> | Run-scoped validation prompt generated by Copilot from the deployed agent/tool context. Overrides config testPrompt for this run. |
-SkipValidation | Deploys without the post-deploy investigation test. |
-WhatIfPlan | Prints repo discovery and planned stages without Azure calls. |
Local environment values live in .github/skills/discovery-services-agent-deployer/config.json, copied from config.template.json. The populated file is intentionally gitignored; never commit it. Never assume the file exists. Stage 1 must verify these required values are present: subscriptionId, resourceGroup, acrName, location, workspaceEndpoint, project, tenantId, chatModel, and forceToolImageRebuild. acrResourceGroup is optional and is used when ACR is in a different resource group from Discovery resources. testPrompt is optional; when present and non-empty it overrides Copilot-generated validation prompts. For every missing required value, ask the user only for fields listed in CONFIG_FIELDS_TO_COLLECT; do not choose from examples or defaults yourself. Do not store buildMode or confirmSupercomputerNodepools in config.json; both are per-run choices.
Workflow
- For planning or uncertain agent names, run
-WhatIfPlanfirst. - Before creating native Copilot TODOs, validate every requested agent exists at
agents/<agent-name>/agent.yaml. - If any requested agent is missing, do not create deployment TODOs; stop and ask the user to fix the name.
- After validation succeeds and before starting deployment work, create the native Copilot TODO list for every requested agent.
- For deployment, invoke the single runner from the repo root.
- If the runner emits
CONFIG_INPUT_REQUIRED=true, ask the user for the listed values in Copilot chat, write the ignoredconfig.json, then rerun the stage. Do not fill missing fields from defaults, examples, or prior assumptions without a user answer. - If the runner emits
BUILD_MODE_INPUT_REQUIRED=true, ask the user to chooseremoteorlocal, then rerun with-BuildMode <choice>. Do not writebuildModetoconfig.json. - Before building a tool, show the
TOOL_BUILD_PLANwith image andrecommendedSkus. When the runner emitsSUPERCOMPUTER_NODEPOOL_CONFIRMATION_REQUIRED=true, stop immediately and ask the customer the exact question in theCOPILOT SUPERCOMPUTER NODEPOOL INPUT REQUESTblock through the assistant choice-prompt UI, not as plain text. In this CLI, use theask_usertool with exactly these choices:Proceed - I have Supercomputer nodepool capacity for at least one listed SKU.andStop - I do not have the required Supercomputer nodepool capacity.Do not continue, do not infer Proceed, and do not run with-ConfirmSupercomputerNodepoolsuntil the customer explicitly chooses Proceed. If Proceed, rerun the build with-ConfirmSupercomputerNodepools; if Stop, run-Stage stop -RunDir <RunDir>. - Before validation for tool-backed agents, use this priority order for the validation prompt: explicit
-ValidationPrompt, then non-empty configtestPrompt, then Copilot-generated prompt. If the runner emitsVALIDATION_PROMPT_INPUT_REQUIRED=true, do not ask the user; generate the prompt yourself from theCOPILOT VALIDATION PROMPT REQUESTblock and rerun-Stage validate -ValidationPrompt "<generated prompt>". - If validation fails or semantically reports blocked/failed output, mark
validatefailed andsummarystopped. Readvalidation-result.jsonwhen available. - If a stage fails, fix the reported issue and rerun with
-Resume <RunDir>, except for nodepool Stop where the user should rerun the skill later after capacity is available. - Report the final summary printed by the runner; do not invent status from partial logs.
For slash-style requests like /discovery-services-agent-deployer chembl aizynthfinder, treat the words after the skill name as positional agent names and invoke the runner as:
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 chembl aizynthfinderCopilot task tracking
When running in VS Code GitHub Copilot or any environment that exposes a task/TODO UI above the prompt, the native TODO list is required for deployments. Create the TODOs only after all requested agent names pass preflight validation, but create them before invoking the long-running deployment path.
For agents with a tool, create the six-stage TODO list:
init- discover agent, validate prerequisites, collect config, create run directorybuild- build and push the tool imagedeploy-tool- create or update the Discovery tool resourcedeploy-agent- patch the run-local agent YAML and deploy the agentvalidate- run the post-deployment investigation test, unless-SkipValidationis setsummary- print and report final deployment summary
For agents without a tool, create only the four relevant TODOs: init, deploy-agent, validate, and summary. Do not create native TODO items for build or deploy-tool; the runner skips those stages internally.
To keep the native TODO UI accurate, use stage-at-a-time execution instead of one long end-to-end command whenever the TODO UI is visible. Mark the matching TODO in_progress, run exactly one stage, then mark it done only after the command exits successfully or emits TASK_STATUS=<stage>:done. If the runner emits TASK_STATUS=<stage>:input_required, collect the requested input in Copilot chat and rerun the same stage rather than marking it failed. For nodepool input, present the Proceed/Stop question through the available choice-prompt mechanism (ask_user in this CLI), never as a plain-text “reply with Proceed or Stop” message, and never self-confirm by immediately rerunning with -ConfirmSupercomputerNodepools. Do not start the next stage command until the native TODO state visibly reflects the completed stage. If the command output shows TASK_STATUS=deploy-agent:done, update deploy-agent to done before running validate; if it shows TASK_STATUS=validate:done, update validate to done before running summary. The runner also emits TASK_PLAN=<agent>/<stage> lines immediately after preflight succeeds; use these as a final prompt to create any missing native TODOs before stage work begins. Mark the active TODO failed if the stage command fails, then report the -Resume <RunDir> command.
Before sending the final success response, reconcile the native TODO list with the runner output. If validation and summary succeeded, the visible TODOs for deploy-agent, validate, and summary must be marked done. Never report "all stages succeeded" while any visible deployment TODO remains in progress or pending.
For two or more agents, create a separate TODO set per agent and include the agent name in each TODO label, for example chembl / build and online-researcher / deploy-agent. Use six TODOs for tool-backed agents and four TODOs for agents without tools. Run stages sequentially per agent using -Stage; this gives Copilot a chance to update chembl / build before starting chembl / deploy-tool. The end-to-end multi-agent runner remains available for automation, but it should not be used when the user expects the native Copilot TODO UI to advance during the run.
If no task/TODO UI is available, use the concise [runner] START/DONE/SKIP lines and stage-todos.json as the progress record.
Stage-at-a-time command sequence
Use this pattern when native Copilot TODOs are visible:
# init emits RUN_DIR=<path>; capture it for later stages
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 chembl -Stage init
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 -RunDir <RunDir> -Stage build
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 -RunDir <RunDir> -Stage deploy-tool
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 -RunDir <RunDir> -Stage deploy-agent
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 -RunDir <RunDir> -Stage validate -ValidationPrompt "<Copilot-generated validation prompt>"
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 -RunDir <RunDir> -Stage summaryAfter each command returns, update the matching native TODO before issuing the next command. This pause is part of the workflow, not optional; Copilot cannot reliably update the TODO UI after several stages have already been run in one uninterrupted sequence.
Commands
Dry-run plan
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 -AgentName aizynthfinder -WhatIfPlanEquivalent positional form:
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 aizynthfinder -WhatIfPlanDry-run or deploy multiple agents
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 chembl aizynthfinder -WhatIfPlanDeploy with automatic build mode
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 -AgentName aizynthfinderForce remote ACR build
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 -AgentName aizynthfinder -BuildMode remoteResume a failed run
pwsh -NoProfile -ExecutionPolicy Bypass -File .github/skills/discovery-services-agent-deployer/scripts/deploy-discovery-agent.ps1 -Resume agents/tmp/aizynthfinder/20260508-172700Reporting contract
When the runner completes, summarize:
RUN_DIRIMAGE_REFTOOL_RESOURCE_IDif available- stage TODO statuses from native Copilot task tracking or
stage-todos.json - stage statuses from
SUMMARY_STAGE_* - validation status (
passed,pending, or skipped)
If the runner fails, report the failed stage, the action required from the script output, and the exact -Resume <RunDir> command when a run directory exists.
References
references/configuration.md- local config fields and Copilot-style input behaviorreferences/operations.md- runner behavior, checkpoints, and resume modelreferences/troubleshooting.md- common failures and recovery steps
Keep SKILL.md lean. Prefer the single public runner and references over ad-hoc scripts or long manual instructions. The deployer implementation is intentionally consolidated into scripts/deploy-discovery-agent.ps1 so there is only one executable script to maintain.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

