Want better AI outputs? Try context engineering.

Published: (January 12, 2026 at 12:00 PM EST)
2 min read

Source: GitHub Blog

What is context engineering?

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:

  • Custom instructions
  • Reusable prompts
  • Custom agents

Each technique gives Copilot more of the information it needs to produce code matching your expectations, architecture, and team standards.

1. Custom instructions: Give Copilot the rules it should follow

Custom instruction files help Copilot understand your:

  • Coding conventions
  • Language preferences
  • Naming standards
  • Documentation style

You can use:

  • Global rules: \.github/copilot-instructions.md
  • Task‑specific rules: \.github/instructions/*.instructions.md

For 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 it works.

Learn how to set up custom instructions

2. Reusable prompts: Standardize your common workflows

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:

  • Prompt files: \.github/prompts/*.prompts.md
  • Slash commands such as /create-react-form to trigger structured tasks

This helps teams enforce consistency, speed up onboarding, and execute repeatable workflows the same way every time.

See examples of reusable prompt files

3. Custom agents: Create task‑specific AI personas

Custom agents allow you to build specialized AI assistants with well‑defined responsibilities and scopes. For example:

  • An API design agent to review interfaces
  • A security agent that performs static analysis tasks
  • A documentation agent that rewrites comments or generates examples

Agents can include their own tools, instructions, constraints, and behavior models, and you can enable handoff between agents for more complex workflows.

Learn how to create and configure custom agents

Why context engineering matters

The goal isn’t just better outputs; it’s better understanding by Copilot. When you provide clearer context you:

  • Get more accurate and reliable code
  • Reduce back‑and‑forth prompting
  • Increase consistency across files and repositories
  • Stay in flow longer instead of rewriting or correcting results

Experimenting with context engineering reveals how deeply it can shape your development experience.

More resources

Back to Blog

Related posts

Read more »