CO

Helps developers create and configure agents using the GitHub Copilot SDK across multiple programming languages.

Install

mkdir -p .claude/skills/copilot-sdk-vivi3172 && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12784" && unzip -o skill.zip -d .claude/skills/copilot-sdk-vivi3172 && rm skill.zip

Installs to .claude/skills/copilot-sdk-vivi3172

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

This skill provides guidance for creating agents and applications with the GitHub Copilot SDK. IMPORTANT - When using the SDK with TypeScript/Node.js, the project MUST use ESM (ECMAScript Modules). CommonJS (require/module.exports) is NOT supported. It should be used when the user wants to create, modify, or work on software that uses the GitHub Copilot SDK in TypeScript (ESM only), Python, Go, or .NET. The skill covers SDK usage patterns, ESM-based project configuration, CLI configuration, custom tools, MCP servers, and custom agents.
541 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Create agents with the GitHub Copilot SDK
  • Configure projects for the GitHub Copilot SDK
  • Build custom tools for Copilot agents
  • Manage MCP servers for Copilot agents
  • Handle session creation and message sending
  • Process events from Copilot SDK sessions

How it works

The skill provides guidance and examples for using the GitHub Copilot SDK, which is a multi-platform agent runtime embedding Copilot's agentic workflows into applications. It covers SDK usage patterns, project configuration, and custom tool building.

Inputs & outputs

You give it
Codebase for a Copilot SDK application or agent, configuration settings
You get back
Guidance, examples, and configuration for building Copilot SDK applications

When to use copilot-sdk

  • Create a custom Copilot agent
  • Configure MCP servers
  • Debug Copilot SDK integration

About this skill

GitHub Copilot SDK

Overview

The GitHub Copilot SDK is a multi-platform agent runtime that embeds Copilot's agentic workflows into applications. It exposes the same engine behind Copilot CLI, enabling programmatic invocation without requiring custom orchestration development.

Critical Constraint (TypeScript / Node.js):

  • The Copilot SDK for Node.js is ESM-only
  • Projects MUST use ECMAScript Modules
  • CommonJS (require, module.exports) is not supported

Status: Technical Preview (suitable for development and testing)

Supported Languages: TypeScript/Node.js (ESM only), Python, Go, .NET

Primary Documentation

Language-Specific SDK Docs

CLI and Configuration Docs


Prerequisites

  1. GitHub Copilot Subscription - Pro, Pro+, Business, or Enterprise

  2. GitHub Copilot CLI - Installed and authenticated (copilot --version)

  3. Runtime:

    • Node.js 18+ (ESM required)
    • Python 3.8+
    • Go 1.21+
    • .NET 8.0+
  4. TypeScript / Node.js Project Requirements

    • package.json MUST include:
      {
        "type": "module"
      }
      
    • Use import / export
    • Do NOT use require() or module.exports

Installation

LanguageCommand
TypeScript/Node.js (ESM)npm install @github/copilot-sdk
Pythonpip install github-copilot-sdk
Gogo get github.com/github/copilot-sdk/go
.NETdotnet add package GitHub.Copilot.SDK

Architecture

Application (ESM) → SDK Client → JSON-RPC → Copilot CLI (server mode)

The SDK manages CLI lifecycle automatically. External server connections supported via cliUrl / cli_url.


Quick Start (TypeScript – ESM REQUIRED)

// package.json MUST include: { "type": "module" }

import { CopilotClient } from "@github/copilot-sdk";

const client = new CopilotClient();
await client.start();

const session = await client.createSession({ model: "gpt-5" });

// Register handler BEFORE send()
session.on((event) => {
  if (event.type === "assistant.message") {
    console.log(event.data.content);
  }
});

await session.send({ prompt: "What is 2 + 2?" });

await session.destroy();
await client.stop();

Critical:

  • ESM only (import)
  • No CommonJS
  • Register event handlers before calling send()

For complete examples in all languages, see references/working-examples.md.


Core Concepts

Client

Main entry point. Manages CLI server lifecycle and session creation.

Operations: start(), stop(), createSession(), resumeSession()

Config: cliPath, cliUrl, port, useStdio, autoStart, autoRestart

Session

Individual conversation context with message history.

Operations: send(), sendAndWait(), on(), abort(), getMessages(), destroy()

Config: model, streaming, tools, systemMessage

Events

Key events during processing:

EventPurpose
assistant.messageComplete response
assistant.message_deltaStreaming chunk
session.idleReady for next prompt
tool.execution_start/endTool invocations

