Custom Instructions: How I Really Made Copilot Listen! | Ep 2 of 8

The video demonstrates how custom instructions in Copilot serve as a powerful rulebook within VS Code, enabling users to enforce coding standards like SOLID principles and WCAG accessibility automatically across projects. By showcasing practical examples, including refactoring code and redesigning a UI, it highlights how these instructions ensure consistent, high-quality code and streamline team collaboration by embedding best practices directly into the AI’s workflow.

The video begins by addressing common misconceptions about custom instructions in Copilot, emphasizing that they are far more powerful than typically portrayed. Custom instructions act as a rulebook for the AI within VS Code, allowing users to define their coding style, conventions, and preferences in a markdown file. Once set, the AI automatically adheres to these guidelines in every interaction, ensuring consistent application of the user’s standards.

To demonstrate, the presenter showcases an existing project—a calculator app—and accesses the customization UI to reveal a custom instruction named “solid principles.” This instruction directs Copilot to apply SOLID design principles when creating or refactoring code. When asked to refactor a JavaScript file, Copilot analyzes the code, identifies areas for improvement based on the SOLID principles, and confirms the changes in the chat. This automation ensures that the code consistently aligns with best practices without the developer needing to manually enforce them.

Next, the video explores creating a custom instruction from scratch, focusing on accessibility. Instead of manually writing the instruction, the presenter uses Copilot itself to generate a WCAG-compliant accessibility instruction file at the user profile level. This file includes detailed guidelines and targets specific file types like HTML and CSS. Once created, Copilot confirms whenever it applies these accessibility standards, streamlining the process of maintaining compliance across the project.

The presenter then tests the new accessibility instruction by asking Copilot to redesign the calculator’s UI with an 80s arcade theme. Copilot not only updates the UI visually but also ensures that the changes meet WCAG accessibility standards, demonstrating how custom instructions influence AI behavior in real-time. This example highlights the practical benefits of custom instructions in maintaining both stylistic and functional consistency in code.

Finally, the video underscores the value of custom instructions for teams, where consistent coding conventions, naming, formatting, and architectural patterns can be enforced across all developers. This reduces the need for post-review corrections and saves time by embedding standards directly into the AI’s workflow. The presenter encourages viewers to explore further customization features and agent skills, inviting feedback and discussion on how custom instructions are used in different workflows.