react-effects-audit

Solid

Use when auditing React or Next.js components for unnecessary or unsafe useEffect usage -- detects 9 anti-patterns from "You Might Not Need an Effect".

Web & Frontend 28 stars 4 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
49
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

<objective> React Effects Audit scans a target file or directory for the 9 `useEffect` anti-patterns described in React's official "You Might Not Need an Effect" guidance -- derived state, expensive calculations, state resets, event logic, parent notification, effect chains, missing fetch cleanup, manual store subscriptions, and app-init logic -- each flagged with a severity (CRITICAL/WARNING/INFO), its exact location, and a proposed fix. When the target is a Next.js or React project, it cross-references the matching SOLID skill (`solid-nextjs` or `solid-react`) to also catch architecture-level violations like data-fetching Effects that should be Server Components or TanStack Query instead. It never auto-fixes without showing the finding first. </objective> **Target:** $ARGUMENTS # React Effects Audit ## Overview Scan React codebases to detect unnecessary `useEffect` usage based on official React documentation ("You Might Not Need an Effect"). Reports anti-patterns with severity, location, and recommended fixes. --- ## Agent Workflow (MANDATORY) ``` PHASE 1: Scan target files (Glob *.tsx, *.jsx, *.ts, *.js) PHASE 2: Detect anti-patterns (Grep detection rules) PHASE 3: Analyze context (Read flagged files) PHASE 4: Generate report with fixes ``` --- ## Anti-Pattern Summary | # | Anti-Pattern | Severity | Detection | |---|---|---|---| | 1 | Derived state in Effect | WARNING | `useEffect` + `setState` from other state/props | | 2 | Expensive calculation in Effect | WAR...

Details

Author
fusengine
Repository
fusengine/agents
Created
8 months ago
Last Updated
2 days ago
Language
CSS
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category