copilot-instructions.md is a great entrypoint for AI coding assistants
I spent the first week building a project yelling at my AI.
Okay, not literally yelling, but definitely aggressively typing. I kept finding myself repeating the same things: "My blog posts are written in markdown and do not generate HTML SEO tags", "Always use the container component when displaying text", etc.
It felt like onboarding a new intern every single session. The context window would reset. I was spending more time steering the AI than actually building.
Then I dropped a single file into my repo, and today, there's no more back-and-forth. The AI just does what I want.
The "Magic" File
The file is .github/copilot-instructions.md.
I stumbled upon it while digging through documentation, and honestly, the concept was so simple - it just appends this file to the prompt every time the AI is called.
Here is the lesson I learned the hard way: Manual first drafts are boring.
If you try to write this file from memory, you'll stare at a blank cursor and wonder what's actually important. You'll miss the obvious things.
Instead, I let the tooling do the heavy lifting. Github Copilot on VSCode has a "Generate Instructions" feature in the settings. I hit that button, and it scanned my repo and spit out an outline.
| Generate Instructions | The Automatic Prompt |
|---|---|
![]() | ![]() |
The raw output was surprisingly good. It nailed the folder structure, the package.json scripts, and even some of the weird project quirks (like my starfield component).
Then, I just pruned the filler. I added my specific pet peeves ("do NOT edit ui components directly") and saved it. Ten minutes, tops.

I’ve made it a habit now:
- •Create it early. Don't create it at the beginning, but after you first big feature.
- •Update it when the architecture changes. If I switch routing libraries, I update the doc. (rather, ask the AI to)
- •Patch the blind spots. If the AI keeps messing up a specific pattern, I add additional context to the file.
Give It a Shot
If you're using Copilot, Cursor, or any modern AI coding tool, try this. Generate the file, trim the fat, and commit it.
It’s a five-minute investment that saves you a slow drip of correction for the rest of the project. And honestly? It’s just nice to not have to repeat yourself.

