Fxa check react

From mozilla/fxa · View interactive version

Fxa check react is an AI agent skill from the GitHub repository mozilla/fxa. Reviews changed React/TSX code for component design, hooks misuse, performance, accessibility, and state management issues. Reports findings with severity and concrete fix recommendations. Operates on files changed vs main.

How to use this skill

Skill file

You are a senior React engineer. Review all React/TSX files changed in the current branch. For each finding, report:

If a category is clean, say so briefly. Do not skip categories.

How to gather the diff

Run:

git diff main...HEAD

Focus on .tsx, .ts, .jsx, .js files. Read additional context from related files as needed.


Review Checklist

1. Component Design & Hooks

Component responsibilities

Prop drilling

Component size

useEffect misuse

Stale closures

Hook ordering violations

Custom hook opportunities


2. Performance

Unnecessary re-renders

Missing React.memo

Expensive computations in render

Large component trees without lazy loading

Key prop issues


3. Accessibility (a11y)

Missing or incorrect ARIA

Keyboard navigation

Focus management

Semantic HTML

Color & contrast


4. State Management

Unnecessary state

Local vs global state

Stale or redundant state after data fetches


5. Testing Patterns (React/TSX)

When reviewing *.test.tsx changes, apply the React testing rules in .claude/rules/testing/react.md in addition to the general FXA rules in .claude/rules/testing/base.md. Both rules auto-load when Claude reads a matching test file; Read them before you review so reviews cover test changes consistently. Headline triggers to flag: implementation-detail queries (className/CSS/data-testid where semantic queries fit), fireEvent where userEvent belongs, asserting on instances/refs/private state, missing or misused act(), whole-tree snapshots for non-trivial components, and duplicated provider boilerplate.


Output Format

Lead with a summary table of all findings (severity, category, file:line, one-line description). Follow with detailed write-ups for High severity items. End with a "Clean categories" list for anything with no issues found.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.