Key insight

A model has no memory between requests, so it forgets your project's rules every time. Custom instructions fix that: you write your conventions and context once in a file — copilot-instructions.md, or the cross-tool AGENTS.md — and the assistant adds it to every request automatically. Put in what you'd tell a new teammate on day one. Because it's committed to the repo, the whole team benefits. Keep it short and current — and, since hidden is not secret, never put credentials in it.

If you keep telling your coding assistant the same things — use our style, our testing library, always add types — this is the feature that ends the repetition. It's one of the highest-value things you can set up, and it takes minutes.

1 · Tired of repeating yourself?

Use a coding assistant for a while and you hit this: you keep telling it the same things, and every new chat it forgets, because the model has no memory between requests. Each request starts from a blank desk, so your hard-won corrections evaporate. Custom instructions are the fix. Instead of repeating your project's rules over and over, you write them once in a special file, and the assistant automatically includes them with every request. You teach it your project one time, and it remembers forever.

2 · One file, added to every request

You create a plain text file in your project — in GitHub Copilot, typically copilot-instructions.md in a .github folder, and there's an emerging cross-tool convention, AGENTS.md, that does the same job. In it you write your conventions and context in plain language. From then on, the assistant quietly adds that file's contents to every request, on top of what you type. Think back to the system prompt from prompt engineering: this is you writing a standing instruction layer for your project. You're no longer starting from a blank desk — your rules are already on it. It's the difference between briefing a new contractor every morning and handing them a one-page “how we do things here.”

One file, read with every request copilot-instructions.md feeds into the assistant on every request. copilot-instructions.md read on every request Your rules are already on the desk — you stop repeating them
Figure 1. A standing note the assistant sees every time — the antidote to the model's blank-desk memory.

3 · What goes in it

The best test: what would you tell a talented new teammate on their first day? Your tech stack and versions, so it doesn't suggest the wrong framework or an outdated API. Your coding style and conventions — naming, formatting, file structure. Your do's and don'ts — “always write tests,” “never call the database from the UI,” “prefer this library.” And a quick map of your project structure, so it knows where things live. Keep it focused on what it keeps getting wrong or the context it keeps missing. Every correction you find yourself repeating is a candidate for this file.

4 · A worked example

A custom-instructions file for a web project might just say, in plain bullets: this is a TypeScript React app, use function components; use Vitest for tests and put each next to the file it tests; never use the any type, always type props; all data access lives in /lib/api, never inside components. There's no magic syntax — just clear sentences a human could read, which is exactly right, because the model reads them like any other instruction. With this in place, a request for a new component arrives as a typed function component with a Vitest test beside it and its data access in the right folder — without you saying any of that. You wrote the rules once; now they apply automatically.

5 · It is shared with your team

An advantage that's easy to miss: because this is a file in your project, you commit it to your repository, and that means the whole team shares it. Everyone's assistant now follows the same conventions, so AI-generated code across your team becomes consistent instead of each person's assistant guessing differently. New teammates get your accumulated wisdom the moment they clone the repo. And when conventions change, you update one file and everyone benefits. This turns custom instructions from a personal convenience into a team asset — living documentation that actually gets used, because it's wired into the tool everyone codes with all day.

Committed to the repo, shared by the whole team The instructions file in the repo gives every teammate the same guidance. one file in the repo consistent AI help for everyone Institutional knowledge that finally stays put
Figure 2. Treat it like code: review changes, keep it current, and let it grow as your project does.

6 · Keep it short and current

Two cautions keep this working. First, keep it short: your instructions take space in every request, competing with your code and adding to cost — and a giant file can dilute the important rules until the model glosses over them. A tight file of the rules that matter beats a sprawling one. Second, keep it current: an out-of-date instruction file is worse than none, because it confidently tells the assistant to do the wrong thing — use a library you dropped, follow a convention you abandoned. Prune it as your project evolves, like dead code. The goal is a small, accurate, living note.

7 · The same secret caution applies

A reminder that carries over from prompt engineering: this file is for behaviour and context, never for secrets. It's committed to your repository in plain text, visible to everyone with access and often to the model provider, and fed to the model on every request — exactly the wrong place for an API key, password, or token. Anyone who reads the repo reads the file. Use custom instructions to describe how the assistant should behave and what your project looks like; keep genuine credentials in a secrets manager and environment variables, well away from anything the model sees. This is “hidden is not secret” applied to your project file.

8 · A simple test you can run this week

Stop repeating yourself

1. Note 3 things you keep telling your assistant.
2. Create a copilot-instructions.md (or AGENTS.md) with them.
3. Ask for new code — see it follow the rules unprompted.
4. Confirm no secret lives in the file, and commit it.

The lesson: teach your project once, and the assistant remembers forever.

9 · Glossary — every term, spelled out

Custom instructions
A project file of conventions and context the assistant adds to every request automatically.
copilot-instructions.md
GitHub Copilot's custom-instructions file, typically kept in a .github folder.
AGENTS.md
An emerging cross-tool convention file that many assistants read for project instructions.
Standing instruction layer
Always-on guidance — like a project-specific system prompt — applied to every request.
Team asset
A committed, shared file that gives every teammate's assistant the same conventions.
Hidden is not secret
Invisible or committed text can still be exposed, so the file must never hold credentials.
Key takeaways

The model starts every request from a blank desk, so it forgets your rules — custom instructions fix that.
Write your conventions once in copilot-instructions.md or AGENTS.md; the assistant adds them to every request.
Committed to the repo, it becomes a team asset — consistent AI help for everyone.
Keep it short and current, and never store secrets in it — hidden is not secret.

References

  1. GitHub, Adding custom instructions for Copilot. docs.github.com
  2. AGENTS.md — the cross-tool project instructions convention. agents.md
  3. The Prompt Engineering guide’s System, Developer & User Prompts — the layered instructions this builds on.
  4. This guide’s Instructions Files & applyTo, Explained From Zero — scoping guidance to parts of the codebase.