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 25 stars 4 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
47
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
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
6 days ago
Language
CSS
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

react-no-use-effect

Enforce the no-useEffect rule when writing or reviewing React code. Activate when writing React components, refactoring existing useEffect calls, reviewing PRs that introduce useEffect, or when an agent adds useEffect "just in case." Provides five replacement patterns and the useMountEffect escape hatch.

17 Updated 1 months ago
wordbricks
Web & Frontend Listed

react-performance-audit

Audit React and Next.js codebases for wasted re-renders, bundle bloat, and Core Web Vitals regressions, then produce a prioritized fix list with measured impact. Use this skill whenever the user mentions slow renders, laggy typing or scrolling, large bundles, LCP/INP/CLS problems, Lighthouse scores, React DevTools Profiler output, memo/useMemo/useCallback decisions, or says something is "janky", "slow", or "re-rendering too much" — including when they just paste a component and ask why it feels slow.

0 Updated 1 weeks ago
jayeshsojitra103
AI & Automation Listed

effect-native-audit

Use when asked to audit this codebase for places we hand-rolled what Effect ships natively, or to run the Effect-native sweep. Triggers on "effect-native audit", "where are we reinventing Effect", "rolled our own instead of an Effect builtin", "sweep for native Effect helpers", "audit our FP/Effect modelling", "audit our concurrency/error handling". A workflow-driven structural, modelling & behaviour audit — not a substitute for the @effect/language-service idiom linter.

1 Updated today
CodeForBreakfast