Copilot Custom Instructions and More: 4 Ways to Teach GitHub Copilot Your Codebase

https://tramcongngheai.com/

Copilot custom instructions let you write your project’s rules down once, so GitHub Copilot follows them without you explaining the same standards at the start of every task. In a beginner guide published on October 12, 2026, GitHub describes four ways to tailor Copilot to a project: custom instructions, agent skills, custom agents and MCP servers. Each one lives in a specific place, and they work best together.

Key Takeaways

  • Published: October 12, 2026, on the GitHub Blog, in the “GitHub Copilot app for Beginners” series.
  • Custom instructions: .github/copilot-instructions.md for repository-wide rules, plus .github/instructions for path-specific rules.
  • Agent skills: folders in .github/skills, each with a SKILL.md file, loaded only when relevant.
  • Custom agents: profiles in .github/agents for specialized, recurring work.
  • MCP servers: connect Copilot to outside tools. With Playwright, Copilot can open your app in a browser and test it.
  • Where to start: one convention you keep explaining, added to copilot-instructions.md.

Why Teaching Copilot Your Codebase Matters

Every codebase has house rules: how components are structured, which scripts to run, and which conventions apply to each framework and file type. Copilot can make changes across a project, but GitHub says it “works best when it knows those rules, too.”

GitHub’s example: you ask Copilot to add a custom page size to an app. Making the change is only part of the job. The new code should also follow the patterns your team already uses. Most of that knowledge can live inside the repository, so Copilot picks it up automatically.

MethodWhere it livesBest for
Custom instructions.github/copilot-instructions.md and .github/instructionsStandards that shape many tasks
Agent skills.github/skills/<skill-name>/SKILL.mdA specific procedure, like quality checks
Custom agents.github/agentsRecurring, multi-file work that needs a dedicated role
MCP serversAdded in the Copilot appAccess to tools, data and services outside the repo

1. Copilot Custom Instructions

Custom instructions give Copilot baseline context for the whole repository.

Repository-wide file: add .github/copilot-instructions.md. Use it for guidance that applies everywhere, such as:

  • Your preferred architecture
  • Naming conventions
  • Expectations for testing and validation

Path-specific files: create instruction files inside .github/instructions. Each one uses an applyTo field that tells Copilot which files the guidance covers. When Copilot works on a matching file, it uses both the repository-wide instructions and the specific ones.

This lets you keep broad rules in one place without forcing every file type into the same mold.

2. Agent Skills for Repeatable Procedures

Some guidance only matters during a particular procedure, such as running quality checks, preparing a release, or debugging a failed workflow. That is what agent skills are for.

A skill is a folder with instructions and, optionally, scripts and other resources. Copilot loads it only when it is relevant.

  • Project skills live in .github/skills, one subfolder per skill.
  • Example: .github/skills/quality-checks/SKILL.md explains your testing and linting process.
  • The description in SKILL.md helps Copilot decide when the skill applies.

In GitHub’s example, after updating an interface, Copilot loads the quality-checks skill and follows the project’s process for testing and linting “instead of guessing which commands to run.”

3. Custom Agents for Bigger Jobs

Some tasks are larger than a single procedure. An accessibility review, for example, may mean inspecting components, templates, styles and interactions across many files.

Custom agents are specialized versions of Copilot for this kind of work. A repository-level agent profile lives in .github/agents and can define:

  • The agent’s purpose
  • Its instructions
  • The tools it can use
  • Relevant project context

GitHub suggests a custom agent when a recurring type of work benefits from a dedicated role, especially if it spans multiple files and several tools or sources of context.

4. MCP Servers: Let Copilot Use Outside Tools

Instructions, skills and agents help Copilot understand how to work inside your project. MCP servers (Model Context Protocol servers) expand what it can access and do beyond the repository by connecting it to external tools, data sources and services.

  • A documentation server can give Copilot access to framework guidance.
  • A Playwright server lets Copilot open and interact with your app in a browser.

You can browse available MCP servers in the Copilot app or add a custom one. Once Playwright is configured, GitHub suggests a prompt like:

Use the Playwright MCP server to test the functionality manually.

Copilot then opens the app in a browser and interacts with it “much as you would.” This is the most interesting part: Copilot can check not only that the code passes automated checks, but also that the updated interface actually behaves as expected.

How to Get Started with Copilot Custom Instructions

GitHub’s advice is to start small:

  1. Pick one convention you keep explaining to Copilot.
  2. Add it to .github/copilot-instructions.md.
  3. Watch how Copilot applies it to your next task.

When you are ready for more, look at Awesome Copilot, where the community shares ready-made instructions, skills, agents and more. Find one that matches a workflow you already repeat, review what it contains, and adapt it to your repository’s tools and standards.

Are These Customizations Worth the Effort?

Pros

  • You stop repeating the same rules in every prompt.
  • Rules live in the repo, so the whole team shares them.
  • Skills and path-specific instructions load only when relevant.
  • MCP servers like Playwright let Copilot test the real interface.

Cons

  • You need to write and maintain the files as your project changes.
  • Community resources need reviewing and adapting before use.
  • MCP servers need setup before Copilot can use them.

Verdict: start with a single custom instruction. It is the cheapest way to make Copilot’s output match your team’s style, and you can add skills, agents and MCP servers later as real needs appear.

Copilot Custom Instructions FAQ

Where do Copilot custom instructions go?
Put repository-wide rules in .github/copilot-instructions.md, and path-specific rules in files inside .github/instructions that use an applyTo field.

What is the difference between custom instructions and agent skills?
Custom instructions shape many tasks. Agent skills cover a specific procedure, like quality checks, and Copilot loads them only when relevant.

Where do custom agents live?
In .github/agents. Each profile can define the agent’s purpose, instructions, tools and project context.

Can Copilot test my app in a browser?
Yes. With the Playwright MCP server configured, Copilot can open your app in a browser and interact with it.

Where can I find ready-made Copilot instructions and skills?
The community shares them in Awesome Copilot. Review and adapt them before use.

Sources

Last updated: October 13, 2026

Trạm Công Nghệ AI
Logo
Compare items
  • Total (0)
Compare
0