Skip to content

feat: add Foundry skill dependency check and setup scripts - #2956

Merged
anchenyi merged 3 commits into
mainfrom
anchenyi/add-scripts
Aug 3, 2026
Merged

feat: add Foundry skill dependency check and setup scripts#2956
anchenyi merged 3 commits into
mainfrom
anchenyi/add-scripts

Conversation

@anchenyi

@anchenyi anchenyi commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Description

Add mandatory dependency check and setup scripts for the Microsoft Foundry skill.

The scripts:

  • Require Azure Developer CLI (azd) and instruct the user to install it and rerun the script when unavailable.
  • Check whether the microsoft.foundry azd extension is installed.
  • Install the extension automatically only when it is missing.

Checklist

  • Tests pass locally (cd tests && npm test)
  • Title has one of the prefixes: fix:, feat:, feature:, chore:, misc:, test:, eval:
  • If modifying skill descriptions: verified routing correctness with integration tests (In tests/, npm run test:integration -- <skill> or npm run test:vally -- --skill <skill>)

Related Issues

Copilot AI review requested due to automatic review settings July 24, 2026 08:33
@anchenyi anchenyi changed the title feat: add foundry skil capability detection scripts feat: add foundry skill capability detection scripts Jul 24, 2026
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
Details# 🔍 Token Analysis Report

@github-copilot-for-azure/scripts@1.0.0 tokens
node --import tsx src/tokens/cli.ts compare --base origin/main --head HEAD --markdown

📊 Token Change Report

Comparing origin/mainHEAD

Summary

Metric Value
📈 Total Change +351 tokens (+6%)
Before 6,137 tokens
After 6,488 tokens
Files Changed 1

Changed Files

File Before After Change
plugins/azure-skills/skills/microsoft-foundry/SKILL.md 6,137 6,488 +351 (+6%)

@github-copilot-for-azure/scripts@1.0.0 tokens
node --import tsx src/tokens/cli.ts check --markdown

📊 Token Limit Check Report

Checked: 821 files
Exceeded: 113 files

⚠️ Files Exceeding Token Limits

