Posted on Oct 3, 2025
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.
.prompt.md
so GitHub Copilot can load and reuse them whenever you need.
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.
.prompt.md
is in your repo, you can call these prompts directly in GitHub Copilot Chat.#Write Unit Tests
./Generate API Docs
.
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.