react-audit

Audit React codebases for hooks correctness, component design, state management, and React 18/19 idioms.

3|5|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/BenSheridanEdwards/ArchitectPlaybook --skill react-audit-bensheridanedwards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-audit
Source: https://github.com/BenSheridanEdwards/ArchitectPlaybook/tree/main/react-audit
Command: npx skills add https://github.com/BenSheridanEdwards/ArchitectPlaybook --skill react-audit-bensheridanedwards

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React codebases accumulate subtle correctness bugs — stale closures, missing effect cleanups, props mirrored into state, hand-rolled optimistic updates — that linters alone do not fully catch and that compound into maintenance drag. This skill statically audits a TypeScript and React project against an opinionated four-layer baseline and produces structured findings plus an optional implementation plan. ## Core Features & Use Cases - Four-layer audit baseline: Covers hooks correctness (dependency arrays, cleanup functions, state synchronization), component design (PascalCase, forwardRef, displayName, children typing), state management (form libraries, server state in the data layer, URL state), and React 18/19 idioms (useId, useTransition, Suspense, Server Actions, useOptimistic). - Diagnostic snapshot: Records React version, framework variant (Next.js App Router, Remix, Vite, CRA), component and custom-hook counts, and detected form, animation, and design-system libraries. - Structured outputs: Writes findings.md, findings.json (schema 2.0.0 for Repository Quality Score roll-up), snapshot.md, and metadata.json to .architect-audits/react-audit/, then offers a descriptive implementation plan. - Use Case: Run /react-audit on a Next.js codebase before a refactor to surface every useEffect data-fetching pattern that should move to TanStack Query, with file and line references ordered by impact. ## Quick Start Ask the AI to run /react-audit in the root of your React and TypeScript project to generate the findings report and optionally an implementation plan.

Frequently Asked Questions about react-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit a React codebase for hooks correctness issues?

Run /react-audit from the project root of a TypeScript and React project. It statically checks dependency arrays, cleanup functions, state synchronization, and memoization-for-correctness, then writes findings to .architect-audits/react-audit/ with file and line references.

What does the react-audit skill check in a React project?

It evaluates four layers: hooks correctness, component design, state management, and React 18/19 idioms such as useId, useTransition, Suspense, and useOptimistic. A diagnostic snapshot also records React version, framework variant, and component counts.

Does react-audit work with React 17 or non-Next.js frameworks?

Yes. It supports Next.js App Router and Pages Router, Remix, Vite-React, Create React App, and plain React. When React is below 18, the React 18/19 idiom checks are emitted as not-applicable with a null status rather than failing.

Does react-audit modify my code or run the linter?

No. The audit is static-only and read-only; it never edits files and never accepts an --apply flag. For a fresh lint run of react-hooks violations, use /linting-audit --with-run instead.

Why does react-audit report not-applicable for some checks?

Checks gated on specific conditions are marked not-applicable when those conditions are absent: React 18/19 idiom checks on older React versions, and 'use client' or Server Actions checks outside the Next.js App Router. This keeps the Repository Quality Score denominator accurate.