Skip to footer content
Iron Academy Logo
C# Tools & Productivity

How To Use Prompt Files in Visual Studio in 10 Minutes or Less

Tim Corey
6m 58s

Prompt files are a relatively new feature that let developers store custom instructions for AI tools like GitHub Copilot in a single, reusable place. In his video “How To Use Prompt Files in Visual Studio in 10 Minutes or Less,” Tim Corey walks through the entire process of creating, saving, and using a Visual Studio prompt file to improve Copilot’s code suggestions and automate common development tasks.

This article follows Tim’s demonstration. Along the way you’ll see how to set up reusable prompt files, where to store them in your project repository, and how to enable them in the Copilot chat view to answer specific tasks or inline chat requests.

Introduction to Prompt Files

At the start of the video (0:00), Tim says prompt files can be “really powerful ways of improving the performance of AI models that you use.” They’re a kind of built-in chat prompt or prompt box for Copilot and other AI tools. Instead of pasting instructions every time, you keep a markdown file inside your project so the system can automatically load it whenever you work.

Setting Up a Sample Project

At 0:24, Tim opens Visual Studio with a fresh .NET 9 console app. No extra configuration—just “file → new project.” This clean slate shows how you can add prompt support to any source code repository.

Tim’s plan: create a prompt file inside the project’s root folder, then demonstrate how to enable it in GitHub Copilot chat to get richer code suggestions and explanations.

Getting the Prompt Content

At 0:38, Tim chooses his example prompt: “Beast Mode,” a community-contributed set of custom instructions by Burke Holland. Tim copies the raw text so he can paste it into his project later (0:59).

He also explains you’ll need access to all the underlying folders. Tim uses the File Explorer extension for Visual Studio (1:01). If you don’t have it, go to “Extensions → Manage Extensions” and search for “File Explorer” (1:05). This tool exposes every file and folder—not just the ones already attached to your solution—making it easy to create and manage reusable prompts or more than one file at once.

Visual Studio Prompt Files 10 Minutes 1 related to Getting the Prompt Content

Creating the Prompt Folder Structure

At 1:40, Tim shows his console sample app’s root folder in File Explorer. You can see the project folder, bin, obj, and so on (1:42).

He right-clicks in the context menu (1:49) and chooses “New Folder,” typing:

.github\prompts
.github\prompts

This single command creates a hidden .github folder and a prompts subfolder (1:58). Tim stresses that “prompts” is plural (2:04). Visual Studio immediately shows the GitHub icon on the folder (2:10), confirming it’s recognized correctly. This is where you store and reference all your prompt files for that project.

Adding the Prompt File

Inside the prompts folder, Tim creates a new markdown file named:

BeastMode31.prompt.md
BeastMode31.prompt.md

(2:17). This is a reusable prompt file containing the instructions for Copilot. Once created, Tim opens it and pastes in the raw text from the gist (2:33). He says he’ll link the gist in his video description (2:36).

Visual Studio Prompt Files 10 Minutes 2 related to Adding the Prompt File

Tim then pauses to warn viewers (2:38–3:09): always read every line of any prompt you download. Hidden in the middle, a malicious prompt could ask to extract keys, send data elsewhere, or modify code in unexpected ways. Tim himself reads “every single word” (2:46). This is a vital security tip when you work with community-contributed examples.

Why This Structure Matters

At 3:13, Tim notes that because the file sits under .github/prompts, if you add the project to source control, the prompt file travels with it (3:26). Every developer on the team gets the same custom instructions and AI context, making your workflow predictable. You can even define reusable prompts for common tasks and keep them version-controlled just like your source code.

Using the Prompt in Copilot Chat

At 3:31, Tim opens GitHub Copilot Chat in Visual Studio. He enlarges the chat view (3:34), clicks the “+” button (3:39), and sees a list of available prompt files. Because the file is in the prompts directory, Copilot automatically detects it (3:43). Tim clicks on beastmode31.prompt.md and enables it (3:50).

Visual Studio Prompt Files 10 Minutes 3 related to Using the Prompt in Copilot Chat

With the prompt file enabled, Tim chooses which LLM to run. He’s using Claude 4 (3:56), but you could select another Copilot mode or engine. Then he types a test request: “Please add dependency injection and configuration to this project” (4:09). This is a typical common development task where a good prompt can help Copilot generate the right code and explain each step.

Watching Copilot Work With the Prompt

Tim shows how Copilot starts using the prompt file (4:15). It loads the Beast Mode instructions first, then produces a checklist of steps (4:34). Copilot even asks permission to install packages (4:37).

Tim mentions Burke Holland recommends allowing auto-approve (4:46), but Tim himself prefers to click “Allow” manually each time (5:01). He never clicks “Always allow” or “Allow in this session” (4:53). This keeps him in control of what the AI actually executes.

Visual Studio Prompt Files 10 Minutes 4 related to Watching Copilot Work With the Prompt

As Copilot works through the steps, it adds the needed packages, modifies code, and creates configuration files like appsettings (6:17). Tim demonstrates denying a command he’s unsure about (5:44–5:49). You can research a command first, then decide (5:52–5:58). This prevents the AI from “hallucinating” and doing things you don’t intend (6:06).

This part of the video shows exactly how to run prompts, select prompts, and use them for specific tasks right inside your editor—without copying and pasting text into every new session.

The Big Takeaway: Reusable Prompt Files

By the end (6:23), Tim highlights the “big deal”: using a prompt file ensures the LLM does things the way you want—research first, follow your instructions, and stay consistent across projects. It’s like giving Copilot a permanent slash command or system message tailored to your workflow.

Tim concludes at 6:34: “That’s how to use a prompt file inside of Visual Studio.” You can create more than one file (for example, separate community examples or common tasks), store them under .github/prompts, and let Copilot discover them automatically.

Conclusion

Tim Corey’s short video demonstrates a complete, real-world use of Visual Studio prompt files:

  • Create a .github/prompts folder in your root folder.

  • Add a .prompt.md markdown file with your chosen custom instructions.

  • Read and vet it before using.

  • Enable it in GitHub Copilot chat view and test with inline chat or prompt box requests.

  • Approve or deny each action manually to avoid unintended changes.

Following Tim’s approach, developers can store, modify, and reuse prompts for common development tasks and specific code generation requests directly inside Visual Studio (or even VS Code, which supports a similar folder structure). This lets AI tools like Copilot provide better answers, explain code, and fit seamlessly into your existing workflow—all while keeping you in control.

Hero Worlddot related to How To Use Prompt Files in Visual Studio in 10 Minutes or Less
Hero Affiliate related to How To Use Prompt Files in Visual Studio in 10 Minutes or Less

Earn More by Sharing What You Love

Do you create content for developers working with .NET, C#, Java, Python, or Node.js? Turn your expertise into extra income!