Cowork 插件开发与管理
cowork-plugin-engineer
当用户要求创建、导入、修复、认证、打包、验证、旁加载、评估、升级或排查包含 Agent Skills 或远程 Model Context Protocol (MCP) 连接器的 Microsoft Copilot Cowork 插件时,使用此技能。
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 107
- Forks
- 120
01 前言 Front Matter
- name
- cowork-plugin-engineer
- description
- Use this skill whenever a user asks to create, import, repair, authenticate, package, validate, sideload, evaluate, upgrade, or troubleshoot a Microsoft Copilot Cowork plugin containing Agent Skills or remote Model Context Protocol (MCP) connectors.
02 资源文件 18
- 资产文件assets/manifest-upgrade-instructions.md5.4 KB
- 资产文件assets/manifest.v1.28.template.json776 B
- 资产文件assets/tool-description.template.json404 B
- 参考文档metadata.json546 B
- 参考文档README.md3.8 KB
- 参考文档references/authentication.md3.5 KB
- 参考文档references/evaluations.md3.0 KB
- 参考文档references/import-and-normalization.md2.1 KB
- 参考文档references/package-contract.md5.2 KB
- 参考文档references/troubleshooting.md2.9 KB
- 脚本scripts/build_cowork_plugin.py2.1 KB
- 脚本scripts/check_folder_name.py7.7 KB
- 脚本scripts/cowork_plugin_utils.py62.9 KB
- 脚本scripts/new_cowork_plugin_evals.py10.3 KB
- 脚本scripts/new_cowork_plugin_project.py7.1 KB
- 脚本scripts/set_cowork_oauth_reference.py4.3 KB
- 脚本scripts/test_cowork_plugin_package.py3.5 KB
- 脚本scripts/test_cowork_plugin.py1019 B
03 SKILL.md 正文
Copilot Cowork Plugin Engineer
Build upload-ready Cowork plugins with deterministic validation. Treat the Microsoft 365 app package, its authentication configuration, and its deployment as separate gates.
Mandatory workflow
- Read package-contract.md.
- Search current Microsoft Learn documentation before choosing a manifest version or making rollout, preview, authentication, or licensing claims. For a manifest baseline upgrade, follow manifest-upgrade-instructions.md.
- Inspect the source without modifying it. Detect:
- Native Microsoft 365 app package
- Claude, Cursor, or Agent Plugin package
- Skills-only folder
- Existing Agents Toolkit project
- Choose the workflow:
- New project: use
scripts/new_cowork_plugin_project.py. - Open plugin import: follow import-and-normalization.md.
- Existing project: validate before editing.
- Existing ZIP: use
scripts/test_cowork_plugin_package.py; never extract an untrusted archive without its path and expansion safeguards.
- New project: use
- If an MCP connector is present:
- Discover tools through
initialize,notifications/initialized, andtools/list; never invent tool names or schemas. - Read authentication.md.
- Reject unresolved OAuth placeholders before producing a deployable ZIP.
- Discover tools through
- When a source project exists, run
scripts/test_cowork_plugin.py, then build throughscripts/build_cowork_plugin.py. This uses Microsoft 365 Agents Toolkit (atk) for both packaging and package validation. - For a ZIP-only request, do not run project validation or rebuild it. Treat
the ZIP accepted by
scripts/test_cowork_plugin_package.pyas the final package candidate. - Return the exact path of the built or successfully validated ZIP.
- When evaluations are requested, read
evaluations.md and use
scripts/new_cowork_plugin_evals.py. Treat generated cases as drafts until every placeholder has an approved expected response. - Sideload or deploy only when the user explicitly asks. Keep tenant-wide deployment approval-gated.
Non-negotiable gates
- Never modify an imported source tree; import from a temporary staging copy.
- Never call a package deployable while OAuth
referenceIdcontains a placeholder. - Never place secrets, tokens, client secrets, or API keys in a manifest, skill, script, or ZIP.
- A registered skill folder contains exactly one root
SKILL.md. Nested companion documents must use another filename such asREFERENCE.mdorCAPABILITY.md. - Skill frontmatter
namemust be lowercase kebab-case and match its folder. manifest.jsonmust be at the ZIP root with no wrapper directory. Referenced assets may use nested paths, but must resolve within the package.- Preserve the manifest application ID across upgrades and increment the package version.
- Do not use raw
Compress-Archiveas the final acceptance gate. - Do not fabricate a successful MCP connection from package validation; authentication and allowed-client configuration must also succeed.
Standard commands
Use python3 in the Cowork Linux runtime and on Linux/macOS. On Windows,
replace python3 with py -3. Keep each command on one line so it works
without shell-specific continuation syntax.
# Validate a project without building.
python3 scripts/test_cowork_plugin.py --project-path <project>
# Validate an existing ZIP without trusting its contents.
python3 scripts/test_cowork_plugin_package.py --package-path <package.zip>
# Insert the Teams Developer Portal OAuth client registration ID.
python3 scripts/set_cowork_oauth_reference.py --project-path <project> --connector-id <connector-id> --oauth-configuration-id <generated-id>
# Build and validate the upload package.
python3 scripts/build_cowork_plugin.py --project-path <project>
# Generate a draft behavioral evaluation suite.
python3 scripts/new_cowork_plugin_evals.py --project-path <project>
Troubleshooting
Read troubleshooting.md and map the observed HTTP status, endpoint, and response body to a specific layer:
- Package/manifest
- OAuth configuration lookup
- User sign-in or consent
- MCP allowed-client policy
- MCP protocol handshake
- Tool invocation
Do not repeatedly retry configuration errors.
Dynamic Microsoft documentation
| Topic | Search |
|---|---|
| Current Cowork package schema | microsoft_docs_search(query="Build plugins for Copilot Cowork manifest validation rules") |
| Connector authentication | microsoft_docs_search(query="Cowork MCP OAuthPluginVault authentication configuration") |
| Agents Toolkit commands | microsoft_docs_search(query="Microsoft 365 Agents Toolkit CLI import openplugin package validate") |
| Dataverse MCP setup | microsoft_docs_search(query="Dataverse MCP remote endpoint allowed clients Entra app") |
| Evaluation dataset schema | microsoft_docs_search(query="Microsoft 365 Copilot Agent Evaluations CLI dataset schema test design") |
If Learn MCP tools are unavailable, use:
| MCP tool | CLI equivalent |
|---|---|
microsoft_docs_search |
npx --yes @microsoft/learn-cli search "<query>" |
microsoft_docs_fetch |
npx --yes @microsoft/learn-cli fetch "<url>" |
microsoft_code_sample_search |
npx --yes @microsoft/learn-cli code-search "<query>" --language <language> |
References
04 同仓库更多 Skills
work-iq-sphere
Build or refresh a personal "My Work IQ" visual from the signed-in user's own Microsoft 365 work (mail, calendar, Teams chats and the OneDrive and SharePoint files they worked on, with Week, Month and 3 months views from one read of their data, about all their work or one customer, programme or topic they name) as an interactive 3D sphere (self-contained HTML), a customer-safe copy and a matching Microsoft-style PowerPoint slide. Every build is a fresh, evidence-checked analysis of that one person's own data. Use when someone says "build my Work IQ sphere", "show my Work IQ", "refresh" or "update my Work IQ", "make my Work IQ slide", "visualise my work graph", "show me the Work IQ sphere demo", or wants to show customers what Work IQ (context, memory, skills) means using their own work. Do NOT use for generic decks, Work IQ product or licensing questions with no personal data, or anyone else's, team or org-wide analytics.
severity-recordability
Runs the deterministic local v2 draft classifier; reporting/deadlines remain undetermined. Use for "explain blocked reporting determination", "is this recordable", "classify this incident", "what severity is this", or "is this OSHA reportable". Do NOT use for source intake, history retrieval or routing — use incident-intake, ehs-knowledge-retrieve or routing-notify. No diagnosis or operational decision; EHS REVIEW REQUIRED.
routing-notify
Computes proposed investigators and unsent recipients from validated local classification, history and governance. Use for "propose unsent incident recipients", "who investigates this", "route this incident", "who do we notify", or "start the OSHA clock" (only to explain the blocked clock). Do NOT use for classification or terminal drafting — use severity-recordability or incident-writeup. Never sends, files or starts a clock; EHS REVIEW REQUIRED.
incident-writeup
Revalidates and recomputes every terminal v2 hop, then renders a null-aware local Markdown draft and blank RCA template. Use for "prepare an evidence-grounded incident draft", "draft the incident summary", "write up the incident", "give me the RCA template", or "prepare the OSHA writeup". Do NOT use for intake, classification or routing — use incident-intake, severity-recordability or routing-notify. No operational actions; EHS REVIEW REQUIRED.
incident-intake
Preserves cited authorized user-supplied incident files, including real incidents, as v2 inputs for human-reviewed drafts only. Use for "preserve conflicting incident accounts", "intake this incident", "process this safety report", "extract incident facts", or "intake this near miss". Do NOT use for classification, routing or terminal drafting — use severity-recordability, routing-notify or incident-writeup respectively. No live retrieval or official determinations; EHS REVIEW REQUIRED.
ehs-knowledge-retrieve
Attaches cited local OSHA, ISO summaries, JHA and policies and computes supplied-log history. Use for "find cited local safety evidence", "pull the OSHA criteria", "get the JHA", "attach local EHS evidence", or "have we had this incident before". Do NOT use for incident intake, recordability decisions or drafting — use incident-intake, severity-recordability or incident-writeup. No live retrieval; EHS REVIEW REQUIRED.