Providing AI with codebase context reduces repetitive prompting and ensures generated code follows team standards. By using custom instructions and MCP servers, engineers can automate complex workflows and integrate external tools directly into their AI-assisted development cycle.
Context matters when you’re working with AI. Every codebase has its own house rules: how components are structured, which scripts to run, and which conventions apply to different frameworks and file types.
Copilot can help you make changes across a project, but it works best when it knows those rules, too. Much of that knowledge can live inside the repository, so Copilot can pick it up automatically instead of requiring you to explain the same standards, scripts, and workflows every time you start a new task.
In this installment of our GitHub Copilot app for Beginners series, we’ll look at four ways to tailor how Copilot works with your project:
Let’s look at how each one works and how they can work together.
Suppose you ask Copilot to add a custom page size to an application. Making the change is only part of the job. The new code should also follow the patterns your team already uses.
Repository custom instructions give Copilot that baseline context. Add a .github/copilot-instructions.md file to define guidance that applies across the repository, such as your preferred architecture, naming conventions, or expectations for testing and validation.
You can also create path-specific instruction files inside .github/instructions. These files use an applyTo field to tell Copilot when the guidance is relevant.
When Copilot works on a matching file, it can use both the repository-wide instructions and the more specific guidance. That lets you keep the broad rules in one place without forcing every file type into the same mold.
Custom instructions are useful for standards that should shape many tasks. But some guidance only matters when Copilot is performing a particular procedure, such as running quality checks, preparing a release, or debugging a failed workflow.
That’s where agent skills come in. A skill is a folder containing instructions and, optionally, scripts and other resources that Copilot can load when they’re relevant. Project-level skills can live in .github/skills, with each skill in its own subfolder.
For example, a .github/skills/quality-checks folder could contain a SKILL.md file that explains:
The description in SKILL.md helps Copilot determine when the skill applies. After updating the interface, Copilot can load the quality-checks skill and follow the project’s established process for testing and linting instead of guessing which commands to run.
Some tasks are larger than a single procedure. An accessibility review, for example, may require Copilot to inspect components, templates, styles, and interactions across multiple files.
Custom agents let you create specialized versions of Copilot for work like this. A repository-level agent profile lives in .github/agents and can define the agent’s purpose, instructions, tools, and relevant project context.
Use a custom agent when a recurring type of work benefits from a dedicated role or perspective, especially when the task may span multiple files and draw on several tools or sources of context.
Instructions, skills, and agents help Copilot understand how to work within your project. MCP servers expand what it can access and do beyond the repository.
MCP servers connect Copilot to external tools, data sources, and services. A documentation server can give it access to framework guidance, while a server such as Playwright can let it open and interact with your application in a browser.
You can browse available MCP servers in the Copilot app or add a custom one. Once Playwright is configured, you can ask: Use the Playwright MCP server to test the functionality manually.
Copilot can then use Playwright to open the application in a browser and interact with it much as you would. That gives it a way to verify not only that the code passes automated checks, but also that the updated interface behaves as expected.
These customizations solve different problems, but they become more useful when you combine them:
Giving Copilot useful project context starts with four questions:
Not sure where to begin? The community has shared ready-made instructions, skills, agents, and more through Awesome Copilot. Find one that addresses a workflow you already repeat, review what it contains, and adapt it to your repository’s tools and standards.
Start small: choose one convention you keep explaining, add it to .github/copilot-instructions.md, and see how Copilot applies it to your next task.
The post GitHub Copilot app for Beginners: How to teach Copilot about your codebase appeared first on The GitHub Blog.
Continue reading on the original blog to support the author
Read full articleExperienced engineers demonstrate that AI tools are most effective when integrated with established practices like TDD and custom personas. This shift toward "agentic engineering" allows developers to focus on high-level design and architectural integrity while maintaining code quality.
This workflow bridges the gap between AI-driven code generation and manual engineering, allowing developers to leverage AI for bulk tasks while maintaining full control over local testing, debugging, and final code quality within their primary IDE.
This shift to agentic workflows and ambient intelligence redefines the developer experience. It moves the focus from syntax and manual tasks to high-level intent and judgment, requiring engineers to master context management and AI steering to maintain productivity and code quality.
Hackathons provide a high-density learning environment that bridges the gap between theory and practice. With AI tools lowering technical barriers, they empower engineers to rapidly prototype ideas, foster collaboration, and solve real-world problems without the fear of failure.