Christina Warren
Christina Warren is a senior developer advocate at GitHub, where she works to make GitHub the best place for developers. She's obsessed with pop culture, tech, and OSS. You can follow her ramblings online at filmgirl.social!
Learn how custom instructions, reusable prompts, and custom agents help GitHub Copilot deliver more accurate results.
| Editor’s note: A version of this blog was originally published in The GitHub Insider newsletter. Sign up now for more technical content > |
If you’ve ever felt like GitHub Copilot could be even stronger with just a little more context, you’re right. Context engineering is quickly becoming one of the most important ways developers shape, guide, and improve AI-assisted development.
Context engineering is the evolution of prompt engineering. It’s focused less on clever phrasing and more, as Braintrust CEO Ankur Goyal puts it, on “bringing the right information (in the right format) to the LLM.”
At GitHub Universe this past fall, Harald Kirschner—principal product manager at Microsoft and longtime VS Code and GitHub Copilot expert—outlined three practical ways developers can apply context engineering today:
Each technique gives Copilot more of the information it needs to produce code matching your expectations, your architecture, and your team’s standards.
Let’s explore all three, so you can see how providing better context helps Copilot work the way you do.
Custom instruction files help Copilot understand your:
You can use:
.github/copilot-instructions.md.github/instructions/*.instructions.mdFor example, you might define how React components should be structured, how errors should be handled in a Node service, or how you want API documentation formatted. Copilot then applies those rules automatically as Copilot works.
Learn how to set up custom instructions 👉
Reusable prompt files let you turn frequent tasks—like code reviews, scaffolding components, generating tests, or initializing projects—into prompts that you can call instantly and consistently.
Use:
.github/prompts/*.prompts.md/create-react-form to trigger structured tasksThis helps teams enforce consistency, speed up onboarding, and execute repeatable workflows the same way every time.
See examples of reusable prompt files 👉
Custom agents allow you to build specialized AI assistants with well-defined responsibilities and scopes. For example:
Agents can include their own tools, instructions, constraints, and behavior models. And yes, you can even enable handoff between agents for more complex workflows.
Learn how to create and configure custom agents 👉
The goal isn’t just better outputs, it’s better understanding by Copilot. When you provide Copilot with clearer context:
And the more you experiment with context engineering, the more you’ll discover how deeply it can shape your development experience.
AI is settling the “typed vs. untyped” debate by turning type systems into the safety net for code you didn’t write yourself.
Explore the GitHub Blog’s top posts covering the biggest software development topics of the year.
An easy-to-remember acronym, WRAP will help you write effective issues, refine your instructions, and get the most out of Copilot coding agent.