copilot-sdk
Build applications powered by GitHub Copilot using the Copilot SDK. Use when creating programmatic integrations with Copilot across Node.js/TypeScript, Python, Go, or .NET. Covers session management, custom tools, streaming, hooks, MCP servers, BYOK providers, session persistence, custom agents, skills, and deployment patterns. Requires GitHub Copilot CLI installed and a GitHub Copilot subscription (unless using BYOK).
npx skills add microsoft/skills --skill copilot-sdk --agent copilot
Same command for any agent — swap --agent for claude-code, codex, cursor.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Build applications that programmatically interact with GitHub Copilot. The SDK wraps the Copilot CLI via JSON-RPC, providing session management, custom tools, hooks, MCP server integration, and streaming across Node.js, Python, Go, and .NET.
How it works
- Prerequisites include a Copilot CLI installation and authentication, a Copilot subscription (unless using BYOK), and runtime support per language.
- Installation enumerates language-specific packages and commands to install them.
- Architecture describes a flow: Your App → SDK Client → [stdio/TCP] → Copilot CLI → Model Provider, with MCP Servers connected in the middle.
- Transport modes include Stdio (default) for local development and TCP for multi-client/backend use.
- Core pattern: create a client, create a session, and send messages.
- The skill provides concrete code examples for Node.js/TypeScript, Python, Go, and .NET showing session creation, sending prompts, and stopping the client.
- Streaming can be enabled by setting streaming: true and subscribing to delta events, with examples in Node.js and Python.
- Custom Tools demonstrate defining tools in each language with parameters, handlers, and integration into sessions.
- Hooks cover pre/post tool use, user prompt submission, session lifecycle, and error handling with code samples.
- MCP Server Integration explains local stdio and remote HTTP MCP servers with configuration fields and debugging tips.
- Authentication outlines multiple token methods and a sample client creation, plus BYOK and disable auto-login options.
- BYOK describes provider configurations for OpenAI, Azure OpenAI in various setups, and Anthropic.
When to use it
Use when building programmatic integrations with Copilot across Node.js/TypeScript, Python, Go, or .NET, including advanced features like tools, hooks, MCP servers, streaming, and BYOK deployment patterns.
What it can touch
The skill references the following tool usage:
- Tool: copilot (as declared)
- Code samples show importing CopilotClient and related APIs from language-specific packages, and using methods like createSession, start/stop, and streaming event handlers.
Caveats
- Prerequisites explicitly require GitHub Copilot CLI installed and authenticated, and a Copilot subscription (unless BYOK).
- Runtime compatibility per language is listed (Node.js 18+, Python 3.8+, Go 1.21+, .NET 8.0+).
- BYOK mode allows using open providers without a Copilot subscription.
- No licensing caveats beyond MIT as stated for the skill.
# GitHub Copilot SDK Build applications that programmatically interact with GitHub Copilot. The SDK wraps the Copilot CLI via JSON-RPC, providing session management, custom tools, hooks, MCP server integration, and streaming across Node.js, Python, Go, and .NET. ## Prerequisites - **GitHub Copilot CLI** installed and authenticated (`copilot --version`) - **GitHub Copilot subscription** (Individual
What does the copilot-sdk skill do?
Build applications powered by GitHub Copilot using the Copilot SDK. Use when creating programmatic integrations with Copilot across Node.js/TypeScript, Python, Go, or .NET. Covers session management, custom tools, streaming, hooks, MCP servers, BYOK providers, session persistence, custom agents, skills, and deployment patterns. Requires GitHub Copilot CLI installed and a GitHub Copilot subscription (unless using BYOK).
How do I install it?
Run `npx skills add microsoft/skills --skill copilot-sdk --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From microsoft/skills, a repository with 2,860 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.