This skill helps with GitHub Copilot SDK work across Node.js/TypeScript, Python, Go, .NET, and Java. It covers setup, authentication, permissions, streaming events, custom tools, custom agents, MCP servers, hooks, skills, and session persistence.
npx skills add https://github.com/intellectronica/agent-skills --skill copilot-sdk
The GitHub Copilot SDK exposes the same Copilot CLI agent runtime over JSON-RPC, so apps can drive Copilot programmatically instead of building their own orchestration layer.
Status: Public preview
SDKs: Node.js/TypeScript, Python, Go, .NET, Java
Architecture: Application -> SDK client -> JSON-RPC -> Copilot CLI
When helping with the Copilot SDK:
docs/ as the source of truth for shared behavior.listModels() is available.go tool bundler workflow.github/copilot-sdk-java and expects the CLI to be installed separately.DefaultAzureCredential.approveAllPermissionHandler.approve_allcopilot.PermissionHandler.ApproveAllPermissionHandler.ApproveAllPermissionHandler.APPROVE_ALLdisconnect()destroy()sessionId when creating them.cliUrl.copilot --headless --port 4321
client.listModels() and the official supported-models page.reasoningEffort exists for models that support it.| SDK | Install |
| --- | --- |
| Node.js / TypeScript | npm install @github/copilot-sdk |
| Python | pip install github-copilot-sdk |
| Go | go get github.com/github/copilot-sdk/go |
| .NET | dotnet add package GitHub.Copilot.SDK |
| Java | Maven/Gradle package com.github:copilot-sdk-java |
Pick the setup that matches the application shape:
cliUrl.Use the same mental model in every language:
send() if you need streaming or progress.send() or sendAndWait().session.idle or the returned final message.disconnect() the session and stop/dispose the client.import { CopilotClient, approveAll } from "@github/copilot-sdk";
const client = new CopilotClient();
await client.start();
const session = await client.createSession({
model: "gpt-5",
streaming: true,
onPermissionRequest: approveAll,
});
session.on("assistant.message_delta", (event) => {
process.stdout.write(event.data.deltaContent ?? "");
});
await session.sendAndWait({ prompt: "What is 2+2?" });
await session.disconnect();
await client.stop();
Common operations across SDKs:
start(), stop(), forceStop()createSession(), resumeSession(), disconnect()send(), sendAndWait(), abort(), getMessages()listModels(), listSessions(), getStatus() / ping()assistant.message.assistant.message_delta.session.idle is the reliable "turn complete" signal.See references/event-system.md.
defineTool(...) with Zod or raw JSON Schema.@define_tool with Pydantic models.DefineTool(...).AIFunctionFactory.Create(...).overridesBuiltInTool: trueoverrides_built_in_tool=TrueOverridesBuiltInTool = trueAdditionalProperties["is_override"] = trueskipPermission.customAgents lets you define sub-agents per session.mcpServers attaches local or remote MCP servers.onPreToolUse, onPostToolUse, onUserPromptSubmitted, and lifecycle/error hooks.skillDirectories; disable selectively with disabledSkills.See references/cli-agents-mcp.md.
mode: "immediate" for steering and mode: "enqueue" for queueing.commands.onUserInputRequest.session.ui when the connected client supports them.TelemetryConfig.onGetTraceContext callback for outbound propagation.sessionId for resumable sessions.infiniteSessions for long-running workflows that may need compaction.~/.copilot/session-state/ unless configuration overrides it.| Concept | TypeScript | Python | Go | .NET | Java |
| --- | --- | --- | --- | --- | --- |
| Create session | createSession() | create_session() | CreateSession() | CreateSessionAsync() | createSession() |
| Resume session | resumeSession() | resume_session() | ResumeSession() | ResumeSessionAsync() | resumeSession() |
| Final content | event.data.content | event.data.content | *event.Data.Content | evt.Data.Content | event.getData().content() |
| Delta content | event.data.deltaContent | event.data.delta_content | *event.Data.DeltaContent | evt.Data.DeltaContent | event.getData().deltaContent() |
| Skills field | skillDirectories | skill_directories | SkillDirectories | SkillDirectories | setSkillDirectories(...) |
destroy() still appears in older examples but disconnect() is the current method.assistant.message and assistant.message_delta use event.data.*, not top-level event.content.send().sessionId is awkward to operationalize.references/working-examples.md - current starter examples, including tools and resume patternsreferences/event-system.md - event names, lifecycle, and language access patternsreferences/cli-agents-mcp.md - custom agents, skills, MCP, headless CLI, and config locationsreferences/troubleshooting.md - common failures, debug logging, auth, permissions, and transport issuesGuide 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).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
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).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take intellectronica/copilot-sdk from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip, npm.
Without those the skill loads but fails at the first command.