Home › Agent workflows › Code review prompt file (Copilot)
Code review prompt file (Copilot)
A Copilot prompt file (/review-changes) that reviews the current changes and reports issues by severity without editing.
GitHub CopilotAgent workflows
How to use
Save this as .github/prompts/review-changes.prompt.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.
Note: Review and test before use. Provided as is, without warranty. See Terms.
.github/prompts/review-changes.prompt.mdDownload ---
description: Review my current changes for bugs, security issues and missing tests
agent: ask
---
Review the changes in this workspace (staged and unstaged diff). Do not edit any files.
Check, in priority order:
1. **Correctness:** logic errors, unhandled errors and null cases, race conditions, wrong async usage, off-by-one.
2. **Security:** missing auth or ownership checks, injection, secrets in code/logs, unvalidated input.
3. **Data and compatibility:** migrations, breaking API/schema changes, missing transactions.
4. **Tests:** new behavior without tests; tests that don't assert anything meaningful.
5. **Maintainability:** confusing names, duplication, overly complex functions.
Skip formatting and anything a linter enforces.
## Output format
- First line: `Verdict: approve | approve with nits | changes requested`.
- Then sections **Blockers**, **Should fix**, **Nits** (omit empty ones). Each item: `file:line` — the problem, why it matters, and a concrete fix (a code snippet if short).
- End with up to three questions for the author if intent is unclear.