Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计通过

shadcn-hooksshadcn/ui hooks 命令行

Agent Skill

shadcn-hooks 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,392

周安装

58

GitHub Stars

57

下载量

464
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/debbl/shadcn-hooks --skill shadcn-hooks

简介

shadcn-hooks 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 适用于 shadcn/ui 的自定义 Hooks 生成或复用,支持 React 应用开发。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 可结合来源仓库和 SKILL.md 继续核验功能细节,确保与项目需求匹配。

SKILL.md

shadcn-hooks

This skill is a decision-and-implementation guide for shadcn-hooks in React projects. It maps requirements to the most suitable 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 user development work in React / Next.js.
  • Always check first whether a shadcn-hooks function can fulfill the requirement.
  • Prefer shadcn-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 Invocation field in the below functions 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.

Installation

Prefer the shadcn CLI — it copies only the hooks you need into your project (zero extra runtime dependencies, tree-shake friendly):

# Install a single hook (recommended)
npx shadcn@latest add @shadcnhooks/use-boolean

# Install multiple hooks at once
npx shadcn@latest add @shadcnhooks/use-boolean @shadcnhooks/use-mount @shadcnhooks/use-debounce

Alternatively, install the full npm package (all hooks bundled):

npm install shadcn-hooks
When using the shadcn CLI, import from the local path (e.g. import {useBoolean} from "@/hooks/use-boolean"). When using the npm package, import from "shadcn-hooks" (e.g. import {useBoolean} from "shadcn-hooks").

Functions

All functions listed below are part of shadcn-hooks. Each section categorizes functions based on their functionality.

IMPORTANT: Each function entry includes a short Description and a detailed Reference. When using any function, always consult the corresponding document in ./references for Usage details and Type Declarations.

State

FunctionDescriptionInvocation
useBooleanBoolean state with set, setTrue, setFalse, toggle helpersAUTO
useControllableValueSupports both controlled and uncontrolled component patternsAUTO
useCounterCounter with inc, dec, set, reset helpersAUTO
useDebounceDebounced reactive valueAUTO
useResetStateState with a reset function to restore the initial valueAUTO
useThrottleThrottled reactive valueAUTO
useToggleToggle between two values with utility actionsAUTO

Advanced

FunctionDescriptionInvocation
useCreationMemoized factory with deep dependency comparisonAUTO
useCustomCompareEffectuseEffect with a custom dependency comparatorAUTO
useLatestRef that always holds the latest valueAUTO
useLockFnPrevents concurrent execution of an async functionAUTO
useMemoizedFnStable function reference that never changes identityAUTO
usePreviousReturns the previous value of a stateAUTO

Lifecycle

FunctionDescriptionInvocation
useDebounceEffectDebounced useEffectAUTO
useDebounceFnDebounced function with run, cancel, flush controlsAUTO
useDeepCompareEffectuseEffect with deep dependency comparisonAUTO
useDeepCompareLayoutEffectuseLayoutEffect with deep dependency comparisonAUTO
useEffectEventPonyfill for React 19's useEffectEventAUTO
useEffectWithTargetuseEffect that supports target DOM element(s) as dependenciesAUTO
useIntervalInterval timer with auto-cleanupAUTO
useIsHydratedReturns true after client hydration completesAUTO
useIsomorphicLayoutEffectuseLayoutEffect on client, useEffect on serverAUTO
useMountRuns a callback only on component mountAUTO
useThrottleEffectThrottled useEffectAUTO
useThrottleFnThrottled function with run, cancel, flush controlsAUTO
useTimeoutTimeout timer with auto-cleanupAUTO
useUnmountRuns cleanup on component unmountAUTO
useUpdateReturns a function that forces component re-renderAUTO
useUpdateEffectuseEffect that skips the first renderAUTO

Browser

FunctionDescriptionInvocation
useActiveElementTrack the currently focused elementAUTO
useBatteryReactive battery level and charging informationAUTO
useClickAnyWhereListen to click events anywhere on the documentAUTO
useClickAwayDetect clicks outside of target element(s)AUTO
useClipboardReactive Clipboard API with read/write supportAUTO
useDocumentVisibilityReactive document visibility stateAUTO
useElementSizeReactive element size via ResizeObserverAUTO
useEventListenerDeclarative event listener with auto-cleanupAUTO
useFpsReactive FPS (frames per second) measurementAUTO
useFullscreenReactive Fullscreen APIAUTO
useHashReactive window.location.hashAUTO
useHoverReactive hover state of an elementAUTO
useInViewportTrack element visibility via IntersectionObserverAUTO
useIsMatchMediaReactive CSS media query matchingAUTO
useIsOnlineReactive online/offline network statusAUTO
useMouseReactive pointer coordinates for mouse/touchAUTO
useNetworkReactive network connection informationAUTO
useOsReactive browser operating system detectionAUTO
useScrollLockLock/unlock scroll on a target elementAUTO
useTextSelectionReactive text selection state with bounding rectAUTO
useTitleReactive document title managementAUTO

Dev

FunctionDescriptionInvocation
useWhyDidYouUpdateLogs which props changed between renders (debug only)AUTO

External

FunctionDescriptionInvocation
useMcpModel Context Protocol client hook from use-mcpEXTERNAL
useQueryData fetching hook from @tanstack/react-queryEXTERNAL
useStickToBottomScroll-stick behavior from use-stick-to-bottomEXTERNAL
useSWRData fetching hook from swrEXTERNAL

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.79%
按下载量换算171

Claude

30.74%
按下载量换算143

Cursor

19.59%
按下载量换算91

Gemini CLI

9.91%
按下载量换算46

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills