reactuse
Practical playbook for React teams to choose and apply reactuse hooks across state, async flows, browser APIs, and UI interactions. Use it when replacing…
от siberiacancode★ 25 звёзд на GitHub
Установить reactuse в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Reactuse
This skill is a decision-and-implementation guide for reactuse library for react.js / next.js projects. It maps requirements to the most suitable reactuse hook, applies the correct usage pattern, and prefers hook-based solutions over bespoke code to keep implementations concise, maintainable, and performant.
When to Apply
- Apply this skill whenever assisting development work in React.js / Next.js.
- Always check first whether a reactuse hook can implement the requirement.
- Prefer reactuse hooks over custom code to improve readability, maintainability, and performance.
- Map requirements to the most appropriate hook and follow the hook’s invocation rule.
- Please refer to the
Invocationfield in the hooks table. For example:AUTO: Use automatically when applicable.EXTERNAL: Use only if the user already installed the required external dependency; otherwise reconsider, and ask to install only if truly needed.EXPLICIT_ONLY: Use only when explicitly requested by the user.NOTE User instructions in the prompt or
AGENTS.mdmay override a hook’s defaultInvocationrule.
Hooks
All hooks listed below are part of the reactuse library. Each section categorizes hooks based on their functionality.
IMPORTANT: Each hook entry includes a short Description and a detailed rule. When using any hook or helper, always consult the corresponding document in ./rules for usage details and type declarations.
Blocked upstream category: Reactuse also exports Humor hooks (useFul, useLess, useOnce) in recent releases. This skill intentionally does not support or recommend them because upstream marks them as jokes or non-production utilities.
Helpers
| Hook | Description | Invocation |
|---|---|---|
| cn | Normalizes conditional class names for React className. |
HIGH |
| createContext | Creates a typed context with provider and selector hook. | HIGH |
| createContextHook | Scopes one hook result to a React subtree. | LOW |
| createEventEmitter | Creates a type-safe event emitter with a subscription hook. | LOW |
| createReactiveContext | Creates a typed context selector with optimized updates. | LOW |
| createSharedHook | Shares one hook instance across consumers. | LOW |
| createStore | Creates a external store with state, subscriptions, and a hook. | MEDIUM |
| createWebMCP | Creates an imperative registry for document-level WebMCP tools. | LOW |
| deepEqual | Compares nested values recursively across common built-in types. | LOW |
| makeDestructurable | Supports object and tuple consumption from one value. | LOW |
| shallowEqual | Compares top-level values across common built-in types. | LOW |
| target | Wraps DOM targets in the shape Reactuse hooks expect. | MEDIUM |
Elements
| Hook | Description | Invocation |
|---|---|---|
| useActiveElement | Tracks the currently focused element. | LOW |
| useAutoScroll | Automatically scrolls a container to the bottom. | LOW |
| useClickOutside | Calls a callback when clicking outside the target element. | HIGH |
| useCollapse | Animates an element between collapsed and expanded states. | MEDIUM |
| useContextMenu | Converts secondary-click and long-press gestures to menu state. | LOW |
| useDoubleClick | Detects double-clicks with optional single-click handler. | MEDIUM |
| useDraggable | Converts pointer movement into drag position state. | LOW |
| useDropZone | Creates a drag-and-drop area with file state. | MEDIUM |
| useFileDialog | Opens a file picker and returns selected files. | LOW |
| useFocus | Tracks focus state and provides focus/blur controls. | MEDIUM |
| useFocusTrap | Traps focus within a given element. | MEDIUM |
| useHover | Tracks hover state for an element. | MEDIUM |
| useImage | Loads an image in the browser and returns image-specific loading state. | LOW |
| useLockScroll | Locks scrolling on an element or the document body. | MEDIUM |
| useLongPress | Detects long press interactions. | MEDIUM |
| usePaint | Draws on a canvas and exposes drawing controls. | LOW |
| useScript | Loads a script and returns its status. | LOW |
| useSize | Observes element width and height. | LOW |
| useSticky | Detects whe |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- AGENTS.md
- README.md
- metadata.json
- rules/_sections.md
- rules/_template.md
- rules/cn.md
- rules/createContext.md
- rules/createContextHook.md
- rules/createEventEmitter.md
- rules/createReactiveContext.md
- rules/createSharedHook.md
- rules/createStore.md
- rules/createWebMCP.md
- rules/deepEqual.md
- rules/makeDestructurable.md
- rules/shallowEqual.md
- rules/target.md
- rules/useActiveElement.md
- rules/useAsync.md
- rules/useAsyncEffect.md
- rules/useAudio.md
- rules/useAutoScroll.md
- rules/useBatchedCallback.md
- rules/useBattery.md
- rules/useBluetooth.md
- rules/useBoolean.md
- rules/useBreakpoints.md
- rules/useBroadcastChannel.md
- rules/useBrowserLanguage.md
- rules/useBrowserLocation.md
- rules/useClickOutside.md
- rules/useClipboard.md
- rules/useCollapse.md
- rules/useCompareEffect.md
- rules/useConst.md
- rules/useContextMenu.md
- rules/useControllableState.md
- rules/useCookie.md
- rules/useCookies.md
- rules/useCopy.md
FAQ
Что делает скилл reactuse?
Practical playbook for React teams to choose and apply reactuse hooks across state, async flows, browser APIs, and UI interactions. Use it when replacing custom hook logic with production-ready patterns that stay compatible with SSR and Next.js.
Как установить скилл reactuse?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл reactuse запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…