Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Compare

Custom instructions vs prompt files vs custom agents

30-second answer

Custom instructions are rules Copilot adds to requests automatically (.github/copilot-instructions.md, or .instructions.md files with applyTo). A prompt file (.github/prompts/*.prompt.md) is a reusable request you run on demand with /name. A custom agent (.agent.md) is a named persona with its own instructions and tools.

Simulate it »

Side by side

↔ Swipe the table to see every column.

Repository instructionsPath-specific instructionsPrompt fileCustom agent
File.github/copilot-instructions.md.github/instructions/*.instructions.md.github/prompts/*.prompt.md.github/agents/*.agent.md
When it appliesEvery request in the repoRequests about files matching applyToOnly when you run /nameWhen you pick the agent
Good forHouse style, stack, rulesRules for tests, docs, a folderRepeatable tasks done the same wayA role with limited tools
Used byChat, coding agent, code reviewChat, coding agent, code reviewChat in the IDEIDE, CLI, coding agent

Prices are illustrative pay-as-you-go list prices converted at approximate rates, for "price feel" only. Check the Azure pricing calculator for real quotes.

Which one should I pick?

  • Repository instructions

    Pick it when every answer should follow the same team rules

  • Path-specific instructions

    Pick it when rules only make sense for some files

  • Prompt file

    Pick it when the team runs the same multi-step request again and again

  • Custom agent

    Pick it when you want a specialist (test writer, reviewer) with its own tools

Simulate it

3D Prompt crafting: what you give Copilot decides what you get Write each file and watch Copilot use it.

🖱️ Drag to rotate · scroll or pinch to zoom

Loading the 3D scene…
</> Embed

Embed this simulation

Free for trainers, teachers and bloggers. Paste this into your page:

Custom instructions

Repository instructions (.github/copilot-instructions.md) and path-specific .instructions.md files are added to requests automatically, so the house rules travel with every prompt.

Read this tour as text
  1. A vague prompt. Copilot only knows what is in the prompt. “Write a function” leaves it to guess the language, inputs, outputs and rules, so you get something generic.
  2. Structure: goal, context, constraints. A good prompt has a goal (what and why), context (which code, which framework) and constraints (style, edge cases, what not to do). Short is fine; vague is not.
  3. How context is chosen. In chat, Copilot uses the active file and any selection, plus what you add: #file, #codebase (search your workspace), #terminalSelection, images, or a participant such as @workspace. Inline suggestions also use open tabs, so close unrelated ones.
  4. Zero-shot and few-shot. Zero-shot: just the instruction. Few-shot: include one or more examples of the input and the output you want, then ask. Few-shot wins when your format is unusual.
  5. Break it down, then iterate. Split a big task into small steps and check each answer. Then iterate: keep what’s right and ask for the next change. Prompting is a conversation.
  6. Custom instructions. Repository instructions (.github/copilot-instructions.md) and path-specific .instructions.md files are added to requests automatically, so the house rules travel with every prompt.
  7. Chat history is context too. Earlier messages in the same conversation go into the prompt. That helps follow-ups (“now add tests”) but old, unrelated turns can confuse the answer and fill the context window.
  8. The prompt process, end to end. Your words + selected context + instructions + history → the prompt. The model answers, you review, then refine. Better input, less clean-up.

Questions people ask

Does Copilot read AGENTS.md?

Yes, agents such as Copilot coding agent and Copilot CLI read AGENTS.md files as instructions, alongside .github/copilot-instructions.md.

Do instructions replace a good prompt?

No. They add standing rules; you still describe the task, the context and the outcome in each prompt.

Learn each one properly

More comparisons

Install MSDEVBUILD Azure

Free · no account · works offline

Save the whole course for offline ›

Hi, I’m your Nimbus

Your study buddy. Pick what we do next.

MSDEVBUILD · Multi-Stack Dev Build

Sign in to MSDEVBUILD

One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.