agentleFS
hevangelhevangel/media-agent-skills/skills/copilot-sdk/SKILL.md

copilot-sdk

Skill4 starsChanged 19 days agoMITView on GitHub

Use GitHub Copilot SDK to programmatically call Copilot from Python. Use when integrating AI capabilities via Copilot CLI into applications.

  • Installs packages

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use find-skills and security-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    find-skills

    Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

    Also in 3 projects that use this

  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Copilot CLI: Must be installed (gh extension install github/gh-copilot)

    line 23
  2. Very specific:

    Authentication: Must be logged into GitHub CLI (gh auth login)

    line 24

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GitHub Copilot SDK for Python

The GitHub Copilot SDK is a multi-platform SDK for integrating GitHub Copilot Agent into apps and services. It exposes the same engine behind Copilot CLI, providing a production-tested agent runtime you can invoke programmatically.

Note: This SDK is in technical preview and may change in breaking ways.

Reference

Prerequisites

  1. GitHub Copilot Subscription: Required
  2. Copilot CLI: Must be installed (gh extension install github/gh-copilot)
  3. Authentication: Must be logged into GitHub CLI (gh auth login)

Installation

uv pip install github-copilot-sdk

Architecture

Your Application
       |
  SDK Client (Python)
       | JSON-RPC
  Copilot CLI (server mode)

API Reference

CopilotClient Options

OptionTypeDefaultDescription
cli_pathstr"copilot"Path to CLI executable
cli_urlstrNoneURL of existing CLI server
cwdstrNoneWorking directory for CLI process
portint0Server port (0 = random)
use_stdioboolTrueUse stdio transport
auto_startboolTrueAuto-start server
auto_restartboolTrueAuto-restart on crash

CopilotClient Methods

MethodDescription
await client.start()Start the CLI server
await client.stop()Stop the CLI server
await client.create_session(config)Create a conversation session
await client.resume_session(session_id)Resume existing session
await client.get_models()Get available models

SessionConfig

OptionTypeDescription
modelstrModel to use ("gpt-5", "claude-sonnet-4.5", etc.)
toolslist[Tool]Custom tools exposed to the CLI
streamingboolEnable streaming responses
mcp_serversdictMCP server configurations

Event Types

Event TypeDescription
assistant.messageFinal assistant message
assistant.message_deltaStreaming message chunk
session.idleSession finished processing
tool.callTool invocation
errorError event

Available Free Models

  • gpt-5-mini

Basic Usage

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 Python?"})
    print(response.data.content)
    await session.destroy()
    await client.stop()

asyncio.run(main())

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.