A Skill that enforces a strict no-direct-useEffect rule in React and React Native codebases.
Based on Factory's approach and React's official You Might Not Need an Effect guide.
npx skills add alejandrobailo/no-use-effect- Derive state, don't sync it — Compute inline (
useMemoonly for expensive work without React Compiler) - Use data-fetching libraries — React Query, SWR, etc., or
use()+ Suspense in React 19+, instead of fetch-in-effect - Event handlers, not effects — User actions belong in handlers
useMountEffectfor mount-time sync — Named wrapper foruseEffect(..., [])- Reset with
key— Use React's remount semantics instead of reset effects - Never patch a broken effect with a ref — Remove the effect instead of guarding it with
hasRun/isMountedrefs
When active, this skill prevents Claude from writing useEffect directly in components. Instead, it guides toward the correct primitive for each case: derived state, event handlers, useSyncExternalStore, data-fetching libraries, key-based resets, or useMountEffect.
The skill detects React Compiler (reactCompiler: true in next.config.* or babel-plugin-react-compiler in package.json). When it's on, the skill never suggests useMemo or useCallback, and project rules about memoization take precedence.