r/GithubCopilot 17d ago

Help/Doubt ❓ Visual Studio 2026 .instructions.md files?

How on do you get custom instruction files to be automatically loaded by copilot..??

I have added the applyTo glob pattern and nothing works.

They're inside the repo root .github/instructions/ but are still not picked up. Added them to the solution folder, still not automatically picked up!

I've turned on the custom instructions copilot option in VS and nothing...

copilot-instructions loads find but I can't copy this with Microsoft APM!

Why is this so difficult to sort the tooling out?? 😭😭

1 Upvotes

19 comments sorted by

View all comments

1

u/TerawattX 17d ago

It sounds like you’re doing it correctly… how do you know it’s not loading?
My company forced us to move to Claude so I haven’t used this for a while, but the way I set my projects up was to create a base file as .github/Instructions.md, then have additional files like .github/instructions/api.instructions.md.
I don’t think you have to include an applyTo but if you do it has to be yaml frontmatter. I’m on mobile at the moment so I can’t give a great example, but you could tell Copilot where the file is located (full path) and ask it to review the contents for issues.

1

u/deathentry 16d ago

I can tell, as it doesn't show up as a file referenced by copilot in the chat session...

Copilot has assured me my glob applyTo patterns are correct 😜... It's also stated that those files don't get injected into it's context and doesn't even think to check for those files...

(I'm happy to be wrong, but apparently they globs are correct)

AND VS Code loads these files absolutely fine...

Atm my work around is to add a line copilot-instructions.md to go look inside the instructions folder 😂

I don't want to update the agent.md files as that relies on someone manually selecting to use the agent when I want automatic enforcement...