新插件脚手架搭建
onboard-plugin
搭建新插件脚手架并准备分发。适用场景:'创建新插件'、'搭建新插件脚手架'
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 264
- Forks
- 225
01 前言 Front Matter
- name
- onboard-plugin
- license
- MIT
- metadata
- { "author": "Microsoft", "version": "1.1.1" }
- description
- Scaffold a new plugin and prepare it for distribution. WHEN: 'create a new plugin', 'scaffold a new plugin'
03 SKILL.md 正文
Workflow
This skill provides the end-to-end steps for onboarding a new plugin to this repo. Follow the steps to scaffold a new plugin and make it ready for distribution.
Install dependencies
Install dependencies at the repo root, in tests/ and in scripts/.
# At repo root
npm i
# In tests/
cd tests
npm i
# In scripts/
cd scripts/
npm i
Scaffold the new plugin folder
Ask the skill author to provide a name for the new plugin. Then in <repo-root>/scripts/, run this command to scaffold the common files for a new plugin.
# At <repo-root>/scripts/
cd scripts
npm run plugin:new -- --plugin {plugin-name}
This command creates a plugins/{plugin-name} directory and files in it. Refer to the Plugin Structure section of Onboarding.md to understand what each file is for.
This command adds an entry for the new plugin in tests/skills.json. Nightly scheduled integration tests use this file to discover the plugins and skills to test.
This command creates plugin-local hooks/scripts/pluginPathAllowPattern.sh
and hooks/scripts/pluginPathAllowPattern.ps1 files. The shared telemetry
scripts use these patterns to avoid sending telemetry for skills outside the
plugin. The build automatically combines shared hooks with this local hook
tree.
Optional client-specific copilot-hooks.json, claude-hooks.json, and
cursor-hooks.json files under the plugin's hooks/ directory are fragments.
List only plugin-owned event registrations; the build appends handlers to
shared events or adds new events.
Scaffold the skills
Ask the skill author for the names of the skills they plan to add and then scaffold them by running this script for each skill. Try running this command in <repo-root>/scripts with {plugin-name} from the previous step. If the plugin doesn't exist, it may have been renamed. Ask the skill author what plugin name to use.
# At <repo-root>/scripts/
cd scripts
npm run plugin:new-skill -- --plugin {plugin-name} --skill {skill-name}
This command creates a plugins/{plugin-name}/skills/{skill-name}/SKILL.md file and an evals/{plugin-name}/{skill-name}/eval.yaml file. Refer to the Skill Structure section of Onboarding.md to understand what each file is for and what files can be added. It adds two placeholder codeowners and Rick Winter as the codeowner of the corresponding directories. Every new plugin must have at least two distinct codeowner and Rick Winter as a fallback owner.
This command also adds the skill to tests/skills.json nightly integration test schedule.
IMPORTANT: Leave the scaffolded skill as is and don't implement them. Skill authors must implement and test the skills themselves.
Run local integration test
The scaffolded skill includes one example routing test that prompts the agent to load the skill and describe what it does. Do a test run.
First build the plugin from the repo root;
# IMPORTANT: Run this command at the <repo-root>
npm run build
Then use this command in <repo-root>/tests/.
# At <repo-root>/tests/
cd tests
npm run test:vally -- --plugin {plugin-name} --skill {skill-name}
The test should pass. If it fails, ask the skill author to report a bug to microsoft/github-copilot-for-azure.
Prepare for release
The scaffolded plugin and skill files are ready for release by default. Refer to the Releasing section of Onboarding.md for how releases work.
Finish the implementation
Notify the skill author about these next steps to finish onboarding the new plugin.
- Implement the skills. Add scripts and reference files as appropriate. Follow skill-authoring to implement the skill.
- Implement the integration tests. Replace the example test with meaningful tests that checks if the skill can be invoked for target user prompts and if it can successfully accomplish their goals in the target scenarios. Follow vally-eval skill on how to author integration tests.
- Write the human facing content the new plugin. This includes
- description of the plugin in
plugin.jsonfiles. - keywords of the plugin in
plugin.jsonfiles - the plugin
README.md. Preserve the scaffolded telemetry disclosure. Add annpxand.npmrcsecurity warning only if the plugin's.mcp.jsonactually invokesnpx; the shared telemetry hook does not use it.
- description of the plugin in
- Replace the placeholder codeowners in CODEOWNERS file. Codeowners will be responsible for keeping the plugin up-to-date to make sure it brings value to the users.
- IMPORTANT: Keep scaffolded files as is except for the ones mentioned above. When unsure, read Onboarding to learn more about the plugin structure.
- Once all the above are completed, submit a PR with the changes to microsoft/github-copilot-for-azure repo.
Optional next steps
Set up a separate integration test workflow
Tell the skill author that they can host integration tests in a separate GitHub or Azure DevOps repository. This is useful when tests need a dedicated Azure subscription, custom result processing, or extra dependencies.
If they want a separate workflow:
- Ask whether they use GitHub Actions or Azure Pipelines.
- Read
<repo-root>/workflow-templates/Readme.mdand follow its user setup instructions. - Copy the matching
evaluation-main.yamlstarter into the evaluation repository:- GitHub Actions:
workflow-templates/github/evaluation-main.yaml - Azure Pipelines:
workflow-templates/azure-devops/evaluation-main.yaml
- GitHub Actions:
- Pin the template to a reviewed commit SHA rather than
main. For GitHub Actions, use the same SHA for the action reference andtest-harness-ref. For Azure Pipelines, set theevaluationTemplatesrepositoryrefto the SHA. - Help the author configure the GitHub, Azure, and Copilot connections required by their platform. Never request or store token values in source.
- Keep the suites under
evals/<plugin-name>/<skill-name>/in the evaluation repository unless the starter's evaluation-directory option is changed. - Run the workflow once. For Azure Pipelines, remind the author to authorize the service connections if the first run prompts for approval.
The starter workflows upload reports and raw Vally results as artifacts. They also identify where to add dependency setup and result post-processing steps.
04 同仓库更多 Skills
azure-advisor-cost-optimization
Analyze Azure Advisor Cost/IdleResources findings and prevalidate deletion safety, including Service Groups. WHEN: "find unused Azure resources", "what resources am I paying for but no longer using", "idle-resource savings", "historical idle-resource savings", "are these idle resources safe to delete". Generic Cost, other subcategories, and cross-category requests use azure-advisor.
Foundry IQ 知识库管理
foundry-iq
Foundry IQ 知识库。适用时机:让本地或 Blob 文档可被搜索;创建/诊断知识库;对不支持的连接器或多源知识库的创建/重新配置进行分类处理;将现有知识库连接到智能体(包括多源知识库);创建/复用 Search 服务;从现有知识库检索带引用的内容;无需品牌词。在查询/目标类问题前先阅读其流程说明。不适用:其他知识库提供商、存储库文件搜索、不涉及 Foundry IQ 知识库或连接器请求的经典 Azure AI Search 索引/查询/应用类工作、通用智能体创建。
Python 应用 Azure 部署
python-appservice-deploy
将 Python(Flask/Django/FastAPI)代码部署到 Azure App Service Linux。触发条件:"Flask App Service"、"Django App Service"、"FastAPI App Service"、"将 Python 部署到 App Service"。不适用:Container Apps、Functions、非 Python、Terraform/Bicep/IaC、完整基础设施——请使用 azure-prepare。
Azure OpenAI 快速部署
preset
通过分析所有可用区域的容量,智能地将 Azure OpenAI 模型部署到最优区域。自动优先检查当前区域,并在需要时显示备选方案。适用于:快速部署、最优区域、最佳区域、自动区域选择、快速配置、多区域容量检查、高可用部署、部署到最佳位置。不适用于:自定义 SKU 选择(使用 customize)、特定版本选择(使用 customize)、自定义容量配置(使用 customize)、PTU 部署(使用 customize)。
Azure OpenAI 自定义部署
customize
具有完全自定义控制能力的 Azure OpenAI 模型交互式引导部署流程。逐步选择模型版本、SKU(GlobalStandard/Standard/ProvisionedManaged)、容量、RAI 策略(内容过滤器)以及高级选项(动态配额、优先处理、溢出)。适用于:自定义部署、定制模型部署、选择版本、选择 SKU、设置容量、配置内容过滤器、RAI 策略、部署选项、详细部署、高级部署、PTU 部署、预置吞吐量。不适用于:快速部署到最优区域(使用 preset)。
Azure OpenAI 模型容量查询
capacity
跨区域和跨项目发现可用的 Azure OpenAI 模型容量。分析配额限制、比较可用性,并根据容量需求推荐最佳部署位置。适用场景:查找容量、检查配额、可以在哪里部署、容量发现、容量最佳区域、多项目容量搜索、配额分析、模型可用性、区域比较、检查 TPM 可用性。不适用场景:实际部署(发现后转交给预设或自定义技能)、配额提升申请(引导用户前往 Azure 门户)、列出现有部署。