Now generally available, GitHub Copilot Extensions allow developers to use natural language to query documentation, generate code, retrieve data, and execute actions on external services without leaving their IDEs. Besides using public extensions from companies like Docker, MongoDB, Sentry, and many more, developers can create their own extensions to work with internal libraries or APIs.
The GitHub Marketplace already offers a couple of dozen extensions covering a wide range of development-oriented services. For example, you can use the Stack Overflow extension to ask questions about coding tasks without leaving the editor; instead, the GitBook extension allows you to ask questions about GitBook docs.
Besides providing access to documentation, Copilot extensions may help developers interact with a service directly from their IDEs. For example, the Docker extension allows you to generate Docker assets and analyze vulnerabilities; the LambdaTest extension lets developers manage testing workflows and streamlines test execution, automation, and insight generation; the Mermaid Chart extension can generate various kinds of diagrams based on you GitHub Actions, SQL, or other files you are currently working within your IDE.
As mentioned, developers can also create their own extensions to access private data or in-house services. To make it easier for developers to create extensions, GitHub has published several repositories showing how you build a basic “Hello World” extension, how to gather feedback from extension beta users, and more.
There are two ways to build Copilot extensions. On the one hand, you can define a skillset, meaning you have Copilot handle all AI interactions with the extension providing a description of several endpoints it can call to process user requests. Currently, a single extension can use up to five distinct skills.
On the other hand, you can use your own AI agent, in which case you pass certain information from the user context to the agent, such as details about a user’s current file, selected text, and repository. In this case, the agent receives server-sent events (SSEs) with user messages and references to their current environment. The actual context information varies with the client hosting the extension. For example, while Visual Studio and Visual Studio Code pass the current selection or the whole file content, GitHub.com doesn’t, but provides the URL of the page the user is currently visiting.
To make it easier for extension builders to manage authentication, GitHub has recently added support for OpenID Connect (OIDC). This frees developers from having to verify a GitHub token’s validity on each request by allowing them to use a pre-exchanged token.
GitHub Copilot Extensions can be used in a variety of clients, including Visual Studio and Visual Studio Code, GitHub.com and GitHub’s mobile app, and JetBrains’ IDEs. They are not supported in Xcode or GitHub Codespaces, though, nor vim or emacs.