Hi there! I'm Shrijith Venkatrama, founder of Hexmos. Right now, I’m building LiveAPI, a tool that makes generating API docs from your code ridiculously easy.
GitHub Copilot is handy, and with extensions, you can tweak it to do exactly what you want in VS Code.
This isn’t a step-by-step guide—think of it as a rundown of the pieces, how they fit together, and what it’s like to use. L
et’s dig into the concepts, the setup, and the user side of things.
The Basics: What You’re Working With
A Copilot Extension is just a way to add your own tools to Copilot Chat. Here’s what you’re dealing with:
- Copilot Agent: Your custom code—basically a server that answers questions or does stuff when users ping it.
- GitHub App: The thing that connects your agent to GitHub and Copilot. It handles logins and permissions.
- Server Setup: Your agent needs to run somewhere Copilot can reach, like a local machine with
ngrok
or a proper hosted server. - Server-Sent Events (SSEs): How your agent talks to Copilot—think of it as live chat messages going back and forth.
- Context: Your agent can see what the user’s working on—like the file they’ve got open—to give better answers.
It’s a handful of parts, but they’re straightforward once you see how they link up.
How It’s Built: The Big Picture
Picture your extension as a little system connecting VS Code, your code, and GitHub. Here’s the layout:
- You: Start by typing in Copilot Chat.
- Copilot Platform: The middleman that passes your message (and maybe some context) to your agent.
- Your Agent: Lives on a server and responds—could be local with ngrok or something more permanent.
- GitHub App: Keeps everything secure and connected.
Your server needs to be online, and the GitHub App makes sure it’s all legit.
Context stuff—like the code you’re editing—gets thrown in to help your agent out.
What Users See: The Day-to-Day Experience
For someone using your extension, it’s pretty simple. Here’s how it plays out:
- Starting It: They type @your-extension in Copilot Chat.
- Logging In: First time, they’ll click through a GitHub login—takes two seconds.
- Chatting: They ask something (e.g., “What’s this function do?”), and your agent answers, maybe using the code they’ve got open.
Here’s a quick flow:
It’s just chatting with Copilot, but with your twist.
If your agent needs a “yes/no” (like “Delete this?”), they’ll see a popup.
Context makes it feel like Copilot’s reading their screen —which it sort of is.
Things to Think About: Planning Your Extension
When you’re putting this together, a few bits matter:
- Server Stuff: Ngrok works for messing around, but if lots of people use it, you’ll want something sturdier.
- Using Context: Grab the open file or selection to make answers relevant—just don’t overstep permissions.
- SSEs: These let you send answers, errors, or even links. They’re flexible—play with them.
- Naming: Pick a clear name for your extension so users know what it does right away.
Here’s how data moves:
Your server’s where you make it useful—could be a quick script or something fancier.
Why Bother? The Point of It All
Extensions let you make Copilot yours.
Want it to explain your team’s code?
Pull in docs?
Whatever you need, you can build it.
It’s just a server, a GitHub App, and some messaging—nothing wild.
For users, it’s like Copilot got a quiet upgrade.
What’s your plan—something small or a big helper? Let me know in the comments!
Top comments (1)
Worth reading! GitHub Copilot extensions streamline coding with AI-powered suggestions, making development faster and more efficient. 🚀