How to teach GitHub Copilot about your codebase | Tutorial for Beginners
Summary
GitHub Copilot's true power unlocks when you teach it your codebase conventions through four layered controls: instructions files, skills, custom agents, and MCP servers—all stored in your repo so your entire team benefits automatically without extra setup.
Key Takeaways
- Store core Copilot instructions in .github/copilot-instructions.md for global guidance, plus file-type-specific instructions (Astro, Svelte, etc.) with 'applyTo' parameters to enforce framework-specific conventions automatically.
- Package repeatable testing and linting procedures as 'skills' in .github/skills/ with descriptions, script references, and debugging info—Copilot automatically invokes them when needed for quality checks.
- Use custom agents as orchestrators for complex, multi-file operations like accessibility reviews; agents reference project-specific tech stacks and can handle sophisticated workflows beyond single-file assistance.
- Connect MCP servers (Model Context Protocol) to give Copilot access to external services and the ability to interact with live systems—Playwright MCP enables automated browser testing and real-world functionality validation.
- Leverage the awesome-copilot.github.com community repository for ready-made instructions, skills, and agents—eliminating the need to build customizations from scratch.
Related topics
Transcript Excerpt
Context is key in much of life, and certainly when working with AI. Every project has its own conventions, its own scripts, its own way of doing things. And the real magic happens when Copilot knows about them too. The great news is that a lot of that knowledge can live right inside your repo, so Copilot picks it up automatically. Let’s explore the core ways we can drive how Copilot works. Let’s ask Copilot to add in custom page size to our Tailspin Toys. Starting with instructions files, those are typically stored in the ‘.github’ folder. I have one core instructions file, ‘copilot-instructions.md’, that’s used for every call made to Copilot app. There’s also an instructions subfolder with instruction files that are specific to different file types. If I open up the Astro one, we can see …
More from GitHub
- How to run parallel AI agents in the GitHub Copilot app | Tutorial for beginners
- How developers scale their workflows with automation
- How stacked pull requests break down large code changes
- Why OpenClaw feels like the Linux of AI
- Write your first prompt in the GitHub Copilot app | Tutorial for beginners