published on 03 April 2026
For some reason it was pretty hard to find documentation online on how to add cross-workspace custom user instructions to Copilot prompts in VSCode.
The docs usually only talk about the ones you can put into your repo at .github/copilot-instructions.md. That’s a bit tedious to do for every project though and the way you like Copilot to dance might annoy your colleagues.
I did find this neat document with an even neater title: Azure Cosmos DB for NoSQL best practices in GitHub Copilot for Visual Studio Code and although its title seems sort of unrelated, it at least tells you where to put the files. That’s
~/.config/Code/User/prompts/*.instructions.mdfor Linux.
So here’s my file:
global.instructions.md
copy# Instructions for Copilot
- Reply in English.
- You are on a Linux host.
- My shell is the fish shell, not bash! When running commands always use bash-compliant shellcode and execute using bash -c.
- Any plan files you write to disk should be put in a `agent-plans/` folder in the project with a `agent-plans/.gitignore` containing `*`.
- Give your plan files descriptive names, not just `PLAN.md`. When asked to write a new plan, do not replace/update the old ones, unless specified.
- Do not execute long inline scripts (>10 lines) as agent. Always write them to files first and then run them. They should be put in a `agent-scripts/` folder in the project with a `agent-scripts/.gitignore` containing `*`.
- Do not use `cat > script.py << 'EOF' ... EOF` syntax for writing files when running a command as agent. Write the file to disk using your native file write capabilities and then execute using `python script.py`. This applies to all scripting languages, including bash.