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.

README.md

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

React Hooks Best Practices

Best practices for using hooks in React applications and designing custom hooks across DX, optimization, and logic. Use this skill for component hook usage, custom hook design, hook API review, and hook correctness/performance checks.

Structure

  • rules/ - Individual guide files
    • _sections.md - Section metadata
    • _template.md - Template for new rules
    • scope-description.md - Individual rule files
  • metadata.json - Document metadata
  • AGENTS.md - Compiled overview

Creating a New Rule

  1. Copy rules/_template.md to rules/scope-description.md
  2. Choose the appropriate scope prefix:
    • dx- for hook API ergonomics, naming, typing, and composability
    • optimization- for render boundaries, subscriptions, hot paths, and cleanup/performance tradeoffs
    • logic- for correctness, lifecycle, SSR, stale closures, and edge cases
  3. Fill in the frontmatter and guide content
  4. Include concise examples where they clarify the hook behavior

File Naming Convention

  • Files starting with _ are special metadata files
  • Rule files use scope-description.md
  • Section is inferred from the filename prefix

Impact Levels

  • HIGH - Prevents broad unnecessary re-renders or defines a core hook API pattern
  • MEDIUM - Useful for everyday hook ergonomics and correctness
  • LOW - Situational conventions

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