GitHub Copilot SDK 應用整合
GitHub Copilot SDK 應用整合
將 GitHub Copilot 的 session、串流與自訂工具整合到應用程式。
Microsoft · 官方來源 · AI 與 Agents
來源狀態
可用來源
資源類型
Skill
與類似 Skill 有什麼不同?
- Agent 使用體驗稽核
Agent Experience 著重讓產品或工具易於 Agent 使用;Copilot SDK 著重以 SDK 將 Agent 能力整合進應用。
來源描述的能力
這些是來源描述的可能操作,不代表 2lus 已授予權限或已測試。
尚未列出能力,請審查原始來源。
這個 Skill 是什麼?
來源針對 GitHub Copilot SDK,透過 CLI 協作建立 Agent-enabled application;不是 Microsoft 365 Copilot SDK。
可以做什麼?何時適合使用?
- 建立 session 型聊天應用。
- 提供受控的自訂工具。
- 處理串流、hook 和 session 清理。
如何使用
- 選定語言並確認 CLI 與認證方式。
- 規劃 client/session/message 生命週期與串流介面。
- 設計 tool allowlist、hook 和錯誤處理,先以不含秘密的範例檢閱。
使用前你需要準備
- Agent 使用情境
- 服務契約與授權範圍
你可以替換:
[agent]、[tool name]
環境與相依需求
- 已安裝並認證的 GitHub Copilot CLI;Copilot 訂閱或 BYOK。來源列 Node 18+、Python 3.8+、Go 1.21+、.NET 8+。
使用範例與 Prompt
以下是 2lus 撰寫的示範需求;請替換為你有權處理的檔案與專案,不代表已執行或保證結果。
入門
說明 Node.js Copilot SDK 的 client、session 與 message 關係,不呼叫模型。
實務
為 TypeScript 應用規劃串流 UI 與取消操作,列出 CLI 認證和 session 清理需求。
進階
設計帶唯讀庫存工具的 Copilot SDK 應用,加入拒絕未授權 tool 的 hook、錯誤契約和 BYOK 秘密邊界,先只輸出設計。
實用提醒
- 把 session 結束、取消與資源釋放一起設計。
限制與注意事項
- SDK/模型與配額依版本或方案而異;此指南不保證免付費。
安全注意事項
- 不要把憑證放入 prompt;hook 應預設拒絕未列出的 shell 和寫入工具。
使用與設定
README 的選擇式安裝方式;只選需要的 Skill。此處只能複製,並非安裝 SDK 相依套件。
npx skills add microsoft/skills官方文件 ↗
支援平台
GitHub Copilot — 文件記載,未做實機相容性測試 官方文件 ↗
來源與授權
來源查核日期(非安全認證): 2026-09-29
MIT
原始來源 ↗ 授權條款 ↗ 官方文件 ↗相關 Skills
使用第三方 Skill 前,請先檢查來源、權限與執行內容。安裝指令只供查看與複製,不會由 2lus 執行。
2lus AI Skills Library 提供 Skill 的整理與使用導覽。第三方 Skill 的內容、授權與可用性以原始來源為準。使用或安裝前,請自行確認其權限與執行內容。
Copilot SDK
Integrate GitHub Copilot sessions, streaming and custom tools into applications.
Microsoft · Official source · AI & Agents
Source status
Active source
Resource type
Skill
How is this different from similar skills?
- Agent Experience
Agent Experience focuses on making products usable by agents; Copilot SDK integrates agent capabilities into applications through an SDK.
Documented capabilities
These are operations described upstream, not permissions granted or tested by 2lus.
Capabilities not declared here; review the original source.
What is this skill?
This source targets the GitHub Copilot SDK and its CLI-backed application integration, not Microsoft 365 Copilot.
Use cases and when to use it
- Build session-based chat.
- Expose controlled custom tools.
- Handle streaming, hooks and cleanup.
How to use it
- Choose a language and confirm CLI authentication.
- Plan client/session/message lifecycle and streaming.
- Design tool allowlists, hooks and errors using secret-free examples first.
What you need
- Agent use cases
- Service contracts and authorized scope
You can replace:
[agent], [tool name]
Environment and dependencies
- Authenticated GitHub Copilot CLI; a Copilot subscription or BYOK. Source lists Node 18+, Python 3.8+, Go 1.21+ and .NET 8+.
Usage and prompt examples
These example requests were written by 2lus. Substitute files and projects you may use; examples are not executed results or guarantees.
Beginner
Explain the Node.js SDK client, session and message lifecycle without calling a model.
Practical
Plan streaming UI and cancellation for a TypeScript application, including CLI authentication and session cleanup.
Advanced
Design an SDK app with read-only inventory tools, denial hooks, error contracts and BYOK secret boundaries. Produce a design only.
Tips
- Design cancellation and resource cleanup alongside session creation.
Limitations
- SDK/model availability and quotas vary; this guide does not promise free usage.
Security notes
- Keep credentials out of prompts; deny unlisted shell/write tools by default.
Usage and setup
README installer with skill selection. Copy only; this does not install SDK dependencies.
npx skills add microsoft/skillsDocumentation ↗
Supported agents
GitHub Copilot — Documented; not runtime-tested Documentation ↗
Sources and license
Source check date (not a safety certification): 2026-09-29
MIT
Original source ↗ License terms ↗ Documentation ↗Related skills
Before using a third-party skill, review its source, permissions and executable content. Commands are for viewing and copying only; 2lus does not execute them.
2lus AI Skills Library provides curated educational guides. Third-party content, licenses and availability are governed by their original sources. Review permissions and executable content before use or installation.