plugins/copilot-sdk/skills/SKILL.md
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 skillsauth add intellectronica/agent-skills copilot-sdkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 issuestools
Use this skill when the user wants to read or search their Monologue notes through the Monologue Notes REST API. It covers authentication with the MONOLOGUE_API_KEY environment variable, safe token handling, listing notes, fetching a single note, pagination, filters, and error handling. The API is read-only and should be accessed with direct HTTP requests such as curl or any equivalent REST client.
tools
Use this skill when the user wants to read or search their Monologue notes through the Monologue Notes REST API. It covers authentication with the MONOLOGUE_API_KEY environment variable, safe token handling, listing notes, fetching a single note, pagination, filters, and error handling. The API is read-only and should be accessed with direct HTTP requests such as curl or any equivalent REST client.
tools
Use this skill whenever the user wants to operate Google Workspace from the command line with gog/gogcli, including Gmail, Calendar, Drive, Docs, Sheets, Slides, Forms, Apps Script, Chat, Classroom, Contacts, Tasks, People, Groups, Admin, Keep, auth, configuration, scripting, or agent-safe Google automation. Prefer this skill for Google account/file/mail/calendar work when the user mentions gog, gogcli, Google CLI, Gmail search/send, Calendar events, Drive files, Docs/Sheets/Slides editing, Forms, Apps Script, Workspace admin, or command-line Google automation.
tools
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.