Urgent.News

What's breaking now, across thousands of outlets.

AI

GitHub Copilot app for Beginners: How to teach Copilot about your codebase

Learn how to add custom instructions and skills to your repository, use custom agents, and connect MCP servers like Playwright. The post GitHub Copilot app for Beginners: How to teach Copilot about your codebase appeared first on The GitHub Blog .

When working with AI like GitHub Copilot, it's essential to provide context about your codebase. Copilot thrives when it understands the specific rules and conventions of your project, such as component structure, scripts, and frameworks. To help Copilot grasp these nuances, there are several techniques you can employ.

First, create custom instructions by adding a .github/copilot-instructions.md file to your repository. This file can outline your project's preferred architecture, naming conventions, testing practices, and more. For specific cases, you can also create path-specific instruction files in .github/instructions, which tell Copilot when to apply the guidance.

Next, package repeatable procedures into agent skills. These skills are folders containing instructions, scripts, and resources that Copilot can access when performing specific tasks, like running quality checks or debugging workflows. Project-level skills can reside in .github/skills, with each skill stored in its own subfolder. By providing the right context, Copilot can follow your established processes more efficiently.

For larger, more complex tasks, consider using custom agents. A custom agent profile, located in .github/agents, defines the agent's purpose, instructions, tools, and relevant project context. Custom agents are particularly helpful when a recurring task requires Copilot to analyze multiple files and leverage various tools or sources of information.

Finally, extend Copilot's capabilities through Model Context Protocol (MCP) servers. These servers allow Copilot to connect with external tools, data sources, and services, expanding its range of actions. Available MCP servers include documentation and testing tools like Playwright. By integrating these external resources, Copilot can verify not only that the code passes automated checks but also that the updated interface functions as intended.

To effectively utilize these customization options, start by identifying key aspects of your project that Copilot repeatedly needs guidance on. Is there a particular project convention you frequently explain? A multi-step procedure you want Copilot to follow consistently? A complex task that would benefit from dedicated expertise? Or an external tool Copilot needs access to? By addressing these questions, you can tailor Copilot to work seamlessly within your codebase.

Written by urgent.news from GitHub Blog's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at github.blog →

More in AI

More from Monday 12 October →