Custom instructions and prompt files in 60 seconds
AI toolsRepository filesAWS: Amazon Q Developer project rules
What it is
Markdown files that steer Copilot: .github/copilot-instructions.md for every request in a repo, .instructions.md files with applyTo for some paths, and .prompt.md files for reusable prompts.
Simulate it »✅ Use it when
- House style and stack
- Review standards for code review
- Repeatable team tasks
🚫 Not the best fit when
- Secrets or personal data in the files
- Very long instructions that crowd out context
💰 Price feel: ●○○○ Free or very cheap
Free: plain files in your repository
Illustrative pay-as-you-go list prices at approximate exchange rates. Use the Azure pricing calculator for real quotes.
Simulate it
🖱️ Drag to rotate · scroll or pinch to zoom
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.
🤔 What happens if…
Read this tour as text
- 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.
- 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.
- 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. - 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.
- 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.
- Custom instructions. Repository instructions (
.github/copilot-instructions.md) and path-specific.instructions.mdfiles are added to requests automatically, so the house rules travel with every prompt. - 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.
- 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.