Token导航 LogoToken导航

Agent Skill · 研究检索

react-use(React USE 搜索)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

react-use 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 8,859。

总安装 15,429周安装 656GitHub Stars 15下载 5,405核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:react-use(React USE 搜索)
来源仓库:https://github.com/hairyf/skills
仓库路径:skills/react-use
安装命令:
npx skills add https://github.com/hairyf/skills --skill react-use
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hairyf/skills --skill react-use

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于传感器、UI、动画、副作用、生命周期和状态管理的基本 React Hooks。

30 多个传感器挂钩跟踪浏览器 API 和设备接口,包括地理位置、键盘输入、滚动位置、网络状态和设备运动 9 个 UI 挂钩管理音频、视频、全屏、拖放、语音合成和点击检测 8 个动画钩子提供 requestAnimationFrame 循环、间隔、超时、弹簧动态和补间 16 个副作用挂钩处理异步操作、存储、剪贴板、去抖动、节流和浏览器 API(如 cookie 和 favicons) 15 个生命周期钩子通过安装/卸载回调、深度比较效果和安装状态跟踪扩展了 React 的内置钩子 超过 25 个状态挂钩通过历史记录和验证支持简化了布尔值、数组、映射、可观察值和自定义状态模式的管理

来源仓库内路径:skills/react-use

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/hairyf/skills --skill react-use;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

react-use 怎么安装?

在终端执行 npx skills add https://github.com/hairyf/skills --skill react-use。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

react-use 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

react-use 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

react-use 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

react-use 用的人多吗?

公开数据是累计安装 15,429 次,近一周安装 656 次,下载 5,405 次,GitHub 15 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

react-use 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
react-use

React USE 搜索 · 本页

15,42915操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

react-use

The skill is based on react-use v17.6.0, generated at 2026-01-29.

react-use is a collection of essential React Hooks that provide ready-to-use functionality for common patterns in React applications. It includes hooks for sensors, UI interactions, animations, side-effects, lifecycle management, and state management.

Core References

TopicDescriptionReference
UsageImport patterns and tree-shaking recommendationscore-usage

Sensors

Sensor hooks listen to changes in browser APIs and device interfaces, forcing components to re-render with updated state.

TopicDescriptionReference
useBatteryTracks device battery statussensors-battery
useGeolocationTracks geo location state of user's devicesensors-geolocation
useHoverTracks mouse hover state of an elementsensors-hover
useHashTracks location hash valuesensors-hash
useIdleTracks whether user is being inactivesensors-idle
useIntersectionTracks an HTML element's intersectionsensors-intersection
useKeyTracks key pressessensors-key
useKeyPressTracks key press statesensors-key-press
useKeyPressEventHandles key press eventssensors-key-press-event
useKeyboardJsTracks keyboard key combinationssensors-keyboard-js
useLocationTracks page navigation bar location statesensors-location
useSearchParamTracks URL search parameterssensors-search-param
useLongPressTracks long press gesturesensors-long-press
useMediaTracks state of a CSS media querysensors-media
useMediaDevicesTracks state of connected hardware devicessensors-media-devices
useMotionTracks state of device's motion sensorsensors-motion
useMouseTracks state of mouse positionsensors-mouse
useMouseWheelTracks deltaY of scrolled mouse wheelsensors-mouse-wheel
useNetworkStateTracks browser's network connection statesensors-network-state
useOrientationTracks device's screen orientationsensors-orientation
usePageLeaveTriggers when mouse leaves page boundariessensors-page-leave
useScratchTracks mouse click-and-scrub statesensors-scratch
useScrollTracks an HTML element's scroll positionsensors-scroll
useScrollingTracks whether HTML element is scrollingsensors-scrolling
useStartTypingDetects when user starts typingsensors-start-typing
useWindowScrollTracks Window scroll positionsensors-window-scroll
useWindowSizeTracks Window dimensionssensors-window-size
useMeasureTracks an HTML element's dimensionssensors-measure
useSizeTracks element sizesensors-size
createBreakpointTracks innerWidth with breakpointssensors-breakpoint
useScrollbarWidthDetects browser's native scrollbars widthsensors-scrollbar-width
usePinchZoomTracks pointer events to detect pinch zoomsensors-pinch-zoom

UI

UI hooks allow you to control and subscribe to state changes of UI elements.

TopicDescriptionReference
useAudioPlays audio and exposes its controlsui-audio
useClickAwayTriggers callback when user clicks outside target areaui-click-away
useCssDynamically adjusts CSSui-css
useDropTracks file, link and copy-paste dropsui-drop
useFullscreenDisplay an element or video full-screenui-fullscreen
useSliderProvides slide behavior over any HTML elementui-slider
useSpeechSynthesizes speech from a text stringui-speech
useVibrateProvides physical feedback using Vibration APIui-vibrate
useVideoPlays video, tracks its state, and exposes playback controlsui-video

Animations

Animation hooks usually interpolate numeric values over time.

