Skip to main content
skill CX Codex

no-use-effect · alejandrobailo — Claude Code skill: what it does, how to install

Enforces a zero-useEffect policy across React and React Native components, redirecting logic to derived state, handlers, and dedicated libraries.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add alejandrobailo/no-use-effect --skill no-use-effect -a claude-code
npx skills add alejandrobailo/no-use-effect --skill alejandrobailo-no-use-effect -a claude-code
Open on GitHub

What no-use-effect does

This skill acts as an always-on architectural guard for React and React Native codebases. It bans direct imports and invocations of useEffect in UI components. Instead of chaining effects to mirror state, it instructs the agent to compute values inline or wrap heavy calculations in useMemo. Data fetching shifts entirely to purpose-built querying libraries or React 19's use() hook with <Suspense>.

User actions and submission workflows belong strictly in event handlers, not in flag-flipping state cycles. When a component must reset its state on ID changes, the rule mandates React's native key prop remounting rather than dependency tricks. Direct effect calls remain permitted only inside encapsulated hooks like useMountEffect for third-party browser subscriptions. Bandaging broken effects with useRef guards is flagged as an anti-pattern.

What it helps with

  • eliminate unnecessary render passes caused by prop synchronization
  • prevent network race conditions in component-level data fetching
  • move procedural submission flows into direct event listeners
  • remove ref-based guard hacks used to stop effect loops

Example prompts for the agent

  • Refactor this product card to remove all useEffect calls
  • Handle video player reset on ID change using keys instead of an effect
  • Audit this React Native screen for state sync effects

How to install no-use-effect

1Skills CLI (Vercel)

npx skills add alejandrobailo/no-use-effect --skill no-use-effect -a claude-code
npx skills add alejandrobailo/no-use-effect --skill alejandrobailo-no-use-effect -a claude-code

2Manually: put the files in place

~/.claude/skills/alejandrobailo-no-use-effect/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/alejandrobailo-no-use-effect/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about no-use-effect

How do I install no-use-effect in Claude Code?

Run npx skills add alejandrobailo/no-use-effect --skill no-use-effect -a claude-code in your terminal. The agent will load the instructions and apply them automatically across all React files.

What does no-use-effect do?

It stops the AI agent from writing direct useEffect calls in React components. The skill substitutes effects with inline computations, event handlers, remount keys, and specialized fetching tools.

Does no-use-effect ban useEffect completely?

No, direct calls are still permitted inside reusable custom hooks such as useMountEffect when integrating with third-party widgets or DOM subscriptions.

Similar skills

Everything for Frontend and UI →

no-use-effect by other authors comes first.

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor