copilot-sdk

Integrate with GitHub Copilot via JSON-RPC for session management and custom tools.

2|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/yunmoxinghe/Docked-AI --skill copilot-sdk-yunmoxinghe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: copilot-sdk
Source: https://github.com/yunmoxinghe/Docked-AI/tree/main/.kiro/skills/copilot-sdk
Command: npx skills add https://github.com/yunmoxinghe/Docked-AI --skill copilot-sdk-yunmoxinghe

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @github/copilot-sdk, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill solves the problem of building applications that programmatically interact with GitHub Copilot, enabling developers to integrate Copilot's capabilities into their workflows.

Core Features & Use Cases

  • Session Management: Handle session creation, management, and persistence.
  • Custom Tools: Extend Copilot's capabilities with custom tools.
  • Hooks: Customize session behavior at key lifecycle points.
  • MCP Server Integration: Connect to Model Context Protocol servers for pre-built tool capabilities.
  • Authentication: Supports various authentication methods, including BYOK.
  • Session Persistence: Resume sessions across restarts.
  • Custom Agents: Define specialized AI personas.
  • Skills Integration: Load skill directories to extend Copilot's capabilities.
  • Permission & Input Handlers: Handle tool permissions and user input requests programmatically.
  • Deployment Patterns: Offers various deployment options, including local CLI, external CLI server, and bundled CLI.
  • Client Configuration: Customize client and session configurations.
  • SDK vs CLI Feature Comparison: Provides a comparison of features available in the SDK versus the CLI.
  • Debugging: Offers debugging options and common issue solutions.
  • Key API Summary: Summarizes the key API methods for different programming languages.
  • References: Provides links to documentation and resources.

Quick Start

Use the copilot-sdk to create a new session with the GPT-4.1 model and send a prompt.

Frequently Asked Questions about copilot-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate GitHub Copilot into a custom application programmatically?

To integrate GitHub Copilot programmatically, use the copilot-sdk to handle JSON-RPC interactions for session management, custom tools, and hooks. It requires a GitHub Copilot CLI and subscription, supporting Node.js, Python, Go, and .NET environments.

Does the GitHub Copilot SDK support session persistence across application restarts?

Yes, GitHub Copilot SDK session persistence allows you to resume sessions across restarts. The SDK manages session creation and lifecycle behavior, ensuring state continuity even after application interruptions.

How can I extend GitHub Copilot capabilities with custom tools and MCP server integration?

You can extend GitHub Copilot capabilities by defining custom tools and integrating Model Context Protocol (MCP) servers. The SDK enables programmable connections to MCP servers, providing pre-built tool capabilities and specialized custom agents.

What programming languages and environments are supported by the GitHub Copilot SDK?

The GitHub Copilot SDK supports Node.js, Python, Go, and .NET environments. It requires a GitHub Copilot subscription and CLI installation to handle programmatic JSON-RPC interactions and client configurations.

How do I handle authentication and custom hooks when building a GitHub Copilot integration?

GitHub Copilot SDK handles authentication through various methods including BYOK, and allows you to customize session behavior at key lifecycle points using hooks. Permission and input handlers manage tool permissions and user input requests programmatically.

What are the deployment patterns available for GitHub Copilot SDK integrations?

GitHub Copilot SDK integrations offer various deployment patterns including local CLI, external CLI server, and bundled CLI. The SDK also provides a feature comparison against the standard CLI to help determine the best approach.