5 tips for creating better custom instructions for Copilot in 2025

Diego Cortés
Diego Cortés
September 4, 2025
5 tips for creating better custom instructions for Copilot in 2025

With the constant evolution of artificial intelligence tools, optimizing their use has become crucial for developers and teams. GitHub Copilot, one of the most popular tools in this field, can enhance productivity and facilitate coding, provided it is given the right information. Below are five essential tips for creating effective custom instructions for Copilot in 2025.

1. Provide an overview of the project

Before starting to code, it is essential to define the project context. This is very helpful for both the team and Copilot. A concrete overview of what is being built will help the tool understand the project’s needs better.

The header of the instruction file should serve as a brief summary of the project. You can include the application name, target audience, and key features. For example:

# Contoso Companions
This is a website to support pet adoption agencies. Agencies integrate into the application, where they can manage their locations, available pets, and advertise events. Potential adopters can search for available pets in their area, discover agencies, and submit adoption applications.

This example shows how to provide Copilot with clear and accessible context, allowing it to contribute more effectively.

2. Identify the technology stack used

Once you have a clear vision of the project, it is vital to point out the technologies employed for its development. This includes both backend and frontend technologies, any APIs used, as well as the testing tools that are targeted. Given the vast number of current frameworks, presenting this information concisely is helpful.

Here’s an example of how this section could be structured:

## Technology stack in use
### Backend
- Flask is used for the API.
- Information is stored in Postgres, with SQLAlchemy as the ORM.
- Separate databases exist for development, staging, and production.
- For end-to-end testing, a new database is created and filled, which is deleted after tests are completed.

### Frontend
- Astro manages the main site and routing.
- Svelte is used for interactivity.
- TypeScript is used for all frontend code.

### Testing
- Unittest for Python.
- Vitest for TypeScript.
- Playwright for e2e testing.

This format offers Copilot a clear view of the technological environment, facilitating its role in code generation.

3. Detail the coding guidelines

Before initiating pull requests, it is important to establish the coding guidelines that will be followed. This includes aspects such as coding style, the use of semicolons in JavaScript, the presence of type hints in Python, and the preference for tabs or spaces.

Although these guidelines can be integrated into the description of the technology stack, it is useful to keep them in a separate section for clarity and maintenance. An example could be:

## Project and coding guidelines
- Always use type hints in any language that supports them.
- JavaScript/TypeScript must use semicolons.
- Unit tests are required and must pass before a PR.
- Unit tests should focus on key functionalities.
- End-to-end tests are required.
- Follow good security practices.

All of this helps Copilot provide suggestions that adhere to established standards.

4. Explain the structure of the project

Every software project has its own organization, and specifying its structure can be very helpful for Copilot. This avoids confusion by allowing the AI to know where to find the necessary files and what functions they serve.

Here’s a brief description of a possible project structure:

## Project structure
- server/: Flask backend code.
- models/: SQLAlchemy ORM models.
- routes/: API endpoints organized by resource.
- tests/: Unit tests for the API.
- utils/: Functions and helpers, including database calls.
- client/: Frontend code in Astro/Svelte.
- src/components/: Reusable Svelte components.
- src/layouts/: Astro layout templates.
- src/pages/: Astro pages and routes.
- src/styles/: Project CSS.

This enumeration helps Copilot understand the location of different elements in the project.

5. Regularly review and update instructions

Custom instructions are not static and should evolve as the project progresses. It is crucial to dedicate time to review and update the content regularly, ensuring it remains relevant.

Leveraging the insights gained through interactions with Copilot will allow for continuous improvement of the instructions. Allowing this file to grow and adapt is essential for maximizing the tool's effectiveness.


Optimizing instructions for Copilot can make a significant difference in code quality and team productivity. By following these tips, you can establish a more effective work environment aligned with project goals. Readers are invited to explore more about these strategies and adjustments in future posts on the personal blog.

Article information

Published: September 4, 2025
Category: Artificial Intelligence
Reading time: 5-8 minutes
Difficulty: Intermediate

Key tips

1

Take your time to understand each concept before moving on to the next one.

2

Practice the examples in your own development environment for better understanding.

3

Don't hesitate to review the additional resources mentioned in the article.

Diego Cortés
Diego Cortés
Full Stack Developer, SEO Specialist with Expertise in Laravel & Vue.js and 3D Generalist

Frequently Asked Questions

Categories

Page loaded in 32.00 ms