-
Notifications
You must be signed in to change notification settings - Fork 191
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
base: main
Are you sure you want to change the base?
Changes from all commits
145a737
2fc35de
322ed31
2a9a913
bdcbb20
eca5d01
a2d7470
4c7aa2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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" |
| 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\"" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } |
| 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" | ||
| } | ||
| ] | ||
| } | ||
| } |
| 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" | ||
| } | ||
| ] | ||
| } | ||
| } |
| 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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/bin/bash | ||
|
Member
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. This script has a shebang but is committed as mode |
||
|
|
||
| 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."}}' | ||
| 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 | ||
|
|
||
|
JasonYeMSFT marked this conversation as resolved.
|
||
| 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) | ||
| 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. |
| 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. |
| 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. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "version": "1.0", | ||
| "pathFilters": [ | ||
| "." | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write-Successis defined only insidetrack-telemetry.ps1and this script does not import it. Every Windows Copilot CLI or VS Code session therefore emits a command-not-found error duringSessionStartafter writing the context. Replace this with a local success response or an explicitexit 0so the hook completes cleanly.