For full event lifecycle and SessionEvent structure, see references/event-system.md.

Streaming

  • streaming: false (default) - Content arrives all at once
  • streaming: true - Content arrives incrementally via assistant.message_delta

Final assistant.message always fires regardless of streaming setting.


Available Models

See Supported AI Models for full list.

ProviderModel IDNotes
OpenAIgpt-4.1, gpt-5, gpt-5-miniIncluded
OpenAIgpt-5.1, gpt-5.1-codex, gpt-5.2Premium
Anthropicclaude-sonnet-4.5Premium (CLI default)
Anthropicclaude-opus-4.5Premium (3× multiplier)
Googlegemini-3-pro-previewPremium

Custom Tools

TypeScript (ESM + Zod):

const tool = defineTool("lookup_issue", {
  description: "Fetch issue details",
  parameters: z.object({ id: z.string() }),
  handler: async ({ id }) => fetchIssue(id),
});

Python (Pydantic):

@define_tool(description="Fetch issue details")
async def lookup_issue(params: IssueParams) -> dict:
    return fetch_issue(params.id)

For complete tool examples in all languages, see references/working-examples.md.


Language Conventions

ConceptTypeScript (ESM)PythonGo.NET
Create sessioncreateSession()create_session()CreateSession()CreateSessionAsync()
Delta contentdeltaContentdelta_contentDeltaContentDeltaContent

For full conventions table, see references/event-system.md.


CLI Configuration

Config stored in ~/.copilot/:

  • config.json - General configuration
  • mcp-config.json - MCP server definitions

For custom agents and MCP setup, see references/cli-agents-mcp.md.


Troubleshooting

ProblemSolution
Import errorsEnsure ESM ("type": "module")
Events fire but content emptyUse event.data.content, not event.content
Handler never firesRegister before send()
Python enum issuesUse event.type.value
Go nil pointerCheck != nil before dereferencing

For debugging techniques, see references/troubleshooting.md.


Skill References

Detailed documentation in this skill:

  • references/working-examples.md - Complete examples for all languages, custom tools
  • references/event-system.md - Event lifecycle, SessionEvent structure, language conventions
  • references/troubleshooting.md - Common issues, debugging techniques
  • references/cli-agents-mcp.md - CLI configuration, custom agents, MCP server setup

Additional Resources

When not to use it

  • When using CommonJS modules in a TypeScript/Node.js project
  • When a GitHub Copilot subscription is not available
  • When the GitHub Copilot CLI is not installed or authenticated

Prerequisites

GitHub Copilot Subscription (Pro, Pro+, Business, or Enterprise)GitHub Copilot CLI installed and authenticatedNode.js 18+ (ESM required) or Python 3.8+ or Go 1.21+ or .NET 8.0+TypeScript/Node.js projects must use ECMAScript Modules (ESM)

Limitations

  • TypeScript/Node.js projects must use ESM; CommonJS is not supported
  • The SDK is in Technical Preview status
  • Event handlers must be registered before calling send()

How it compares

This skill provides specific guidance and enforces constraints for using the GitHub Copilot SDK, unlike general programming documentation.

Compared to similar skills

copilot-sdk side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
copilot-sdk (this skill)06moNo flagsIntermediate
langsmith-evaluator04moReviewIntermediate
mcp-builder1363moReviewAdvanced
copilot-sdk74moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

langsmith-evaluator

dhar174

INVOKE THIS SKILL when building evaluation pipelines for LangSmith. Covers three core components: (1) Creating Evaluators - LLM-as-Judge, custom code; (2) Defining Run Functions - how to capture outputs and trajectories from your agent; (3) Running Evaluations - locally with evaluate() or auto-run v

00

mcp-builder

anthropics

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

136215

copilot-sdk

github

Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.

763

llm-application-dev

skillcreatorai

Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration. Use for AI-powered features, chatbots, or LLM-based automation.

323

honcho-integration

plastic-labs

Integrate Honcho memory and social cognition into existing Python or TypeScript codebases. Use when adding Honcho SDK, setting up peers, configuring sessions, or implementing the dialectic chat endpoint for AI agents.

11

genkit-production-expert

jeremylongshore

Build production Firebase Genkit applications including RAG systems, multi-step flows, and tool calling for Node.js/Python/Go. Deploy to Firebase Functions or Cloud Run with AI monitoring. Use when asked to "create genkit flow" or "implement RAG". Trigger with relevant phrases based on skill purpose.

01

Search skills

Search the agent skills registry