← Back to Main Page

Supercharge Your Prompts with .prompt.md

Posted on Oct 3, 2025

Usage

Sometimes you want more than style rules. You want GitHub Copilot to reuse rich, detailed prompts that guide its behavior for a specific repo or workflow.
That is where the .prompt.md file comes in. It lets you define reusable prompts that can be referenced across your project, giving you consistent, structured instructions without rewriting them each time.

ProTip
Keep Your Best Prompts Close to the Code
Instead of storing prompts in a doc or typing them fresh each time, define them once in .prompt.md so GitHub Copilot can load and reuse them whenever you need.
Try These Approaches

1️⃣ Define Project Specific Prompts
# .prompt.md
## Generate API Docs
Generate documentation for every public function in this repo. Use a markdown format with clear examples.

GitHub Copilot can reuse this prompt whenever you trigger documentation work.

2️⃣ Add Testing Prompts
# .prompt.md
## Write Unit Tests
For each service, generate Jest tests that cover success and failure paths.

Keeps your test writing flow consistent across the project.

3️⃣ Include Refactoring Prompts
# .prompt.md
## Refactor for Clarity
Simplify code without changing functionality. Add inline comments to explain the final version.

Useful when handing code off to teammates who need quick readability.

Now That You’ve Created Prompts, How to Use Them
Extra Ideas to Try
Quick Takeaway

The .prompt.md file is like a recipe card for your favorite GitHub Copilot prompts.
Keep them with your code, call them quickly with # or /, and save time retyping instructions.