Skills for Real Engineers. Straight from my .agents directory.
react-useeffect
Agent skill fromsoftaworks/agent-toolkit
React useEffect best practices from official docs. Use when writing/reviewing useEffect, useState for derived values, data fetching, or state synchronization. Teaches when NOT to use Effect and better alternatives.
How to install react-useeffect
npx skills add softaworks/agent-toolkit# or add only this skill to Claude Code: copy the folder
skills/react-useeffect/
# into
~/.claude/skills/react-useeffect/ (all projects)
.claude/skills/react-useeffect/ (one project)
1# You Might Not Need an Effect23Effects are an **escape hatch** from React. They let you synchronize with external systems. If there is no external system involved, you shouldn't need an Effect.45## Quick Reference67| Situation | DON'T | DO |8|-----------|-------|-----|9| Derived state from props/state | `useState` + `useEffect` | Calculate during render |10| Expensive calculations | `useEffect` to cache | `useMemo` |11| Reset state on prop change | `useEffect` with `setState` | `key` prop |12| User event responses | `useEffect` watching state | Event handler directly |13| Notify parent of changes | `useEffect` calling `onChange` | Call in event handler |14| Fetch data | `useEffect` without cleanup | `useEffect` with cleanup OR framework |1516## When You DO Need Effects1718- Synchronizing with **external systems** (non-React widgets, browser APIs)19- **Subscriptions** to external stores (use `useSyncExternalStore` when possible)20- **Analytics/logging** that runs because component displayed21- **Data fetching** with proper cleanup (or use framework's built-in mechanism)2223## When You DON'T Need Effects24251. **Transforming data for rendering** - Calculate at top level, re-runs automatically262. **Handling user events** - Use event handlers, you know exactly what happened273. **Deriving state** - Just compute it: `const fullName = firstName + ' ' + lastName`284. **Chaining state updates** - Calculate all next state in the event handler2930## Decision Tree3132```33Need to respond to something?34…
Excerpt shown under the repository's MIT license.
More skills in agent-toolkit
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