TopicDescriptionReference
useRafRe-renders component on each requestAnimationFrameanimations-raf
useIntervalRe-renders component on a set intervalanimations-interval
useHarmonicIntervalFnHarmonic interval functionanimations-harmonic-interval
useSpringInterpolates number over time according to spring dynamicsanimations-spring
useTimeoutRe-renders component after a timeoutanimations-timeout
useTimeoutFnCalls given function after a timeoutanimations-timeout-fn
useTweenRe-renders component while tweening a number from 0 to 1animations-tween
useUpdateReturns a callback which re-renders component when calledanimations-update

Side-effects

Side-effect hooks allow your app to trigger various side-effects using browser's API.

TopicDescriptionReference
useAsyncResolves an async functionside-effects-async
useAsyncFnAsync function with manual executionside-effects-async-fn
useAsyncRetryAsync function with retry capabilityside-effects-async-retry
useBeforeUnloadShows browser alert when user tries to reload or close the pageside-effects-before-unload
useCookieProvides way to read, update and delete a cookieside-effects-cookie
useCopyToClipboardCopies text to clipboardside-effects-copy-to-clipboard
useDebounceDebounces a functionside-effects-debounce
useErrorError dispatcherside-effects-error
useFaviconSets favicon of the pageside-effects-favicon
useLocalStorageManages a value in localStorageside-effects-local-storage
useSessionStorageManages a value in sessionStorageside-effects-session-storage
useLockBodyScrollLocks scrolling of the body elementside-effects-lock-body-scroll
useRafLoopCalls given function inside the RAF loopside-effects-raf-loop
useThrottleThrottles a functionside-effects-throttle
useThrottleFnThrottle function variantside-effects-throttle-fn
useTitleSets title of the pageside-effects-title
usePermissionQuery permission status for browser APIsside-effects-permission

Lifecycles

Lifecycle hooks modify and extend built-in React hooks or imitate React Class component lifecycle patterns.

TopicDescriptionReference
useEffectOnceModified useEffect that only runs oncelifecycles-effect-once
useEventSubscribe to eventslifecycles-event
useLifecyclesCalls mount and unmount callbackslifecycles-lifecycles
useMountedStateTracks if component is mountedlifecycles-mounted-state
useUnmountPromiseTrack if component is mounted with promise supportlifecycles-unmount-promise
usePromiseResolves promise only while component is mountedlifecycles-promise
useLoggerLogs in console as component goes through life-cycleslifecycles-logger
useMountCalls mount callbackslifecycles-mount
useUnmountCalls unmount callbackslifecycles-unmount
useUpdateEffectRun an effect only on updateslifecycles-update-effect
useIsomorphicLayoutEffectuseLayoutEffect that works on serverlifecycles-isomorphic-layout-effect
useDeepCompareEffectuseEffect with deep comparisonlifecycles-deep-compare-effect
useShallowCompareEffectuseEffect with shallow comparisonlifecycles-shallow-compare-effect
useCustomCompareEffectuseEffect with custom comparison functionlifecycles-custom-compare-effect

State

State hooks allow you to easily manage state of booleans, arrays, and maps.

TopicDescriptionReference
createMemoFactory of memoized hooksstate-create-memo
createReducerFactory of reducer hooks with custom middlewarestate-create-reducer
createReducerContextFactory of hooks for sharing state between componentsstate-create-reducer-context
createStateContextFactory of hooks for sharing state between componentsstate-create-state-context
createGlobalStateCross component shared statestate-create-global-state
useDefaultReturns the default value when state is null or undefinedstate-default
useGetSetReturns state getter get() instead of raw statestate-get-set
useGetSetStateCombination of useGetSet and useSetStatestate-get-set-state
useLatestReturns the latest state or propsstate-latest
usePreviousReturns the previous state or propsstate-previous
usePreviousDistinctLike usePrevious but with a predicatestate-previous-distinct
useObservableTracks latest value of an Observablestate-observable
useRafStateCreates setState method which only updates after requestAnimationFramestate-raf-state
useSetStateCreates setState method which works like this.setStatestate-set-state
useToggleTracks state of a booleanstate-toggle
useCounterTracks state of a numberstate-counter
useListTracks state of an arraystate-list
useMapTracks state of an objectstate-map
useSetTracks state of a Setstate-set
useQueueImplements simple queuestate-queue
useStateListCircularly iterates over an arraystate-state-list
useStateValidatorValidates state with a validator functionstate-state-validator
useStateWithHistoryStores previous state values and provides handles to travel through themstate-state-with-history
useMultiStateValidatorAlike useStateValidator but tracks multiple statesstate-multi-state-validator
useMediatedStateLike regular useState but with mediation by custom functionstate-mediated-state
useFirstMountStateCheck if current render is firststate-first-mount-state
useRendersCountCount component rendersstate-renders-count
useMethodsNeat alternative to useReducerstate-methods

Miscellaneous

TopicDescriptionReference
useEnsuredForwardedRefUse a React.forwardedRef safelymisc-ensured-forwarded-ref

平台分布

Codex

33.05%
按下载量换算1,786

Claude

28.55%
按下载量换算1,543

Cursor

19.23%
按下载量换算1,039

Gemini CLI

9.89%
按下载量换算535

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills