copilot-sdk

copilot-sdk is a skill for Claude Code, Codex from fabioc-aloha/Alex_Skill_Mall. It costs 36 tokens per session (3,576 once invoked), scanned B, original, MIT.

A guide to building applications that use GitHub Copilot through its software development kit, or SDK.

In plain words
What is it for?
Use it to create Copilot-powered applications in Node.js, Python, Go, or .NET, including custom tools and MCP server integrations.
Why use it?
It removes the need to design Copilot session handling, streaming, tools, hooks, and deployment connections from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create Copilot-powered applications in Node.js, Python, Go, or .NET, including custom tools and MCP server integrations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fabioc-aloha/alex_skill_mall/copilot-sdk
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fabioc-aloha/Alex_Skill_Mall --skill copilot-sdk
Clone the repo
git clone --depth 1 https://github.com/fabioc-aloha/Alex_Skill_Mall

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for copilot-sdk

README.md
[![agentmods](https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/copilot-sdk/github.svg)](https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/copilot-sdk)
Your own site
<a href="https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/copilot-sdk"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/copilot-sdk/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for copilot-sdk

Your own site · 80×15
<a href="https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/copilot-sdk"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/copilot-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,576 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.03576
Opus 5 $0.00018 $0.01788
Sonnet 5 $0.00007 $0.00715
Haiku 4.5 $0.00004 $0.00358

Measured 5d ago against content hash 34a9e8e21aa5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

copilot-sdk scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

tools: ["*"],
plugins/ai-agents/copilot-sdk/skills/copilot-sdk/SKILL.md · 492 lines

How it starts

The opening of the file, as written. The whole thing — 492 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GitHub Copilot SDK

Build applications that programmatically interact with GitHub Copilot

Staleness Watch: See EXTERNAL-API-REGISTRY.md for source URLs and recheck cadence

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, Business, or Enterprise) — not required for BYOK
  • Runtime: Node.js 24+ / Python 3.10+ / Go 1.21+ / .NET 8.0+

Installation

Language Package Install
Node.js @github/copilot-sdk npm install @github/copilot-sdk
Python github-copilot-sdk pip install github-copilot-sdk
Go github.com/github/copilot-sdk/go go get github.com/github/copilot-sdk/go
.NET GitHub.Copilot.SDK dotnet add package GitHub.Copilot.SDK

Architecture

Your App → SDK Client → [stdio/TCP] → Copilot CLI → Model Provider
                                           ↕
                                      MCP Servers

Transport modes:

Mode Description Use Case
Stdio (default) CLI as subprocess via pipes Local dev, single process
TCP CLI as network server Multi-client, backend services

Core Pattern: Client → Session → Message

Node.js / TypeScript

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

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

const response = await session.sendAndWait({ prompt: "What is 2 + 2?" });
console.log(response?.data.content);

await client.stop();

Python

import asyncio
from copilot import CopilotClient

async def main():
    client = CopilotClient()
    await client.start()
    session = await client.create_session({"model": "gpt-4.1"})
    response = await session.send_and_wait({"prompt": "What is 2 + 2?"})
    print(response.data.content)
    await client.stop()

asyncio.run(main())

Read the full file on GitHub · 492 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 492 lines · 36 tokens per session scan B 34a9e8e21aa5

Subscribe to this mod's changes

copilot-sdk is a skill published in the GitHub repository fabioc-aloha/Alex_Skill_Mall (4 stars, last pushed 2d ago), licensed MIT. It adds 36 tokens to every session and 3,576 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

go-dependency-audit

Go dependency audit specialist for CVE scanning (govulncheck), license risk triage, outdated dependency detection, upgrade impact analysis, and supply chain security. ALWAYS use when auditing go.mod dependencies, running govulncheck, checking license compatibility, planning dependency upgrades, or investigating supply…

johnqtcg/awesome-skills · 102 tokens

unit-test

A Go testing workflow for writing unit tests: small tests that check individual functions or components. It supports table-driven cases, where many inputs and expected results are organised in one test, and subtests.

johnqtcg/awesome-skills · 100 tokens

go-benchmark

Go performance benchmarking and pprof profiling specialist. ALWAYS use when writing benchmark functions (testing.B), generating or reading pprof profiles, interpreting flame graphs, finding memory allocation hotspots, comparing implementations with benchstat, or measuring ns/op / B/op / allocs/op. In Go code contexts…

johnqtcg/awesome-skills · 90 tokens

go-code-reviewer

Review Go code with a defect-first approach using repository policy (constitution.md first, then AGENTS.md fallback). Use for code review, PR review, quality checks, risk analysis, and regression detection.

johnqtcg/awesome-skills · 45 tokens

go-review-lead

Orchestrate a comprehensive Go code review by triaging code changes, dispatching vertical review skills (security, concurrency, error, logic, performance, quality, test, observability) as parallel agents, then consolidating results into a unified report. Use for full Go PR review or comprehensive code review. Replaces…

johnqtcg/awesome-skills · 80 tokens

fuzzing-test

A Go testing guide for generating fuzz tests, which repeatedly try varied inputs to find crashes and unexpected behavior. It first checks whether the code is suitable for fuzzing.

johnqtcg/awesome-skills · 74 tokens