File Tokens Limit Over By
.github/skills/analyze-skill-issues/SKILL.md 2109 500 +1609
.github/skills/analyze-test-run/SKILL.md 2471 500 +1971
.github/skills/file-test-bug/SKILL.md 628 500 +128
.github/skills/sensei/SKILL.md 856 500 +356
.github/skills/skill-authoring/SKILL.md 839 500 +339
.github/skills/vally-eval/SKILL.md 1737 500 +1237
plugins/azure-skills/changelog-2026-07-24.md 4226 2000 +2226
plugins/azure-skills/skills/airunway-aks-setup/SKILL.md 1025 500 +525
plugins/azure-skills/skills/appinsights-instrumentation/SKILL.md 937 500 +437
plugins/azure-skills/skills/azure-ai/SKILL.md 820 500 +320
plugins/azure-skills/skills/azure-aigateway/SKILL.md 1261 500 +761
plugins/azure-skills/skills/azure-aigateway/references/policies.md 2342 2000 +342
plugins/azure-skills/skills/azure-app-onboard/SKILL.md 1622 500 +1122
plugins/azure-skills/skills/azure-app-onboard/deploy/SKILL.md 1816 500 +1316
plugins/azure-skills/skills/azure-app-onboard/deploy/references/code-deployment-container-apps.md 2140 2000 +140
plugins/azure-skills/skills/azure-app-onboard/deploy/references/deploy-checklist-template.md 2564 2000 +564
plugins/azure-skills/skills/azure-app-onboard/prepare/SKILL.md 1566 500 +1066
plugins/azure-skills/skills/azure-app-onboard/prepare/references/pricing-guide-services.md 2142 2000 +142
plugins/azure-skills/skills/azure-app-onboard/prepare/references/service-mapping.md 2022 2000 +22
plugins/azure-skills/skills/azure-app-onboard/prepare/references/sku-quota-validation.md 2278 2000 +278
plugins/azure-skills/skills/azure-app-onboard/references/session-protocol.md 2026 2000 +26
plugins/azure-skills/skills/azure-app-onboard/scaffold/SKILL.md 3592 500 +3092
plugins/azure-skills/skills/azure-app-onboard/scaffold/references/bicep-container-apps.md 2354 2000 +354
plugins/azure-skills/skills/azure-app-onboard/scaffold/references/self-review-checklist.md 2269 2000 +269
plugins/azure-skills/skills/azure-app-onboard/scaffold/references/subagent-iac-gen.md 2406 2000 +406
plugins/azure-skills/skills/azure-app-onboard-prereq/SKILL.md 2517 500 +2017
plugins/azure-skills/skills/azure-app-onboard-prereq/references/dependency-compatibility.md 2239 2000 +239
plugins/azure-skills/skills/azure-cloud-migrate/SKILL.md 1085 500 +585
plugins/azure-skills/skills/azure-cloud-migrate/references/services/container-apps/cloudrun-deployment-guide.md 2029 2000 +29
plugins/azure-skills/skills/azure-cloud-migrate/references/services/container-apps/deployment-guide.md 2458 2000 +458
plugins/azure-skills/skills/azure-cloud-migrate/references/services/container-apps/fargate-deployment-guide.md 2587 2000 +587
plugins/azure-skills/skills/azure-cloud-migrate/references/services/container-apps/spring-deployment-guide.md 3871 2000 +1871
plugins/azure-skills/skills/azure-cloud-migrate/references/services/functions/lambda-to-functions.md 2600 2000 +600
plugins/azure-skills/skills/azure-cloud-migrate/references/services/functions/runtimes/javascript.md 2181 2000 +181
plugins/azure-skills/skills/azure-compliance/SKILL.md 1188 500 +688
plugins/azure-skills/skills/azure-compute/SKILL.md 657 500 +157
plugins/azure-skills/skills/azure-compute/workflows/essential-machine-management/references/emm-enable-flow.md 2344 2000 +344
plugins/azure-skills/skills/azure-deploy/SKILL.md 1645 500 +1145
plugins/azure-skills/skills/azure-deploy/references/pre-deploy-checklist.md 4692 2000 +2692
plugins/azure-skills/skills/azure-deploy/references/recipes/azd/errors.md 4004 2000 +2004
plugins/azure-skills/skills/azure-deploy/references/troubleshooting.md 2038 2000 +38
plugins/azure-skills/skills/azure-diagnostics/SKILL.md 1596 500 +1096
plugins/azure-skills/skills/azure-enterprise-infra-planner/SKILL.md 911 500 +411
plugins/azure-skills/skills/azure-enterprise-infra-planner/references/constraints/compute-apps.md 2022 2000 +22
plugins/azure-skills/skills/azure-kubernetes/SKILL.md 2634 500 +2134
plugins/azure-skills/skills/azure-kubernetes/azure-kubernetes-automatic-readiness/SKILL.md 3690 500 +3190
plugins/azure-skills/skills/azure-kusto/SKILL.md 2152 500 +1652
plugins/azure-skills/skills/azure-messaging/SKILL.md 821 500 +321
plugins/azure-skills/skills/azure-prepare/SKILL.md 3145 500 +2645
plugins/azure-skills/skills/azure-prepare/references/aspire.md 4617 2000 +2617
plugins/azure-skills/skills/azure-prepare/references/plan-template.md 2560 2000 +560
plugins/azure-skills/skills/azure-prepare/references/recipes/azd/aspire.md 2275 2000 +275
plugins/azure-skills/skills/azure-prepare/references/recipes/azd/terraform.md 3555 2000 +1555
plugins/azure-skills/skills/azure-prepare/references/research.md 2196 2000 +196
plugins/azure-skills/skills/azure-prepare/references/resources-limits-quotas.md 3322 2000 +1322
plugins/azure-skills/skills/azure-prepare/references/security.md 2147 2000 +147
plugins/azure-skills/skills/azure-prepare/references/services/functions/bicep.md 3043 2000 +1043
plugins/azure-skills/skills/azure-prepare/references/services/functions/templates/recipes/composition.md 2813 2000 +813
plugins/azure-skills/skills/azure-prepare/references/services/functions/terraform.md 3404 2000 +1404
plugins/azure-skills/skills/azure-quotas/SKILL.md 3006 500 +2506
plugins/azure-skills/skills/azure-quotas/references/commands.md 2644 2000 +644
plugins/azure-skills/skills/azure-reliability/SKILL.md 5922 500 +5422
plugins/azure-skills/skills/azure-reliability/references/configure-multi-region.md 4729 2000 +2729
plugins/azure-skills/skills/azure-reliability/references/services/app-service/reliability.md 2591 2000 +591
plugins/azure-skills/skills/azure-resource-lookup/SKILL.md 1367 500 +867
plugins/azure-skills/skills/azure-resource-visualizer/SKILL.md 2122 500 +1622
plugins/azure-skills/skills/azure-storage/SKILL.md 1228 500 +728
plugins/azure-skills/skills/azure-upgrade/SKILL.md 1542 500 +1042
plugins/azure-skills/skills/azure-upgrade/references/languages/java/INSTRUCTION.md 2893 2000 +893
plugins/azure-skills/skills/azure-upgrade/references/languages/java/package-specific/com.microsoft.azure.management.md 2428 2000 +428
plugins/azure-skills/skills/azure-upgrade/references/languages/java/templates/PLAN_TEMPLATE.md 2411 2000 +411
plugins/azure-skills/skills/azure-upgrade/references/languages/java/templates/PROGRESS_TEMPLATE.md 2315 2000 +315
plugins/azure-skills/skills/azure-upgrade/references/languages/java/templates/SUMMARY_TEMPLATE.md 2190 2000 +190
plugins/azure-skills/skills/azure-upgrade/references/services/functions/automation.md 3463 2000 +1463
plugins/azure-skills/skills/azure-upgrade/references/services/functions/consumption-to-flex.md 2773 2000 +773
plugins/azure-skills/skills/azure-validate/SKILL.md 1046 500 +546
plugins/azure-skills/skills/entra-agent-id/SKILL.md 3994 500 +3494
plugins/azure-skills/skills/entra-app-registration/SKILL.md 2058 500 +1558
plugins/azure-skills/skills/entra-app-registration/references/api-permissions.md 2545 2000 +545
plugins/azure-skills/skills/entra-app-registration/references/cli-commands.md 2211 2000 +211
plugins/azure-skills/skills/entra-app-registration/references/console-app-example.md 2752 2000 +752
plugins/azure-skills/skills/entra-app-registration/references/oauth-flows.md 2375 2000 +375
plugins/azure-skills/skills/microsoft-foundry/SKILL.md 6488 500 +5988
plugins/azure-skills/skills/microsoft-foundry/finetuning/SKILL.md 1375 500 +875
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/azd-guidance/references/azd-ai-cli.md 2125 2000 +125
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/create-hosted.md 7368 2000 +5368
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/quick-start-hosted.md 4986 2000 +2986
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/references/foundry-tool-catalog.md 10922 2000 +8922
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/references/local-run.md 2252 2000 +252
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/references/use-toolbox-in-hosted-agent.md 2643 2000 +643
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/deploy/deploy.md 4897 2000 +2897
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/eval-datasets/eval-datasets.md 2863 2000 +863
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/eval-datasets/references/generate-seed-dataset.md 2212 2000 +212
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/eval-datasets/references/trace-to-dataset.md 4325 2000 +2325
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/invocations-ws/invocations-ws.md 2652 2000 +652
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/observe/observe.md 3856 2000 +1856
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/observe/references/continuous-eval.md 3855 2000 +1855
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/observe/references/evaluate-step.md 2175 2000 +175
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/observe/references/evaluation-suite-generation.md 3134 2000 +1134
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/routine/routine.md 2032 2000 +32
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/trace/references/kql-templates.md 2701 2000 +701
plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/SKILL.md 1805 500 +1305
plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/capacity/SKILL.md 1739 500 +1239
plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/customize/SKILL.md 2235 500 +1735
plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/customize/references/customize-workflow.md 3335 2000 +1335
plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/preset/SKILL.md 1226 500 +726
plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/preset/references/preset-workflow.md 5534 2000 +3534
plugins/azure-skills/skills/microsoft-foundry/project/create/create-foundry-project.md 2283 2000 +283
plugins/azure-skills/skills/microsoft-foundry/quota/quota.md 2288 2000 +288
plugins/azure-skills/skills/microsoft-foundry/quota/references/capacity-planning.md 2080 2000 +80
plugins/azure-skills/skills/microsoft-foundry/references/agent-metadata-contract.md 2217 2000 +217
plugins/azure-skills/skills/microsoft-foundry/references/sdk/foundry-sdk-py.md 2167 2000 +167
plugins/azure-skills/skills/python-appservice-deploy/SKILL.md 688 500 +188

