Introduction
In this article, we will explore the custom instructions available for GitHub Copilot. Using the custom instructions, you can make GitHub Copilot like a team member who.
They are familiar with the coding standards and guidelines you follow during development.
What are custom instructions?
Now, everyone has started using GitHub Copilot for day-to-day development work, and each person has a unique approach to asking questions or providing prompts to Copilot, resulting in varied responses that depend on the specific questions or prompts. What if everyone gets the reactions in the same format? Sounds interesting, right? Here, the custom instructions come into the picture.
Using the custom instructions, the copilot gives you responses and generates the code as per your coding standards, guidelines, or rules you are following in the project once you set the custom instructions. So, when you use Ask, Edit, or Agent mode during development, it will use those instructions as context and give you responses or generate code in that way. It uses simple natural language instructions in the file and follows the Markdown format with the extension .md
Custom instruction types
The copilot supports multiple methods for defining custom instructions for your project.
- .github/copilot-instructions.md file: Define project-wide code-generation instructions in a single Markdown file that's auto-included in every Copilot request across supported editors and IDEs.
- Instructions.md files: Create Markdown-based code-generation instruction files with glob pattern support for task-specific control, auto-included in Copilot chats in VS Code.
- VS Code settings: Define instructions in VS Code settings or files for tasks like code generation, tests, commits, and PRs—ideal for broader guidance beyond coding.
Create a custom instruction file
There are ways to create instruction files in your workspace or user profile. Workspace instruction files apply only to the current workspace, while user
instruction files are accessible across all workspaces. You can also manually create the instruction file under the '.github' folder.
To create an instruction file
Step 1. Click on the Configure chat or settings icon and select the Instructions option.

Step 2. You will get the two options to select, select the first option, and then it will create the empty *. instructions.md file at '.github/instructions' folder in your workspace after providing the file name.








Join the conversation! Your thoughts help the community grow.