Home › Agent workflows › Code review Copilot instructions

Code review Copilot instructions

Copilot instructions focused on pull request review: what to flag, severity labels, and how to word comments.

GitHub CopilotAgent workflows

How to use

Save this as .github/copilot-instructions.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.

.github/copilot-instructions.mdDownload  
# Instructions for Copilot code review

When reviewing a pull request in this repository:

## Priorities (in order)
1. **Correctness:** logic errors, unhandled errors or null cases, race conditions, off-by-one, wrong async handling.
2. **Security:** missing auth/authorization checks, injection, secrets in code or logs, unsafe deserialization, unvalidated input.
3. **Data safety:** destructive migrations, missing transactions, breaking API or schema changes without versioning.
4. **Tests:** new behavior without tests, tests that don't assert anything meaningful, skipped tests.
5. **Performance:** N+1 queries, unbounded loops or queries, large synchronous work on hot paths.
6. **Maintainability:** unclear names, duplicated logic, functions doing too much.

## How to comment
- Prefix each comment with a severity: `[blocker]`, `[should]`, or `[nit]`.
- Be specific: quote the line, explain the failure scenario, and suggest a fix (use a suggestion block when it's small).
- One issue per comment. Don't repeat the same nit across files; mention it once.
- Skip style issues the linter or formatter already enforces.
- If something looks intentional but risky, ask a question rather than asserting it's wrong.

## Don't
- Don't request large rewrites unrelated to the PR's goal.
- Don't praise or summarize line by line; give one short overall summary at the top with the blocker count.

More: all Agent workflows rules · all GitHub Copilot rules

Related rules

Code reviewer subagent (Claude Code)

A Claude Code subagent definition that reviews the current diff for bugs, security, and tests, reporting by severity.

Claude Code (CLAUDE.md)Agent workflows

/commit slash command (Claude Code)

A Claude Code /commit slash command that reviews staged changes and writes a Conventional Commits message.

Claude Code (CLAUDE.md)Agent workflows

Git commits & PRs AGENTS.md

AGENTS.md rules for how agents commit: Conventional Commits, atomic changes, safe git commands, and PR descriptions.

AGENTS.mdAgent workflows

Debugger subagent (Claude Code)

A Claude Code subagent for root-cause analysis of errors, crashes, and failing behavior, with a verified minimal fix.

Claude Code (CLAUDE.md)Agent workflows

Systematic debugging CLAUDE.md

CLAUDE.md workflow for debugging with Claude Code: reproduce, isolate, hypothesize, verify, and avoid guess-fixes.

Claude Code (CLAUDE.md)Agent workflows

Markdown docs Copilot path instructions

Path-specific Copilot instructions for Markdown docs and READMEs: structure, runnable commands, and concise style.

GitHub CopilotAgent workflows

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.