-
Notifications
You must be signed in to change notification settings - Fork 190
feature: add discover-azure-skills skill #3053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JasonYeMSFT (JasonYeMSFT)
wants to merge
8
commits into
microsoft:main
Choose a base branch
from
JasonYeMSFT:chuye/discovery-skill
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+315
−10
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
145a737
discovery skill poc
JasonYeMSFT 2fc35de
add claude code instruction and placeholder files for vscode and cursor
JasonYeMSFT 322ed31
instruction for known clients
JasonYeMSFT 2a9a913
polish frontmatter and add eval
JasonYeMSFT bdcbb20
add stimuli for discovering skill from non-core plugin
JasonYeMSFT eca5d01
address comments
JasonYeMSFT a2d7470
rewrite integration test prompts to cover each type of user prompt
JasonYeMSFT 4c7aa2f
trigger discovery skill on azure tasks
JasonYeMSFT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| name: discover-azure-skills-routing-eval | ||
| description: | | ||
| Integration evaluation for discover-azure-skills routing. | ||
| Tests skill invocation for Azure skill discovery and plugin recommendation prompts. | ||
|
|
||
| tags: | ||
| type: integration | ||
| skill: discover-azure-skills | ||
|
|
||
| defaults: | ||
| runs: 5 | ||
| timeout: "10m" | ||
| executor: integration-test-agent-runner | ||
| model: claude-sonnet-4.6 | ||
|
|
||
| scoring: | ||
| threshold: 0.8 | ||
|
|
||
| stimuli: | ||
| - name: "Find an Azure plugin" | ||
| prompt: "Search the Azure skills catalog and tell me which plugin contains a skill for configuring Azure Load Testing." | ||
| tags: | ||
| type: integration | ||
| tier: smoke | ||
| cost: llm | ||
| area: routing | ||
| skill: discover-azure-skills | ||
| earlyTerminate: '[{"type":"skill-call","skill":"discover-azure-skills"},{"type":"tool-call-count","count":3}]' | ||
| graders: | ||
| - type: skill-invocation | ||
| config: | ||
| required: | ||
| - discover-azure-skills | ||
| - type: output-not-matches | ||
| config: | ||
| pattern: "(?i)fatal error|unhandled exception|stack trace" | ||
|
|
||
| # Azure Kusto Graph related skills are in a different plugin | ||
| - name: "Find a skill to generate Azure Kusto graph" | ||
| prompt: "Find an Azure agent skill that can generate an Azure Kusto graph." | ||
| tags: | ||
| type: integration | ||
| tier: full | ||
| cost: llm | ||
| area: output | ||
| skill: discover-azure-skills | ||
| graders: | ||
| - type: skill-invocation | ||
| config: | ||
| required: | ||
| - discover-azure-skills | ||
| - type: output-contains | ||
| config: | ||
| substring: "azure-kusto-graph-skills" | ||
| - type: output-not-matches | ||
| config: | ||
| pattern: "(?i)fatal error|unhandled exception|stack trace" | ||
|
|
||
| - name: "Trigger discover by a task" | ||
| prompt: "Build an azure ai search index from my blob storage. Generate all the todo items and tell me what information I need to provide you to create it. Avoid using azure-ai skill or azure mcp tool. Although they sound related, they lack the knowledge for this task." | ||
| tags: | ||
| type: integration | ||
| tier: full | ||
| cost: llm | ||
| area: routing | ||
| skill: discover-azure-skills | ||
| debug: yes | ||
| earlyTerminate: '[{"type":"skill-call","skill":"discover-azure-skills"},{"type":"tool-call-count","count":3}]' | ||
| graders: | ||
| - type: skill-invocation | ||
| config: | ||
| required: | ||
| - discover-azure-skills | ||
| - type: output-not-matches | ||
| config: | ||
| pattern: "(?i)fatal error|unhandled exception|stack trace" | ||
|
|
||
| - name: "How-to question should not trigger skill discovery" | ||
| prompt: "How do I set up an Azure Chaos Studio fault-injection experiment against my VM scale set?" | ||
| tags: | ||
| type: integration | ||
| tier: full | ||
| cost: llm | ||
| area: negative-routing | ||
| skill: discover-azure-skills | ||
| graders: | ||
| - type: skill-invocation | ||
| config: | ||
| disallowed: | ||
| - discover-azure-skills | ||
| - type: output-not-matches | ||
| config: | ||
| pattern: "(?i)fatal error|unhandled exception|stack trace" | ||
|
|
||
| # azure plugin has skill/tools related to resource enumeration | ||
| - name: "High-level AKS troubleshooting question" | ||
| prompt: "Enumerate Azure resources across my subscription and give me the count of resources per type" | ||
| tags: | ||
| type: integration | ||
| tier: full | ||
| cost: llm | ||
| area: negative-routing | ||
| skill: discover-azure-skills | ||
| graders: | ||
| - type: skill-invocation | ||
| config: | ||
| disallowed: | ||
| - discover-azure-skills | ||
| - type: output-not-matches | ||
| config: | ||
| pattern: "(?i)fatal error|unhandled exception|stack trace" |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "hooks": { | ||
| "SessionStart": [ | ||
| { | ||
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/discover-skills.sh\"" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "hooks": { | ||
| "SessionStart": [ | ||
| { | ||
| "type": "command", | ||
| "windows": "${PLUGIN_ROOT}/hooks/scripts/discover-skills.ps1", | ||
| "osx": "${PLUGIN_ROOT}/hooks/scripts/discover-skills.sh", | ||
| "linux": "${PLUGIN_ROOT}/hooks/scripts/discover-skills.sh", | ||
| "bash": "${PLUGIN_ROOT}/hooks/scripts/discover-skills.sh", | ||
| "powershell": "${PLUGIN_ROOT}/hooks/scripts/discover-skills.ps1" | ||
| } | ||
| ] | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "version": 1, | ||
| "hooks": { | ||
| "sessionStart": [ | ||
| { | ||
| "type": "command", | ||
| "command": "bash ${CURSOR_PLUGIN_ROOT}/hooks/scripts/discover-skills.sh" | ||
| } | ||
| ] | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Write-Output '{"hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": "Make sure to use discover-azure-skills once when the user asks you to execute a task related to Azure if there is no relevant skill/mcp tool in the context. Avoid using discover-azure-skills when the user asks informational questions on how to do something."}}' | ||
|
|
||
| # Output success to stdout (required by hooks) | ||
| Write-Success |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo '{"hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": "Make sure to use discover-azure-skills once when the user asks you to execute a task related to Azure if there is no relevant skill/mcp tool in the context. Avoid using discover-azure-skills when the user asks informational questions on how to do something."}}' |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 42 additions & 0 deletions
42
plugins/azure-skills/skills/discover-azure-skills/SKILL.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| --- | ||
| name: discover-azure-skills | ||
| description: "Searches the Azure skills catalog and recommends installable agent skills by matching an Azure task to skill metadata and plugin installation guidance. WHEN: before starting any task that involves an Azure or Microsoft-cloud service, product, or data source, when no currently loaded skill or tool already covers it." | ||
| license: MIT | ||
| metadata: | ||
| author: Microsoft | ||
| version: "0.0.0-placeholder" | ||
| --- | ||
|
|
||
| Follow these steps to discover the available azure skill matching the given task description. | ||
|
|
||
| 1. List plugins | ||
|
|
||
| List Azure plugin directories from the GitHub Contents API: https://api.github.com/repos/microsoft/azure-skills/contents/.github/plugins?ref=main | ||
|
|
||
| In the result, each entry whose `type` is `dir` is a plugin directory. Skills are organized by plugins. | ||
|
|
||
| 2. List skills | ||
|
|
||
| For each plugin, list their skills from the GitHub Contents API: https://api.github.com/repos/microsoft/azure-skills/contents/.github/plugins/{plugin-dirname}/skills?ref=main | ||
|
|
||
| In the result, each entry whose `type` is `dir` is a skill directory. Each skill has a SKILL.md file that explains what this skill should be used for. | ||
|
|
||
| 3. Discover relevant skills | ||
|
|
||
| Eliminate the skills that obviously aren't relevant by their names. Then for each remaining skill, read their description from the API: https://raw.githubusercontent.com/microsoft/azure-skills/main/.github/plugins/{plugin-dirname}/skills/{skill-name}/SKILL.md | ||
|
|
||
| Use the descriptions to further eliminate skills that aren't relevant. | ||
|
|
||
| 4. Discover the plugin name of the relevant skills | ||
|
|
||
| For each relevant skill, discover their plugin name by reading the `plugin.json` from the GitHub Contents API: https://raw.githubusercontent.com/microsoft/azure-skills/main/.github/plugins/{plugin-dirname}/.plugin/plugin.json | ||
|
|
||
| This is important because a plugin's name may be different from its directory name. The installation commands depend on the plugin's name. | ||
|
|
||
| 5. Report the matched skills | ||
|
|
||
| Report the matched skills and offer instructions to install them. Skills can be installed by installing their plugin. Read the installation instructions matching the agent client to offer the installation instructions. | ||
|
|
||
| - [Copilot CLI](./references/install/copilot-cli.md) | ||
| - [Claude Code](./references/install/claude-code.md) | ||
| - [Other](./references/install/other.md) | ||
19 changes: 19 additions & 0 deletions
19
...ins/azure-skills/skills/discover-azure-skills/references/install/claude-code.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Steps | ||
|
|
||
| 1. Add `azure-skills` marketplace | ||
|
|
||
| Run this slash command in Claude Code | ||
|
|
||
| ``` | ||
| /plugin marketplace add microsoft/azure-skills | ||
| ``` | ||
|
|
||
| 2. Install the target plugin | ||
|
|
||
| Run this slash command in Claude Code | ||
|
|
||
| ``` | ||
| /plugin install {plugin-name}@azure-skills | ||
| ``` | ||
|
|
||
| > Note: {plugin-name} is the discovered plugin's name, not its directory name. |
19 changes: 19 additions & 0 deletions
19
...ins/azure-skills/skills/discover-azure-skills/references/install/copilot-cli.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Steps | ||
|
|
||
| 1. Add `azure-skills` marketplace | ||
|
|
||
| Run this slash command in Copilot CLI | ||
|
|
||
| ``` | ||
| /plugin marketplace add microsoft/azure-skills | ||
| ``` | ||
|
|
||
| 2. Install the target plugin | ||
|
|
||
| Run this slash command in Copilot CLI | ||
|
|
||
| ``` | ||
| /plugin install {plugin-name}@azure-skills | ||
| ``` | ||
|
|
||
| > Note: {plugin-name} is the discovered plugin's name, not its directory name. |
9 changes: 9 additions & 0 deletions
9
plugins/azure-skills/skills/discover-azure-skills/references/install/other.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Steps | ||
|
|
||
| 1. Install each skill using `skills` package | ||
|
|
||
| ``` | ||
| npx skills add https://github.com/microsoft/azure-skills/tree/main/.github/plugins/{plugin-dirname}/skills/{skill-name} | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Notes for reviewers:
|
||
| ``` | ||
|
|
||
| The skills package installs the skill into the `.agents/skills` directory, which is a universal location recognized by many agent clients. | ||
6 changes: 6 additions & 0 deletions
6
plugins/azure-skills/skills/discover-azure-skills/version.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "version": "1.0", | ||
| "pathFilters": [ | ||
| "." | ||
| ] | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.