copilot-sdk_skill

This skill guides you in using the GitHub Copilot SDK to build, configure, and customize agents across languages.
  • Python

151

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill intellectronica/agent-skills --skill copilot-sdk

  • SKILL.md7.1 KB

Overview

This skill provides practical guidance for building agents and applications with the GitHub Copilot SDK across TypeScript, Python, Go, and .NET. It focuses on SDK usage patterns, CLI configuration, custom tools, MCP server integration, and creating custom agents. Use it to accelerate development, avoid common pitfalls, and follow recommended lifecycle and event patterns.

How this skill works

The skill explains how the SDK manages a Copilot CLI server process and talks to it over JSON-RPC via a Client → Session → Event model. It covers starting/stopping the client, creating and resuming sessions, registering event handlers before sending prompts, and handling streaming deltas and final assistant messages. It also shows how to define and register custom tools, configure external CLI servers (cliUrl/cli_url), and wire MCP servers for enhanced agent mode.

When to use it

  • Creating a new agentic application that invokes Copilot programmatically
  • Adding custom tools or tool handlers to a Copilot-driven workflow
  • Configuring a shared MCP server or custom CLI endpoint for teams
  • Migrating a prototype across TypeScript, Python, Go, or .NET
  • Debugging session lifecycle, streaming events, or tool invocation issues

Best practices

  • Register event handlers before calling send() to capture all events reliably
  • Prefer sendAndWait or explicit session lifecycle methods for deterministic flows
  • Use streaming:true when you need incremental output, but always expect the final assistant.message
  • Keep CLI config in ~/.copilot/ (config.json and mcp-config.json) and document custom agent settings
  • Validate tool schemas (Zod/Pydantic) so tool inputs/outputs are predictable across languages

Example use cases

  • A TypeScript app that spins up a Copilot session, streams partial answers, and updates a UI in real time
  • A Python microservice that exposes a lookup tool to fetch database records for agent prompts
  • A Go backend that connects to a centrally hosted MCC/CLI server via cliUrl for shared capacity
  • A .NET application that resumes long-running sessions and orchestrates multiple tool invocations
  • Creating a custom coding agent with a tailored systemMessage and specialized developer tools

FAQ

The SDK supports TypeScript/Node.js, Python, Go, and .NET with idiomatic APIs for each.

Do I need a Copilot subscription?

Yes. A Copilot subscription (Pro, Pro+, Business, or Enterprise) and an authenticated Copilot CLI are required.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational