Build what's next on GitHub, the place for anyone from anywhere to build anything.
Join us October 28-29 in San Francisco or online for GitHub Universe, our flagship developer event uniting people, agents, and the world's code.
Explore the July edition, featuring prompts, tips, and use cases for GitHub Copilot.

| This is abridged content from July 2023’s Insider newsletter. Like what you see? Sign up to receive complete, unabridged content in your inbox every month. Sign up now > |
Welcome to our rebranded GitHub Insider newsletter with tips, technical guides, and best practices to help you boost your productivity and happiness. We heard your feedback and refreshed the newsletter experience. Now, each month, Insider will deliver deep dives into one of GitHub’s products, and provide tips and tricks to take your development to the next level.
This month, we’re delving into GitHub Copilot. 92% of developers are already using AI coding tools both in and outside of work (according to our latest survey), and AI could remove major disruptions, delays, and cognitive load that developers previously had to endure. So, we wanted to break down our guide to using GitHub Copilot, and share some prompts, tips, and use cases. Here’s what you’ll find in this post:
Once you’ve installed the GitHub Copilot extension in your preferred IDE, it’s best to experiment with how to communicate with the AI programmer to get your desired results. Let’s get started.
A detailed comment like the one above can prompt GitHub Copilot to generate a very simple, unstyled, but functional, markdown editor in less than 30 seconds. Keep in mind, though, that outputs from a generative AI tool are non-deterministic, so the responses may vary.

A simple, specific ask goes a long way. Though this might result in shorter outputs from GitHub Copilot, it helps to break down the steps and logic that the AI pair programmer needs to follow to achieve your goal. Then, let GitHub Copilot generate the code after each step instead of asking it to generate a bunch of code all at once. Think of it as writing a recipe: You break the cooking process down into simple, succinct steps, rather than writing a paragraph that describes the dish you want to make.
Learning from examples is not only useful for humans, but also for an AI pair programmer, so throw a bone or two to GitHub Copilot. Let’s say you want to extract the names from the array of data below and store it in a new array. A prompt that doesn’t provide an example might look something like this:
As a result, GitHub Copilot generates an incorrect usage of map. On the other hand, a prompt with an example might look something like this:
And that results in GitHub Copilot generating the desired outcome:
Here are some additional tips to help guide your conversation with GitHub Copilot:
The prompt above doesn’t provide any context or boundaries for GitHub Copilot to generate relevant suggestions.
This version of the prompt is more specific than the first one, but it doesn’t clearly define the input and output requirements.
This third iteration sets boundaries and outlines what the function should do. The comment was also rephrased to give GitHub Copilot a clear intention to verify against.
Try your hand at prompting GitHub Copilot and follow our seven-step tutorial for using the tool to build a browser extension that clears your cache.
Ready to try these tips out for yourself? Start your free GitHub Copilot trial today.
Want to receive content like this once a month, right in your inbox? Sign up for the newsletter now >