Copilot Optimize Behavior in VSCode

Veröffentlicht am Autor JonasHinterlasse einen Kommentar

Based on my experience working with VS Code and GitHub Copilot on larger codebases, I can say that, the quality of your prompts plays a critical role in shaping architectural consistency, testability, and maintainability of your project.

When GitHub Copilot receives a purely technical requirement without any guidance on how to approach the task, it does not inherently follow a structured engineering process. Without explicit instructions, the model skips essential steps like creating a formal plan, defining acceptance criteria, or conducting architectural analysis. This can lead to solutions that, while technically functional, may lack the rigor and foresight needed for robust, scalable, and maintainable systems.

To achieve the best results, prompts must not only describe what needs to be done, but also how it should be approached—ensuring the output aligns with engineering best practices.

The Plan

I want only provide my technical requirement and the AI should then follow these steps automatically:

This flow the AI should follow.

This plan/flow/steps it should follow is general enough to add it to most of the prompts and still it lays out a clear workable way that improves the end results the AI delivers.

But since tipping it in every time is painful, I decided to define this a prompt file that is reusable in copilot.

I was coming up with this from my experience from for working with Copilot so it is a proven model and not something I just started to experiment around a view days ago. It really improves the results in practice.

VSCode + Copilot Setup

Here are the steps to create a reusable prompt file in copilot:

Click new prompt file, you are not needing to fill in anything.
Click new prompt file, you are not needing to fill in anything.

 

Select "User Data" to get a prompt that is project independent.
Select „User Data“ to get a prompt that is project independent.
Type in the file name.
Type in the file name.
Then a window with a prompt template will open.
Then a window with a prompt template will open.

The prompt that you want to copy in there, you can download here:
Prompt File (right click save as)

Or copy past it form here:
---
name: FullStackDeveloper
description: Senior Full-Stack Developer with DevOps expertise for production-grade web systems
---
You are a senior Full-Stack Developer with strong DevOps experience.
You design, implement, test, fix, deploy, and operate production-grade web systems.
Think in terms of architecture, scalability, security, and automation.
Prefer best practices and production-ready solutions.
Explain trade-offs briefly.
Ask clarifying questions only when requirements are unclear.


Always flollow these steps:
1. Analyze Scope
2. Constraints Define Target -> Acceptance Criteria
3. Implement/Reimplement
4. Test -> Expectation Met?
5. Fix/Improve -> loop fixing and testing until expectation is met
After 2 fixed after another check if maybe step back to point 3 and redefine target if needed.


Always flollow these steps, not skipping any of them.

As you can see, I also added:
„You are a senior Full-Stack Developer with strong DevOps experience.“
This role-play is another very effective way in order to get an optimized AI behavior.

After adding this to your VSCode you will get the following option in your chat window when typing / :

The result
The result.

Behind this you put your prompt with the technical requirements, and then you can compare if this delivers better results for you.
I use this now regularly.

 

Sources:

VSCode Prompt Files

Curser Prompt for ChatGpt 4.1 Integration

Prompt engineering

Comparing different AI Models with each other

Getting Started with Prompts

Dynamic Context Discovery

 



Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert