-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(skills): Add GitHub Copilot SDK skill #608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add comprehensive skill for building agentic applications with the GitHub Copilot SDK. This skill covers: - Installation for Node.js, Python, Go, and .NET - Quick start examples with sendAndWait pattern - Streaming responses with proper event handling - Custom tools definition (JSON Schema, Pydantic, Go structs) - MCP Server integration (GitHub MCP) - Custom agents for specialized AI personas - System message customization - External CLI server connection - Session persistence and management - Error handling and best practices - Interactive CLI assistant examples Based on official GitHub Copilot SDK documentation from https://github.com/github/copilot-sdk Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new Agent Skill for the GitHub Copilot SDK, providing multi-language examples and guidance for building agentic applications with Copilot. It also registers the skill in the skills documentation index.
Changes:
- Introduced
skills/copilot-sdk/SKILL.mdwith comprehensive setup, usage patterns, and code samples for the GitHub Copilot SDK across TypeScript, Python, Go, and .NET. - Updated
docs/README.skills.mdto include the newcopilot-sdkskill entry in the skills table.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| skills/copilot-sdk/SKILL.md | New Copilot SDK Agent Skill with front matter, language-specific installation/usage examples, tooling patterns, and reference links. |
| docs/README.skills.md | Registers the copilot-sdk skill in the skills catalog with a summary description and bundled assets column. |
| @@ -0,0 +1,863 @@ | |||
| --- | |||
| name: copilot-sdk | |||
| description: Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent. | |||
Copilot
AI
Jan 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description value in the SKILL front matter should be wrapped in single quotes to comply with our SKILL metadata format and avoid YAML parsing issues when the description contains punctuation or special characters. Please update the description line to use a single-quoted string value.
| description: Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent. | |
| description: 'Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.' |
| ```typescript | ||
| try { | ||
| const client = new CopilotClient(); | ||
| const session = await client.createSession({ model: "gpt-4.1" }); | ||
| const response = await session.sendAndWait( | ||
| { prompt: "Hello!" }, | ||
| 30000 // timeout in ms | ||
| ); | ||
| } catch (error) { | ||
| if (error.code === "ENOENT") { | ||
| console.error("Copilot CLI not installed"); | ||
| } else if (error.code === "ECONNREFUSED") { | ||
| console.error("Cannot connect to Copilot server"); | ||
| } else { | ||
| console.error("Error:", error.message); | ||
| } | ||
| } finally { | ||
| await client.stop(); | ||
| } |
Copilot
AI
Jan 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this TypeScript error-handling example, client is declared inside the try block, but referenced in the finally block, which will cause a scope error because client is not defined outside the try block. To make this snippet compile and run correctly, declare client in an outer scope (e.g., before the try block) and guard the client.stop() call so it only runs when a client instance was successfully created.
aaronpowell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add it to https://github.com/github/awesome-copilot/blob/main/collections/copilot-sdk.md (update the collection yaml)
Summary
Add a comprehensive skill for building agentic applications with the GitHub Copilot SDK. This skill provides developers with everything they need to embed Copilot's agentic workflows into their applications.
What's included:
sendAndWaitpatternSessionEventhandlingBased on official documentation
This skill is based on the official GitHub Copilot SDK documentation from https://github.com/github/copilot-sdk, ensuring accuracy and alignment with GitHub's recommended patterns.
Test plan
npm run skill:validate- All 27 skills validnpm run build- README.skills.md updatedAuthor
Yuval Avidani - GitHub Star ⭐ | AWS GenAI Superstar 🌟
🤖 Generated with Claude Code