A curated collection of reusable, tested prompts for common coding scenarios.
| Category | Focus | Prompts |
|---|---|---|
| generation/ | Writing new code from a specification | Function, class, API endpoint |
| debugging/ | Diagnosing and fixing problems | Symptom-based debug, explain error |
| refactoring/ | Improving structure without changing behavior | refactor-for-clarity.md, extract-function.md |
| testing/ | Writing tests for existing code | write-tests.md |
| documentation/ | Writing and improving docs | write-docstring.md |
| review/ | Reviewing code for quality, style, and correctness | code-review.md |
| security/ | Identifying vulnerabilities and applying fixes | security-audit.md |
| migration/ | Migrating API call sites incrementally | migrate-api.md |
There are two ways to invoke a prompt from this library:
Manual (works with any prompt in this directory):
- Find the prompt that matches your task.
- Copy it and fill in the
[UPPERCASE]placeholders with your values. - Paste it into the Copilot chat panel in the appropriate mode (listed in the prompt file).
- If results are poor, try the tips and failure notes at the bottom of each prompt file.
Runnable via / (when promoted to .prompt.md):
Any Markdown prompt in this directory can be promoted to a runnable VS Code prompt file.
Once promoted, it lives at .github/prompts/[name].prompt.md and you invoke it with /[name] in chat —
no copy-paste, with typed variable inputs.
See Module 04 — Prompt Engineering, Prompt Files section for the migration steps and frontmatter schema. Module 04 walks through a single end-to-end conversion in its prompt-files section.
Follow templates/prompt-template.md and open a PR. Verify that the prompt produces correct output before submitting.
When the prompt is general enough to be reused unchanged, also add the runnable
.prompt.md form under .github/prompts/ and cross-reference both files from each other's description line.
All prompts are marked with whether a frontier model is recommended.
Frontier model recommended: no means auto model selection handles this well.
Only pin a frontier model when the task involves complex reasoning, multi-step logic, or security analysis.