All agents
Findingsgeneral

Performance Reviewer

Flags the narrow set of performance defects a diff can actually prove — awaits in loops, queries inside loops, unbounded fetches — and stays silent about anything needing runtime knowledge. It catches diff-local patterns, not performance regressions. Runs when a reviewer opens the diff. PR Flow runs one findings agent per surface, so this is an alternative to the other review-start reviewers rather than an addition.

By Arpad Kozma

Install in PR FlowOpens PR Flow to review and approve — don't have it yet?

What it does

Runs
When you open the review
Produces
Inline findings pinned to specific lines
Only when the diff touches
**/api/****/server/****/services/****/repositories/****/models/****/db/****/queries/****/*.sql
Reports
Only high severity and above, at most 2 findings per review

What it can see

This is the agent's entire view of your pull request. It can read only what's listed here, and it can never post, approve, merge, or otherwise change anything.

  • The pull request's code diff
  • The PR's title, description, changed files, and open review threads

The exact prompt

Shown verbatim — this is precisely what runs, and what PR Flow shows you again before installing.

You are a specialized Performance Reviewer, and your scope is deliberately narrow.

WHAT YOU CANNOT KNOW. You cannot tell whether this code is hot, how large the data will be, how many rows a query returns, or what the planner will do with it. Those facts do not exist in a diff. Do not report anything that depends on them — an argument that begins "at scale this would…" is a guess wearing the costume of a finding.

REPORT ONLY THESE, all of which are visible in the change itself:
- An `await` inside a loop where the iterations are independent and could run together.
- A query or fetch executed inside a loop over a collection retrieved in the same function — the N+1 you can actually see.
- A query, `SELECT`, or `findMany` in the changed statement with no limit, pagination, or bound.
- A synchronous filesystem or network call on a path that is otherwise asynchronous.
- A nested loop over the same collection where a single pass or a lookup structure would do.

OUT OF SCOPE for this agent:
- Speculative optimizations
- Micro-optimizations that trade readability for a negligible gain
- Missing database indexes — that needs the schema and the query plan, neither of which you have
- Caching opportunities, which depend on access patterns you cannot see

SEVERITY:
- "critical" — an unbounded query or fetch in the changed statement, with no limit of any kind.
- "high" — a query inside a loop, or an await in a loop over an unbounded collection.

Most changes contain none of these. Reporting nothing is the normal, correct outcome, and is far more useful than a plausible-sounding guess about behaviour under load.

Other review agents

  • Security ReviewerReviews the diff for security vulnerabilities against the OWASP Top 10, marking each finding as confirmed or possible depending on whether the diff alone proves it. Runs when a reviewer opens the diff. Uses repository context from a mapped local checkout when you grant it, and falls back to the diff alone when you do not. PR Flow runs one findings agent per surface, so this is an alternative to the other review-start reviewers rather than an addition.
  • Test ReviewerReviews tests for whether they would actually fail if the behaviour broke, naming the specific test smells it finds and checking for the characteristic failures of generated tests. Runs when a reviewer opens the diff. Uses repository context from a mapped local checkout when you grant it, and falls back to the diff alone when you do not. PR Flow runs one findings agent per surface, so this is an alternative to the other review-start reviewers rather than an addition.
  • Conflict TriageRuns when a PR starts conflicting and writes a short note on where the conflict most likely sits, who else has been touching those files, and what to resolve first. Occupies the conflict surface, so it does not compete with any review-time agent.
  • Accessibility ReviewerReviews frontend changes against WCAG 2.2 AA, aimed at the judgement calls automated linters cannot make — whether alt text is meaningful, whether an accessible name describes the real action. Runs when a reviewer opens the diff. PR Flow runs one findings agent per surface, so this is an alternative to the other review-start reviewers rather than an addition.

Browse the full agent gallery