Skip to main content

Building Copilot skillsets

Learn the steps to build Github Copilot 기술 세트 and integrate custom tools and functions into your Copilot environment.

Introduction

Github Copilot 기술 세트 are a streamlined way to extend GitHub Copilot's functionality by defining API endpoints that Copilot can call. When you create a skillset, Copilot handles all the AI interactions while your endpoints provide the data or functionality. This guide walks you through configuring and deploying a skillset within your GitHub App.

Prerequisites

Before you begin, make sure you have the following:

  1. A configured GitHub App: You’ll need a GitHub App to act as the container for your skillset. If you haven’t already set one up, refer to Creating a GitHub App for your Copilot Extension and Configuring your GitHub App for your Copilot extension.
  2. API endpoints: You need one endpoint per skill. Each endpoint must:
    • Accept POST requests with the application/json MIME type
    • Be able to verify the signature of requests from GitHub to authenticate their origin and prevent unauthorized access
    • Be publicly accessible via HTTPS

For more information about signature verification, see Verifying that payloads are coming from GitHub.

Configuration requirements

Each skillset is defined within a GitHub App. A single GitHub App can contain up to five skills. Each individual skill needs:

  • Name: A clear and descriptive name (for example, "Get Issues").
  • Inference description: A detailed explanation of what the skill does and when to use it (for example, "Searches for external issues matching specific criteria like status and labels").
  • API endpoint: A POST endpoint that accepts JSON requests.
  • JSON schema: The structure of data your endpoint expects.

Example JSON schema

This example demonstrates a skill that requires two parameters: a status string and a label string. If no parameters are provided, an empty object with the type 'object' must be passed in as the request body.

{
 "type": "object",
 "properties": {
   "status": {
     "type": "string",
     "description": "filter issues by status (open, closed)",
     "enum": ["open", "closed"]
   },
   "label": {
     "type": "string",
     "description": "filter issues by label"
   }
 }
}

This format lets users make natural-language requests like find open security issues and Copilot will structure the appropriate API call.

Using your skillset

To use your skillset:

  1. Type @ followed by your extension's name.

  2. Type your prompt in natural language.

    For example:

    • @skillset-example generate a lorem ipsum
    • @skillset-example give me sample data with 100 words

Copilot interprets your request and calls the appropriate skill with the right parameters. There's no need to specify which skill to use—Copilot determines this from your natural-language request and the inference descriptions provided.

Setting up a skillset

  1. 의 페이지 오른쪽 위 모서리에서 프로필 사진을 클릭합니다.
  2. 계정 설정으로 이동합니다.
    • 개인 계정 소유한 앱의 경우 설정을 클릭합니다.
    • 조직이 소유한 앱의 경우:
      1. 사용자의 조직을 클릭합니다.
      2. 조직 오른쪽에서 설정을 클릭합니다.
  3. 왼쪽 사이드바에서 개발자 설정을 클릭합니다.
  4. 왼쪽 사이드바에서 GitHub Apps 을 클릭합니다.
  5. In the list of GitHub Apps, click the GitHub App you want to configure for your skillset.
  6. In the navigation menu on the left, select Copilot.
  7. Under App Type, select Skillset from the dropdown menu.
  8. Optionally, in the Pre-authorization URL field, enter the URL where users will be redirected to start the authentication process. This step is necessary if your API requires users to connect their GitHub account to access certain features or data.
  9. 추가하려는 각 기술에 대해(최대 5개):
    1. 새 기술 추가를 클릭합니다.
    2. 기술에 대한 명확한 이름(예: “Lorem Ipsum 데이터 생성”)을 입력합니다.
    3. Copilot에서 이 기술을 사용해야 하는 시기를 이해하는 데 도움이 되는 자세한 유추 설명을 작성합니다.
    4. POST 요청을 받을 API 엔드포인트 URL을 추가합니다.
    5. 매개 변수 필드에서 예상된 요청 형식을 정의하는 JSON 스키마를 추가합니다.
    6. 정의 추가를 클릭하여 기술을 저장합니다.
  10. 저장을 클릭하여 기술 세트를 저장합니다.