Review client-side changes in any frontend stack (React, React Native, Angular, Salesforce LWC, plain TypeScript, CSS) and deliver severity-labelled findings with concrete fixes and a merge verdict — correctness, architecture boundaries, types, accessibility, styling, SSR and hydration, security, performance, tests and maintainability.
When agents use itUse this whenever the user asks to review a pull request, diff, component or file, asks "is this good", "what's wrong with this", "any issues here" or "anything I should fix before I open this PR", or pastes frontend code and asks for feedback. Server-side code in the same pull request goes to `backend-code-review`; a bug in pasted code with no review intent goes to the stack's development skill.
Install
Copilot (VS Code, Visual Studio, Copilot CLI and github.com) reads skills from the repository — commit them so the whole team gets them.
npx skills add AGCO-Global/org-skills --skill frontend-code-review -a github-copilot
# or with the org installer (adds .github/skills/frontend-code-review):
npx -y github:AGCO-Global/org-skills add skill frontend-code-review
Uses the open skills CLI. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, OpenCode, Windsurf and 60+ others — it asks which agent to install into.
Installs the frontend-shared-skills plugin, which bundles all Frontend / Shared skills and keeps them updated.
/plugin marketplace add AGCO-Global/org-skills
/plugin install frontend-shared-skills@org-skills
# or just this skill, in this repository:
npx skills add AGCO-Global/org-skills --skill frontend-code-review -a claude-code
Use Download .zip above, then upload it under Customize → Skills → Upload skill. Team and Enterprise admins can sync this repo as a plugin marketplace instead.
Installs into .agents/skills/, which Codex reads.
npx skills add AGCO-Global/org-skills --skill frontend-code-review -a codex
Installs into Cursor's skills folder.
npx skills add AGCO-Global/org-skills --skill frontend-code-review -a cursor
Installs into Gemini CLI's skills folder.
npx skills add AGCO-Global/org-skills --skill frontend-code-review -a gemini-cli
Nothing to install. Press Download .zip above, unzip it, and drop the frontend-code-review folder into your tool's skills folder — .claude/skills/, .github/skills/, .cursor/skills/ or .agents/skills/. Step-by-step, per tool: How to use it. For any other tool with rules or custom prompts, Copy SKILL.md and paste it in — it is plain Markdown.
The npx commands need Node.js 20+ and use your normal git sign-in to GitHub, so they work while the repository is private. Without Node.js, see the No Node.js tab — a skill is a folder of Markdown, so copying it in works just as well.
A review earns its cost by catching what tests and linters cannot: wrong abstractions, unhandled states, accessibility gaps, security sinks and future maintenance pain. Cite the line, say why it matters, propose the fix, and label the severity so the author knows what actually blocks merge. A review with twenty unlabelled comments communicates less than one with four labelled ones.
Server code, APIs, migrations in the same PR → backend-code-review for those files; say which files you reviewed
Review or debug?
A review request gets this skill
"Why doesn't this work" with no review intent → the stack's development skill; do not produce a severity table
Stack-specific depth
Load the matching stack skill for idioms (angular-development, react-development, lwc-development, …)
—
Diff over 400 non-generated lines
Ask for a split; review the riskiest file meanwhile and say so
The author cannot split (generated migration, vendored update) → triage by risk and list what you did not read
Empty, lockfile-only or generated-only diff
Say so in one line and stop
Lockfile change adds a dependency → review that dependency, not the lockfile
Verdict
Derive it from the labels (section 4), never from overall impression
—
2. Severity labels (use verbatim)
Label
Meaning
Blocks merge?
[blocker]
Bug, security issue, data loss, primary flow unusable by keyboard or screen reader, documented architecture boundary violated
Yes
[major]
Likely bug under realistic conditions, missing error/loading state, performance regression, new behaviour with no test
Yes, unless deferred with a ticket
[minor]
Readability, naming, small duplication, non-idiomatic usage
No
[nit]
Style or formatting a tool should own
No
[question]
Intent needed before judging
—
[praise]
Done well, others should copy it
—
Every finding gets exactly one label. Include a genuine [praise] when one exists — it calibrates everything else you wrote.
3. What to look at
Work these areas in order; report only what you actually find. The full check list per area — with the specific things that go wrong — is references/review-checklist.md; open it rather than reviewing from memory.
Correctness — null/empty/0/'' treated as valid; races where a stale response overwrites a newer one; cancellation on unmount or navigation; timezone and money handling; every branch of a conditional render having a designed state.
Architecture and boundaries — right layer, no cross-feature deep imports, business logic out of components, a new abstraction justified by two real call sites, new dependencies weighed against the platform.
Types — any, as unknown as and ! each justified or fixed; types derived from the source of truth; discriminated unions over optional-everything shapes.
Accessibility (WCAG 2.2 AA) — real interactive elements or role plus keyboard plus visible focus; every control has an accessible name; focus managed on route change, dialog open/close and after async actions; colour is never the only signal; contrast ≥ 4.5:1 for body text, ≥ 3:1 for large text (18pt / 14pt bold) and for UI components and meaningful graphics; targets ≥ 24×24 CSS px; live regions for async feedback.
Styling — specificity fights and !important; ::ng-deep, :global or unscoped selectors leaking out of the component; ad-hoc z-index instead of a scale; hard-coded colours and spacing instead of design tokens; prefers-reduced-motion and prefers-color-scheme honoured; logical properties so RTL works.
SSR and hydration (if the app renders on a server) — window/document/localStorage touched outside a browser-only hook or platform guard; markup that differs between server and client (dates, random ids, locale); data fetched only on the client that the server could have sent.
Security — untrusted HTML into dangerouslySetInnerHTML, [innerHTML], bypassSecurityTrust* or lwc:dom="manual"; javascript: and open-redirect URLs from user input; secrets or internal hostnames in client code; authorisation decided only in the UI; postMessage without an origin check; eval/new Function; third-party scripts added without CSP or integrity; PII in logs and analytics. Deeper rules live in frontend-security.instructions.md.
Performance — the cross-stack ones only: request waterfalls, refetch storms, unbounded polling, large work on the render path, list virtualisation, images and fonts without reserved dimensions, subscriptions and listeners without cleanup. Stack-specific detail belongs to angular-performance / react-performance — link rather than restate.
Testing — new behaviour tested at the right layer, bug fixes carrying a regression test that fails without the fix, assertions on user-visible outcomes, mocks at the network boundary. Depth belongs to the stack's testing skill.
Maintainability — names that reveal intent, comments that explain why, TODOs with tickets, no dead code or stray logs, consistency with existing repo conventions even where you would choose differently.
4. Deliverable format
Each finding:
[label] <file>:<line> — <the problem in one sentence>
Why it matters: <impact in one sentence>
Suggest:
<the fixed code, or a precise description>
Worked example:
[major] features/orders/order-list.ts:48 — `subscribe()` in `ngOnInit` with no teardown.
Why it matters: the subscription outlives the component, so every visit to this route adds another
live handler and a stale one still writes to a destroyed view.
Suggest:
private readonly orders = toSignal(this.api.list$(), { initialValue: [] });
// or, if you must subscribe: .pipe(takeUntilDestroyed()).subscribe(...)
Always end with:
## Summary
Verdict: Approve | Approve with minor changes | Request changes
Blockers: <n> Majors: <n> Minors: <n>
Files reviewed: <n> of <n> (name anything skipped and why)
Top 3 to address:
1. …
2. …
3. …
What's good: <one or two lines of genuine praise>
Verdict rules: any [blocker] → Request changes. Any [major] without an agreed follow-up ticket → Request changes. Otherwise Approve, "with minor changes" if any [minor] remain.
Self-review mode (the author asks before opening the PR): run the same pass, then add a suggested PR description (intent, approach, testing done, risks) and the reviewer questions they should pre-empt.
Checklist
The intent of the change is known, from the description, the ticket, or by asking
The stack's skill was consulted for idioms before judging style
Every finding has exactly one label, a file:line, an impact sentence and a concrete fix
Accessibility, security and styling were each actively checked, not skipped for being quiet
Performance and testing findings point at the stack skill instead of restating it
Generated, vendored and lockfile-only changes were identified and not line-reviewed
At least one [praise] where the code deserves it
The summary block is present and the verdict follows the rules, not a feeling
Files not reviewed are named, with the reason
Anti-patterns
Nitpicking formatting while missing the race condition → work the areas in order; style is last and mostly a tool's job.
"Consider using X" with no reason → state the failure mode the change prevents, or drop the comment.
Requesting your preferred pattern over a working repo convention → label it [question] and take it to the team, not the PR.
Line-reviewing a 2 000-line diff → ask for a split; triage by risk and say what you left unread.
"LGTM" on new behaviour with no tests → that is a [major] by the table above.
Unlabelled comment walls → the author cannot tell the blocker from the nit and will guess wrong.
Restating secure-coding and the stack skills in full → one line plus a pointer; the duplicate ages badly and buries your real findings.
Reviewing server code in this skill because it was in the same PR → hand those files to backend-code-review and say so in the summary.
Go deeper
references/review-checklist.md — the full per-area checks, including the styling, SSR/hydration and security blocks
references/worked-example.md — a complete review of a small Angular diff, findings through summary
Stack skills: angular-development, react-development, react-native-development, lwc-development for idioms; angular-performance / react-performance and angular-testing / react-testing for depth
backend-code-review for server code in the same pull request
---
name: frontend-code-review
description: Review client-side changes in any frontend stack (React, React Native, Angular, Salesforce LWC, plain TypeScript, CSS) and deliver severity-labelled findings with concrete fixes and a merge verdict — correctness, architecture boundaries, types, accessibility, styling, SSR and hydration, security, performance, tests and maintainability. Use this whenever the user asks to review a pull request, diff, component or file, asks "is this good", "what's wrong with this", "any issues here" or "anything I should fix before I open this PR", or pastes frontend code and asks for feedback. Server-side code in the same pull request goes to `backend-code-review`; a bug in pasted code with no review intent goes to the stack's development skill.
metadata:
technology: Frontend (general)
type: code-review
---
# Frontend Code Review
> **Targets:** any frontend stack; WCAG 2.2 AA is the accessibility bar · **Verified:** 2026-09 against https://www.w3.org/TR/WCAG22/ and https://developer.mozilla.org/docs/Web/HTTP/CSP
A review earns its cost by catching what tests and linters cannot: wrong abstractions, unhandled states, accessibility gaps, security sinks and future maintenance pain. Cite the line, say why it matters, propose the fix, and label the severity so the author knows what actually blocks merge. A review with twenty unlabelled comments communicates less than one with four labelled ones.
## 1. Decide first
| Question | Default | Change when |
|---|---|---|
| Is this mine to review? | Client-side code: components, templates, styles, client state, browser APIs | Server code, APIs, migrations in the same PR → `backend-code-review` for those files; say which files you reviewed |
| Review or debug? | A review request gets this skill | "Why doesn't this work" with no review intent → the stack's development skill; do not produce a severity table |
| Stack-specific depth | Load the matching stack skill for idioms (`angular-development`, `react-development`, `lwc-development`, …) | — |
| Diff over 400 non-generated lines | Ask for a split; review the riskiest file meanwhile and say so | The author cannot split (generated migration, vendored update) → triage by risk and list what you did not read |
| Empty, lockfile-only or generated-only diff | Say so in one line and stop | Lockfile change adds a dependency → review that dependency, not the lockfile |
| Verdict | Derive it from the labels (section 4), never from overall impression | — |
## 2. Severity labels (use verbatim)
| Label | Meaning | Blocks merge? |
|---|---|---|
| **[blocker]** | Bug, security issue, data loss, primary flow unusable by keyboard or screen reader, documented architecture boundary violated | Yes |
| **[major]** | Likely bug under realistic conditions, missing error/loading state, performance regression, new behaviour with no test | Yes, unless deferred with a ticket |
| **[minor]** | Readability, naming, small duplication, non-idiomatic usage | No |
| **[nit]** | Style or formatting a tool should own | No |
| **[question]** | Intent needed before judging | — |
| **[praise]** | Done well, others should copy it | — |
Every finding gets exactly one label. Include a genuine `[praise]` when one exists — it calibrates everything else you wrote.
## 3. What to look at
Work these areas in order; report only what you actually find. The full check list per area — with the specific things that go wrong — is `references/review-checklist.md`; open it rather than reviewing from memory.
1. **Correctness** — null/empty/`0`/`''` treated as valid; races where a stale response overwrites a newer one; cancellation on unmount or navigation; timezone and money handling; every branch of a conditional render having a designed state.
2. **Architecture and boundaries** — right layer, no cross-feature deep imports, business logic out of components, a new abstraction justified by two real call sites, new dependencies weighed against the platform.
3. **Types** — `any`, `as unknown as` and `!` each justified or fixed; types derived from the source of truth; discriminated unions over optional-everything shapes.
4. **Accessibility (WCAG 2.2 AA)** — real interactive elements or role plus keyboard plus visible focus; every control has an accessible name; focus managed on route change, dialog open/close and after async actions; colour is never the only signal; contrast ≥ 4.5:1 for body text, ≥ 3:1 for large text (18pt / 14pt bold) and for UI components and meaningful graphics; targets ≥ 24×24 CSS px; live regions for async feedback.
5. **Styling** — specificity fights and `!important`; `::ng-deep`, `:global` or unscoped selectors leaking out of the component; ad-hoc z-index instead of a scale; hard-coded colours and spacing instead of design tokens; `prefers-reduced-motion` and `prefers-color-scheme` honoured; logical properties so RTL works.
6. **SSR and hydration** (if the app renders on a server) — `window`/`document`/`localStorage` touched outside a browser-only hook or platform guard; markup that differs between server and client (dates, random ids, locale); data fetched only on the client that the server could have sent.
7. **Security** — untrusted HTML into `dangerouslySetInnerHTML`, `[innerHTML]`, `bypassSecurityTrust*` or `lwc:dom="manual"`; `javascript:` and open-redirect URLs from user input; secrets or internal hostnames in client code; authorisation decided only in the UI; `postMessage` without an origin check; `eval`/`new Function`; third-party scripts added without CSP or integrity; PII in logs and analytics. Deeper rules live in `frontend-security.instructions.md`.
8. **Performance** — the cross-stack ones only: request waterfalls, refetch storms, unbounded polling, large work on the render path, list virtualisation, images and fonts without reserved dimensions, subscriptions and listeners without cleanup. Stack-specific detail belongs to `angular-performance` / `react-performance` — link rather than restate.
9. **Testing** — new behaviour tested at the right layer, bug fixes carrying a regression test that fails without the fix, assertions on user-visible outcomes, mocks at the network boundary. Depth belongs to the stack's testing skill.
10. **Maintainability** — names that reveal intent, comments that explain *why*, TODOs with tickets, no dead code or stray logs, consistency with existing repo conventions even where you would choose differently.
## 4. Deliverable format
Each finding:
```
[label] <file>:<line> — <the problem in one sentence>
Why it matters: <impact in one sentence>
Suggest:
<the fixed code, or a precise description>
```
Worked example:
```
[major] features/orders/order-list.ts:48 — `subscribe()` in `ngOnInit` with no teardown.
Why it matters: the subscription outlives the component, so every visit to this route adds another
live handler and a stale one still writes to a destroyed view.
Suggest:
private readonly orders = toSignal(this.api.list$(), { initialValue: [] });
// or, if you must subscribe: .pipe(takeUntilDestroyed()).subscribe(...)
```
Always end with:
```
## Summary
Verdict: Approve | Approve with minor changes | Request changes
Blockers: <n> Majors: <n> Minors: <n>
Files reviewed: <n> of <n> (name anything skipped and why)
Top 3 to address:
1. …
2. …
3. …
What's good: <one or two lines of genuine praise>
```
Verdict rules: any `[blocker]` → Request changes. Any `[major]` without an agreed follow-up ticket → Request changes. Otherwise Approve, "with minor changes" if any `[minor]` remain.
**Self-review mode** (the author asks before opening the PR): run the same pass, then add a suggested PR description (intent, approach, testing done, risks) and the reviewer questions they should pre-empt.
## Checklist
- [ ] The intent of the change is known, from the description, the ticket, or by asking
- [ ] The stack's skill was consulted for idioms before judging style
- [ ] Every finding has exactly one label, a file:line, an impact sentence and a concrete fix
- [ ] Accessibility, security and styling were each actively checked, not skipped for being quiet
- [ ] Performance and testing findings point at the stack skill instead of restating it
- [ ] Generated, vendored and lockfile-only changes were identified and not line-reviewed
- [ ] At least one `[praise]` where the code deserves it
- [ ] The summary block is present and the verdict follows the rules, not a feeling
- [ ] Files not reviewed are named, with the reason
## Anti-patterns
- **Nitpicking formatting while missing the race condition** → work the areas in order; style is last and mostly a tool's job.
- **"Consider using X" with no reason** → state the failure mode the change prevents, or drop the comment.
- **Requesting your preferred pattern over a working repo convention** → label it `[question]` and take it to the team, not the PR.
- **Line-reviewing a 2 000-line diff** → ask for a split; triage by risk and say what you left unread.
- **"LGTM" on new behaviour with no tests** → that is a `[major]` by the table above.
- **Unlabelled comment walls** → the author cannot tell the blocker from the nit and will guess wrong.
- **Restating `secure-coding` and the stack skills in full** → one line plus a pointer; the duplicate ages badly and buries your real findings.
- **Reviewing server code in this skill because it was in the same PR** → hand those files to `backend-code-review` and say so in the summary.
## Go deeper
- `references/review-checklist.md` — the full per-area checks, including the styling, SSR/hydration and security blocks
- `references/worked-example.md` — a complete review of a small Angular diff, findings through summary
- Stack skills: `angular-development`, `react-development`, `react-native-development`, `lwc-development` for idioms; `angular-performance` / `react-performance` and `angular-testing` / `react-testing` for depth
- `backend-code-review` for server code in the same pull request