Consider moving content to references/ subdirectories.


Automated token analysis. See skill authoring guidelines for best practices.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Not ready to approve

The new mandatory step introduces a documented ordering conflict with existing “read azd-guidance before any azd command” requirements and needs small reliability fixes in the capability scripts.

Pull request overview

This PR adds a lightweight “capability verification” step to the microsoft-foundry skill by introducing cross-platform scripts that detect whether azd and the microsoft.foundry azd extension are present, and then documenting that check in the skill’s pre-execution requirements.

Changes:

  • Documented a new mandatory “Capability Verification” pre-step in plugin/skills/microsoft-foundry/SKILL.md.
  • Added verify-capability.sh (macOS/Linux) to detect azd and the microsoft.foundry azd extension.
  • Added verify-capability.ps1 (Windows/pwsh) to perform the same capability detection.
File summaries
File Description
plugin/skills/microsoft-foundry/SKILL.md Adds a new pre-execution capability verification step to guide agents before Foundry workflows.
plugin/skills/microsoft-foundry/scripts/verify-capability.sh New bash script that checks for azd and microsoft.foundry extension availability.
plugin/skills/microsoft-foundry/scripts/verify-capability.ps1 New PowerShell script that checks for azd and microsoft.foundry extension availability.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 3
  • Review effort level: Low

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.

