All skills
siberiacancode avatar

/react-hooks-best-practices

@dc7ec6c

React hooks best practices for React application code and custom hook design across DX, optimization, and logic. Use when writing components with hooks, creating or refactoring custom hooks, reviewing hook usage/APIs/internals, checking effects/dependencies/state/refs/callbacks, or improving hook correctness, ergonomics, and performance.

Use this Skill: https://skilld.dev/gh/siberiacancode/agent-skills/react-hooks-best-practices

This session only. Nothing lands on disk.

rules_sections.md

≈250 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Sections

This file defines all sections, their ordering, impact levels, and descriptions. The section ID in parentheses is the filename prefix used to group rules.


1. DX (dx)

Impact: HIGH
Description: Hook APIs should be easy to discover, compose, type, and consume. DX rules cover naming, overloads, return shapes, targets, callbacks, and the mental model a developer sees first.

2. Optimization (optimization)

Impact: HIGH
Description: Hook implementations should avoid unnecessary renders, broad subscriptions, listener churn, memory leaks, and baked-in timing decisions. Optimization rules cover render boundaries, snapshots, throttling strategy, cleanup, and hot-path browser events.

3. Logic (logic)

Impact: HIGH
Description: Hook logic should preserve correct behavior across lifecycle, SSR, stale closures, targets, cleanup, and state transitions. Logic rules cover invariants, edge cases, and correctness of the hook's internal model.

Source: SKILL.md on GitHub

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides a set of architectural guidelines and performance best practices for using React Hooks. It consists entirely of documentation and code examples intended for developer guidance and contains no malicious code, hidden instructions, or security risks.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at dc7ec6c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 2 months ago

README badge

README badge for siberiacancode/agent-skills/react-hooks-best-practices