What Is copilot-instructions.md?
GitHub Copilot's project rules file, and how to write one
You spot a copilot-instructions.md in your project's .github/ folder — don't panic. It's a set of project-level instructions written for GitHub Copilot: plain language telling it what the project is, what tech it uses, and what rules to follow when writing code, so its completions and chat fit your project better.
It's just an ordinary Markdown file, written the same way as a README — except the reader is Copilot, not a person. It lives in your repo's .github/ folder, where supported Copilot environments read it automatically.
This article covers what it is, where it goes, what to put inside, how to write your own, and how to open this local .md in your browser to read it clearly and save it back locally.
If you have more than just Copilot and rules files are piling up, see How to Manage Your AI Coding Rule Files; to understand what these files are in general, see What Are AGENTS.md / CLAUDE.md.
What copilot-instructions.md actually is
- In one line: a "project briefing" you write ahead of time for GitHub Copilot. It reads this before it works and tries to follow your project's rules.
- Format: plain text plus Markdown syntax, with the
.mdextension — written the same way as a README. - Location: by convention it goes in the
.github/folder in your repo root, and the filename is literallycopilot-instructions.md. - How it differs from typing in chat: what you type in chat applies that one time; rules written into this file are "standing notes" it reads every time, so you don't have to repeat yourself.
Where it goes, and how it takes effect
Putting it in the right place is the prerequisite. The convention is .github/copilot-instructions.md in your repo root. In supported Copilot environments (like VS Code's Copilot Chat), it's read automatically as project-level instructions.
Whether you need to enable it in your editor's settings, and the exact read behavior, depend on GitHub's and your editor's official docs — this area changes fast, so don't place it on a hunch. Wrong folder or wrong filename, and it's just for show.
What usually goes inside
No need for an essay — cover the project across a few areas and that's plenty:
| Section | What it usually says | Why write it |
|---|---|---|
| Project overview | What the project is, the tech stack and frameworks | Let Copilot grasp in one line what the project does |
| Code conventions | Naming style, directory structure, which libraries, preferences | Make its suggestions follow your rules |
| What not to do | Patterns to avoid, files not to touch | Avoid the pitfalls you don't want |
| Output preferences | Comment language, commit format, how to write tests | Make its output fit your habits |
The trick: write specific conventions that are easy to get wrong, like "state via Zustand, don't introduce Redux" or "comments in English" — far more useful than a vague "keep the code clean."
How to write it: a good-enough example
A first version that clearly covers "what the project is, what to follow, and what not to touch" is plenty. Here's what good-enough looks like:
# Copilot project instructions
## What this project is
A React + TypeScript front-end, built with Vite.
## Coding conventions
- Function components + Hooks, no class components
- State via Zustand, don't introduce Redux
- Styles in CSS Modules, named xxx.module.css
## What not to do
- Don't change config under src/config/
- Don't hard-code API URLs in components, go through src/api/
## Output preferences
- Comments in English
- One line per change explaining what changed A few key points:
- Use plain language, don't pile on jargon.
- Keep it short — ideally readable within a screen or two; too long and both Copilot and you will skip it.
- Write conventions you can verify, so it's easy to check afterward whether it followed them.
- To get symbols like
#,-, and code blocks right, see How to Write Markdown.
How it differs from CLAUDE.md and AGENTS.md
They do similar jobs — project rules written for AI coding tools — differing mainly in filename and where they go. Always defer to the official docs of the tool you're actually using, since this area changes fast.
| Filename | Who it's for | Where |
|---|---|---|
.github/copilot-instructions.md | GitHub Copilot | In the repo's .github/ folder |
CLAUDE.md | Claude Code | Project root |
AGENTS.md | A general convention (Codex etc.) | Project root |
.cursorrules / .cursor/rules/ | Cursor | Project root |
Write the one that matches the tool you use. For managing a whole pile of them, see How to Manage Your AI Coding Rule Files.
Open this local copilot-instructions.md with NoteLoom
Whether this file was generated by an AI or written by you, once it lands on your disk it's just a local .md. NoteLoom is an editor that reads and writes local md files right in the browser, which makes it a good fit for opening, reading, and editing it.
Let's be clear about the boundaries up front: NoteLoom has no AI whatsoever, and it doesn't integrate with GitHub Copilot, Claude Code, Cursor, or git. It won't write rules for you, won't generate or summarize, and can't make Copilot "listen to you better." All it does is let you open this file, read it clearly, edit it, and save it back to your disk.
It gives you three views for reading the same file:
| View | How it helps you read / edit this rules file |
|---|---|
reading | Renders the rules file as formatted text so you can read it calmly and see how many sections there are and what each covers (read-only, no edits) |
live | Edit while seeing the formatting — handy for adding a line to a rule or tweaking a convention |
source | See the raw Markdown symbols — use it to check that lists, code blocks, and paths are written correctly |
Here's roughly how you use it:
- Open
app.noteloom.ccin Chrome, Edge, or Arc. - Select your repo's
.githubfolder (NoteLoom has to mount a folder before it can read or write, and it skips dot-folders when you mount a parent, so point it straight at.github). - Open
copilot-instructions.mdfrom the file tree. - Use the
readingview to see the formatting first; switch toliveorsourceto edit. - When you're done, it writes straight back to the original local file — no account involved, nothing goes to the cloud.
Common pitfalls
- Wrong folder or filename: not in
.github/, or the wrong name, and Copilot simply can't read it. Place it per the official docs. - Writing it too long and exhaustive: a rules file of hundreds of lines is one neither Copilot nor you will bother reading. Keep the few most important, most error-prone points.
- Assuming it forces Copilot to obey: it's a strong suggestion, not a hard lock — review the important changes yourself.
- Opening it in Notepad shows a pile of
#and-: that's just unrendered text, not a broken file. Switch to an editor that displays Markdown formatting. - Expecting NoteLoom to understand or execute it: it won't. NoteLoom only opens, reads, edits, and saves this local file — it doesn't connect to any AI tool and doesn't run the rules inside.
FAQ
Does copilot-instructions.md have to go in the .github/ folder?
If I write copilot-instructions.md, will Copilot always follow it?
Are copilot-instructions.md, CLAUDE.md, and AGENTS.md the same thing?
Can I use copilot-instructions.md without VS Code?
Can NoteLoom generate copilot-instructions.md for me?
Can I open it with NoteLoom on my phone or in Safari?
Open your copilot-instructions.md and read it clearly
Open NoteLoom in Chrome / Edge / Arc, mount your repo's .github folder, read copilot-instructions.md in the reading view, and switch to live to edit and save it back locally — no software to install and no account to sign up for.