Comment thread plugin/skills/microsoft-foundry/scripts/verify-capability.sh Outdated
Comment thread plugin/skills/microsoft-foundry/scripts/verify-capability.ps1 Outdated
Comment thread plugins/azure-skills/skills/microsoft-foundry/SKILL.md Outdated
@anchenyi
anchenyi force-pushed the anchenyi/add-scripts branch from 9ccc7af to 71063bc Compare August 3, 2026 06:14
@anchenyi anchenyi changed the title feat: add foundry skill capability detection scripts feat: add Foundry skill dependency check and setup scripts Aug 3, 2026
@anchenyi
anchenyi requested a review from Copilot August 3, 2026 08:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The PR deletes resolve-project-id scripts that are still referenced by the documented create workflows, making those workflows non-functional unless the docs (or scripts) are updated together.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details

Suppressed comments (6)

plugins/azure-skills/skills/microsoft-foundry/scripts/check-and-setup-dependencies.sh:3

  • This script is missing the standard header comment documenting purpose/usage and exit code semantics (see other Foundry scripts like verify-environment.sh). Adding it makes the script easier to use and maintain.
#!/usr/bin/env bash

set -euo pipefail

plugins/azure-skills/skills/microsoft-foundry/scripts/check-and-setup-dependencies.sh:6

  • The install URL here is inconsistent with the rest of the Foundry scripts (which use https://aka.ms/azd-install) and is longer than necessary. Using the short link keeps guidance consistent across the skill.
  echo "Azure Developer CLI (azd) is required. Install it from https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd, then rerun this script." >&2

plugins/azure-skills/skills/microsoft-foundry/scripts/check-and-setup-dependencies.sh:23

  • azd-guidance says to set AZURE_DEV_USER_AGENT inline only; exporting it at script scope is unnecessary and can become user-visible if the script is sourced. Consider setting it inline for each azd invocation and simplifying the extension detection to a fixed-string check.
export AZURE_DEV_USER_AGENT=microsoft_foundry_skill

if ! extension_list="$(azd extension list --installed --output json)"; then
  echo "Failed to list installed azd extensions." >&2

plugins/azure-skills/skills/microsoft-foundry/scripts/check-and-setup-dependencies.ps1:5

  • When azd is missing, this should write to stderr (so CI/log collectors surface it as an error) and should use the same short install link used elsewhere in the skill.
$azd = Get-Command azd -ErrorAction SilentlyContinue
if (-not $azd) {
    Write-Host "Azure Developer CLI (azd) is required. Install it from https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd, then rerun this script."
    exit 1

plugins/azure-skills/skills/microsoft-foundry/SKILL.md:26

  • The Windows invocation shown here (./scripts/check-and-setup-dependencies.ps1) can run in the current PowerShell session and may leave environment changes behind. Prefer an explicit pwsh -File ... invocation for consistent behavior.
./scripts/check-and-setup-dependencies.sh     # macOS / Linux
./scripts/check-and-setup-dependencies.ps1    # Windows (pwsh)

plugins/azure-skills/skills/microsoft-foundry/SKILL.md:96

  • The PR deletes the bundled resolve-project-id scripts, but the referenced create workflows still instruct users to run them (e.g., foundry-agent/create/create-hosted.md and foundry-agent/create/quick-start-hosted.md). This will break the documented create workflow unless either the scripts are restored or those docs are updated to remove/replace the commands.
| Create a new hosted agent end-to-end (scaffold + deploy + test) | [dependency check and setup](#dependency-check-and-setup) → [azd-guidance](foundry-agent/azd-guidance/azd-guidance.md) → [quick-start-hosted](foundry-agent/create/quick-start-hosted.md) (self-contained end-to-end) |
| Anything beyond the standard quickstart (existing code, migration, re-hosting, deployment customization, scaffold-time connections, A2A (Agent2Agent), recovery) | [dependency check and setup](#dependency-check-and-setup) → [azd-guidance](foundry-agent/azd-guidance/azd-guidance.md) → [create](foundry-agent/create/create-hosted.md) → [deploy](foundry-agent/deploy/deploy.md) → [invoke](foundry-agent/invoke/invoke.md) |
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The updated skill instructions introduce contradictory mandatory guidance (dependency-check before reading references vs. azd-guidance before running azd) that should be resolved to avoid incorrect agent behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details

Suppressed comments (2)

plugins/azure-skills/skills/microsoft-foundry/SKILL.md:22

  • The dependency-check section says the check must be completed before reading any sub-skill/workflow references, but the skill also requires reading azd-guidance before running any azd command. Since the dependency-check scripts themselves run azd, this creates contradictory mandatory instructions. Reword this line so it gates execution of workflow steps rather than blocking reading references like azd-guidance.
**You MUST complete this check before reading or entering any sub-skill, workflow, or workflow-specific reference.**

plugins/azure-skills/skills/microsoft-foundry/scripts/check-and-setup-dependencies.ps1:3

  • When azd is missing, this writes an error to stdout via Write-Host. Use Write-Error so the failure is surfaced on stderr in CI/log collectors while still returning a non-zero exit code.
    Write-Host "Azure Developer CLI (azd) is required. Install it from https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd, then rerun this script."
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@anchenyi

anchenyi commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Copilot's comments are not applicable. The dependency-check scripts do not conflict with azd-guidance.

@anchenyi
anchenyi merged commit ca1e6af into main Aug 3, 2026
12 of 13 checks passed
@anchenyi
anchenyi deleted the anchenyi/add-scripts branch August 3, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants