---
name: nextjs-audit
description: Use when the user explicitly wants changed React or Next.js files audited against Vercel best practices with a bias toward high-impact issues.
---

# Next.js Audit

Use `$vercel-react-best-practices` and audit the changed React or Next.js code with a bias toward high-impact issues.

## Workflow

1. Inspect the changed files and diff first.
2. Review only the rules that actually apply to the changed code.
3. Prioritize issues by user impact and production risk.
4. Skip theoretical advice that does not matter for this change.

## Priorities

- Waterfalls and unnecessary sequential work
- Bundle size regressions and unnecessary client-side loading
- Server and data-fetching inefficiencies
- Re-render and hydration issues
- Lower-level JavaScript performance only when it is material

## Report

Group findings by severity: `critical`, `high`, `medium`, `low`.

For each finding, include:

- category and rule
- file and line reference
- why it is a real issue here
- the smallest reasonable fix

End by asking whether to apply the fixes.

## Rules

- Focus on the changed code, not the whole app.
- Do not invent issues to fill categories.
- Prefer concrete, testable recommendations.
