Skip to content

Conversation

@hoodini
Copy link

@hoodini hoodini commented Jan 25, 2026

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:

  • Installation guides for Node.js/TypeScript, Python, Go, and .NET
  • Quick start examples using the sendAndWait pattern
  • Streaming responses with proper SessionEvent handling
  • Custom tools - JSON Schema (TS), Pydantic (Python), Go structs, Microsoft.Extensions.AI (.NET)
  • MCP Server integration - Connect to GitHub's MCP server for repo/issue/PR access
  • Custom agents - Create specialized AI personas for specific tasks
  • System message customization - Control AI behavior and personality
  • External CLI server - Run CLI in server mode and connect SDK to it
  • Session persistence - Save and resume conversations
  • Interactive CLI assistant - Complete working example with tools
  • Error handling and best practices

Based 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

  • Ran npm run skill:validate - All 27 skills valid
  • Ran npm run build - README.skills.md updated
  • Verified SKILL.md follows the required frontmatter format
  • Code examples tested for syntax correctness

Author

Yuval Avidani - GitHub Star ⭐ | AWS GenAI Superstar 🌟


🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings January 25, 2026 14:53
Copy link
Contributor

Copilot AI left a 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.md with comprehensive setup, usage patterns, and code samples for the GitHub Copilot SDK across TypeScript, Python, Go, and .NET.
  • Updated docs/README.skills.md to include the new copilot-sdk skill 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.
Copy link

Copilot AI Jan 25, 2026

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.

Suggested change
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.'

Copilot uses AI. Check for mistakes.
Comment on lines +753 to +771
```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();
}
Copy link

Copilot AI Jan 25, 2026

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants