You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(agents): resolve only explicit prompt skills and remove skills/ auto-scan - #10999
Prompt and Copilot-harnessed agents unconditionally scanned <agentDir>/skills/<dir>/SKILL.md during azd ai agent init, predeploy validation, and azd deploy, causing unrelated local skills/ folders (such as coding-agent skills) to be emitted as azure.ai.skill services or fail deployment with invalid_agent_manifest / foundry_dependency_not_ready. Conversely, versionless skills: references backed by inline host: azure.ai.skill services (created via azd ai skill add) failed azd deploy when no <agentDir>/skills/ directory existed on disk.
Changes
cli/azd/extensions/azure.ai.agents/internal/project/prompt_skills.go, prompt_graph.go, config.go: remove skills/ directory scanning, SKILL.md parsing (ScanSkillBundles, scanSkillsDir, parseSkillMD), and SkillService from azure.ai.agents, and resolve only versionless entries declared in managed.Skills (declaredVersionlessPromptSkills) against sibling host: azure.ai.skill services and SKILL_<NAME>_VERSION markers.
cli/azd/extensions/azure.ai.agents/internal/cmd/resource_services.go, init_managed.go: remove ScanSkillBundles and host: azure.ai.skill service emission from promptResourceServices and emitResourceServices, and align promptResourceServices's conditional promptAgent.Skillsuses: wiring with promptAgent.Connections and promptAgent.Toolboxes.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/map.go & README.md: link versionless Skills entries to ResolvedSkills via servicekey.SanitizeServiceName while preserving distinct authored version pins, and remove the stale skills/ convention-folder note from README.md.
Manual Validation
Initialized and deployed a Copilot harness prompt agent (verify-pr10808-northcentralus) on foundry-devx-test-1 in a directory containing both a malformed skills/broken-skill/SKILL.md (missing description) and skills/extra-skill/SKILL.md, and verified azd ai agent init did not emit host: azure.ai.skill services and azd deploy --no-prompt succeeded without scanning skills/.
Added skills: [extra-skill] to the prompt agent in azure.yaml before adding the skill service and verified azd deploy --no-prompt failed fast with skill "extra-skill" has no enabled azure.ai.skill sibling service.
Ran azd ai skill add extra-skill --file ./skills/extra-skill, wired extra-skill into the agent's uses: list, and verified azd deploy --all --no-prompt published SKILL_EXTRA_SKILL_VERSION=1 and deployed the prompt agent with the resolved skill while still ignoring skills/broken-skill/SKILL.md.
Azure Pipelines:
Successfully started running 2 pipeline(s).
25 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Legacy projects can silently lose previously attached skills on deployment when explicit skills: references are absent, with no migration warning to alert users.
This PR changes azure.ai.agents to resolve explicitly declared prompt-agent skills instead of discovering local skills/ folders.
Changes:
Remove folder scanning and automatic skill-service generation.
Resolve versionless references through sibling services and published version markers while preserving authored pins.
Update dependency-wiring helpers, regression tests, and documentation.
Extension user-contract review: blocked (13 files inspected; 0 new contract comments; existing threads unverified because review history was not supplied).
Paths are relative to cli/azd/extensions/azure.ai.agents/.
File
Description
README.md
Removes the obsolete skills-folder convention note.
internal/project/service_target_agent_test.go
Updates endpoint tests for explicit skills and ignored local folders.
internal/project/prompt_skills.go
Replaces bundle scanning with declared-skill resolution.
internal/project/prompt_skills_test.go
Covers explicit references, pins, dependency failures, and ignored folders.
internal/project/prompt_graph.go
Registers skill nodes only for declared versionless references.
internal/project/config.go
Removes the skill-service model formerly used by init.
internal/project/agent_validation_test.go
Tests authored version conflicts and ignored local skill files.
internal/pkg/agents/agent_yaml/map.go
Links sanitized resolved names while preserving authored pins.
For a versionless reference without a sibling service, this suggestion omits the required uses: entry, so following it still fails dependency validation. It also hides the option to pin an already-published Foundry skill instead of publishing a new version. Include both the uses: wiring and the explicit {name, version} alternative.
Document skill attachment, pinning, and ignored local folders
Removing the folder convention leaves the README without instructions for attaching prompt-agent skills. Document that versionless skills: entries need an azure.ai.skill service in uses:, while {name, version} pins an existing Foundry skill. Also state that local skills/ folders are ignored.
- Warn via `warnf` when enabled `azure.ai.skill` siblings in `uses:` are absent from the prompt agent `skills:` list.
- Distinguish missing vs. host-conflicting skill services in `validateSkillDependencies` and document `uses:` and `{name, version}` pinning.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Prompt deployment can incorrectly reject environment-conditioned skills and silently remove legacy skills because migration warnings are not preserved in terminal or JSON output.
When a skill's condition: depends on a value saved only in the selected azd environment, prompt deployment leaves p.dependencyEnv unset and can reject the skill as disabled even after core deploys it. Set p.dependencyEnv = env before resolving the prompt graph so dependency conditions use the same environment snapshot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prompt and Copilot-harnessed agents unconditionally scanned
<agentDir>/skills/<dir>/SKILL.mdduringazd ai agent init,predeployvalidation, andazd deploy, causing unrelated localskills/folders (such as coding-agent skills) to be emitted asazure.ai.skillservices or fail deployment withinvalid_agent_manifest/foundry_dependency_not_ready. Conversely, versionlessskills:references backed by inlinehost: azure.ai.skillservices (created viaazd ai skill add) failedazd deploywhen no<agentDir>/skills/directory existed on disk.Changes
cli/azd/extensions/azure.ai.agents/internal/project/prompt_skills.go,prompt_graph.go,config.go: removeskills/directory scanning,SKILL.mdparsing (ScanSkillBundles,scanSkillsDir,parseSkillMD), andSkillServicefromazure.ai.agents, and resolve only versionless entries declared inmanaged.Skills(declaredVersionlessPromptSkills) against siblinghost: azure.ai.skillservices andSKILL_<NAME>_VERSIONmarkers.cli/azd/extensions/azure.ai.agents/internal/cmd/resource_services.go,init_managed.go: removeScanSkillBundlesandhost: azure.ai.skillservice emission frompromptResourceServicesandemitResourceServices, and alignpromptResourceServices's conditionalpromptAgent.Skillsuses:wiring withpromptAgent.ConnectionsandpromptAgent.Toolboxes.cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/map.go&README.md: link versionlessSkillsentries toResolvedSkillsviaservicekey.SanitizeServiceNamewhile preserving distinct authored version pins, and remove the staleskills/convention-folder note fromREADME.md.Manual Validation
verify-pr10808-northcentralus) onfoundry-devx-test-1in a directory containing both a malformedskills/broken-skill/SKILL.md(missingdescription) andskills/extra-skill/SKILL.md, and verifiedazd ai agent initdid not emithost: azure.ai.skillservices andazd deploy --no-promptsucceeded without scanningskills/.skills: [extra-skill]to the prompt agent inazure.yamlbefore adding the skill service and verifiedazd deploy --no-promptfailed fast withskill "extra-skill" has no enabled azure.ai.skill sibling service.azd ai skill add extra-skill --file ./skills/extra-skill, wiredextra-skillinto the agent'suses:list, and verifiedazd deploy --all --no-promptpublishedSKILL_EXTRA_SKILL_VERSION=1and deployed the prompt agent with the resolved skill while still ignoringskills/broken-skill/SKILL.md.