agent-md-refactor
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits…
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.
Claude Code
$ npx -y skills add softaworks/agent-toolkit --skill react-useeffect --agent claude-code
Codex
$ npx skills add softaworks/agent-toolkit --skill react-useeffect -a codex -y
Cursor
$ npx skills add softaworks/agent-toolkit --skill react-useeffect -a cursor -y
Gemini CLI
$ npx skills add softaworks/agent-toolkit --skill react-useeffect -a gemini-cli -y
GitHub Copilot
$ npx skills add softaworks/agent-toolkit --skill react-useeffect -a github-copilot -y
OpenCode
$ npx skills add softaworks/agent-toolkit --skill react-useeffect -a opencode -y
Windsurf
$ npx skills add softaworks/agent-toolkit --skill react-useeffect -a windsurf -y
name: react-useeffect description: 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.
Effects 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.
| Situation | DON'T | DO | |-----------|-------|-----| | Derived state from props/state | `useState` + `useEffect` | Calculate during render | | Expensive calculations | `useEffect` to cache | `useMemo` | | Reset state on prop change | `useEffect` with `setState` | `key` prop | | User event responses | `useEffect` watching state | Event handler directly | | Notify parent of changes | `useEffect` calling `onChange` | Call in event handler | | Fetch data | `useEffect` without cleanup | `useEffect` with cleanup OR framework |
1. **Transforming data for rendering** - Calculate at top level, re-runs automatically 2. **Handling user events** - Use event handlers, you know exactly what happened 3. **Deriving state** - Just compute it: `const fullName = firstName + ' ' + lastName` 4. **Chaining state updates** - Calculate all next state in the event handler
Need to respond to something?
├── User interaction (click, submit, drag)?
│ └── Use EVENT HANDLER
├── Component appeared on screen?
│ └── Use EFFECT (external sync, analytics)
├── Props/state changed and need derived value?
│ └── CALCULATE DURING RENDER
│ └── Expensive? Use useMemo
└── Need to reset state when prop changes?
└── Use KEY PROP on componentOpinionated skills shared by @leonardocouy for improving daily work efficiency with Claude Code. Skills are packaged instructions and scripts that extend agent capabilities across development, documentation, planning, and professional workflows.
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits…
Create API handoff documentation for frontend developers. Use when backend work is complete and needs to be documented for…
Generate architecture documentation using C4 model Mermaid diagrams. Use when asked to create architecture diagrams, document…
Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or…
This skill should be used when creating a Claude Code slash command. Use when users ask to "create a command", "make a slash…
Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…
Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…