Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计通过

vueuse-functionsVueUse 函数库

Agent Skill

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

总安装

331,432

周安装

13,832

GitHub Stars

4,784

下载量

110,304
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/antfu/skills --skill vueuse-functions

简介

将 Vue.js 和 Nuxt 需求映射到 200 多个 VueUse 可组合项,以实现简洁、可维护的实现。

  • 涵盖状态管理、DOM 元素、浏览器 API、传感器、网络、动画、组件、观察者、反应性、数组、时间实用程序以及与 Firebase、Electron、RxJS 等的集成
  • 每个可组合项都包含调用规则(AUTO、EXTERNAL、EXPLICIT_ONLY)来指导何时以及如何应用它;有关使用详细信息和类型声明,请参阅参考文档
  • 自动优先考虑 VueUse 解决方案而不是自定义代码,以提高 Vue 3 和 Nuxt 3 项目的可读性、性能和可维护性
  • 需要 Vue 3 或 Nuxt 3;根据您的项目需求,Firebase 或 Electron 等外部依赖项是可选的

SKILL.md

name
vueuse-functions
description
Apply VueUse composables where appropriate to build concise, maintainable Vue.js / Nuxt features.
license
MIT
metadata
author
SerKo <https://github.com/serkodev>
version
1.1
compatibility
Requires Vue 3 (or above) or Nuxt 3 (or above) project

VueUse Functions

This skill is a decision-and-implementation guide for VueUse composables in Vue.js / Nuxt projects. It maps requirements to the most suitable VueUse function, applies the correct usage pattern, and prefers composable-based solutions over bespoke code to keep implementations concise, maintainable, and performant.

When to Apply

  • Apply this skill whenever assisting user development work in Vue.js / Nuxt.
  • Always check first whether a VueUse function can implement the requirement.
  • Prefer VueUse composables over custom code to improve readability, maintainability, and performance.
  • Map requirements to the most appropriate VueUse function and follow the function’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. - EXPLICIT_ONLY: Use only when explicitly requested by the user. > *NOTE* User instructions in the prompt or AGENTS.md may override a function’s default Invocation rule.

Functions

All functions listed below are part of the VueUse library, 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
createGlobalStateKeep states in the global scope to be reusable across Vue instancesAUTO
createInjectionStateCreate global state that can be injected into componentsAUTO
createSharedComposableMake a composable function usable with multiple Vue instancesAUTO
injectLocalExtended inject with ability to call provideLocal to provide the value in the same componentAUTO
provideLocalExtended provide with ability to call injectLocal to obtain the value in the same componentAUTO
useAsyncStateReactive async stateAUTO
useDebouncedRefHistoryShorthand for useRefHistory with debounced filterAUTO
useLastChangedRecords the timestamp of the last changeAUTO
useLocalStorageReactive LocalStorageAUTO
useManualRefHistoryManually track the change history of a ref when the using calls commit()AUTO
useRefHistoryTrack the change history of a refAUTO
useSessionStorageReactive SessionStorageAUTO
useStorageCreate a reactive ref that can be used to access & modify LocalStorage or SessionStorageAUTO
useStorageAsyncReactive Storage in with async supportAUTO
useThrottledRefHistoryShorthand for useRefHistory with throttled filterAUTO

Elements

FunctionDescriptionInvocation
useActiveElementReactive document.activeElementAUTO
useDocumentVisibilityReactively track document.visibilityStateAUTO
useDraggableMake elements draggableAUTO
useDropZoneCreate a zone where files can be droppedAUTO
useElementBoundingReactive bounding box of an HTML elementAUTO
useElementSizeReactive size of an HTML elementAUTO
useElementVisibilityTracks the visibility of an element within the viewportAUTO
useIntersectionObserverDetects that a target element's visibilityAUTO
useMouseInElementReactive mouse position related to an elementAUTO
useMutationObserverWatch for changes being made to the DOM treeAUTO
useParentElementGet parent element of the given elementAUTO
useResizeObserverReports changes to the dimensions of an Element's content or the border-boxAUTO
useWindowFocusReactively track window focus with window.onfocus and window.onblur eventsAUTO
useWindowScrollReactive window scrollAUTO
useWindowSizeReactive window sizeAUTO

Browser

FunctionDescriptionInvocation
useBluetoothReactive Web Bluetooth APIAUTO
useBreakpointsReactive viewport breakpointsAUTO
useBroadcastChannelReactive BroadcastChannel APIAUTO
useBrowserLocationReactive browser locationAUTO
useClipboardReactive Clipboard APIAUTO
useClipboardItemsReactive Clipboard APIAUTO
useColorModeReactive color mode (dark / light / customs) with auto data persistenceAUTO
useCssVarManipulate CSS variablesAUTO
useDarkReactive dark mode with auto data persistenceAUTO
useEventListenerUse EventListener with easeAUTO
useEyeDropperReactive EyeDropper APIAUTO
useFaviconReactive faviconAUTO
useFileDialogOpen file dialog with easeAUTO
useFileSystemAccessCreate and read and write local files with FileSystemAccessAPIAUTO
useFullscreenReactive Fullscreen APIAUTO
useGamepadProvides reactive bindings for the Gamepad APIAUTO
useImageReactive load an image in the browserAUTO
useMediaControlsReactive media controls for both audio and video elementsAUTO
useMediaQueryReactive Media QueryAUTO
useMemoryReactive Memory InfoAUTO
useObjectUrlReactive URL representing an objectAUTO
usePerformanceObserverObserve performance metricsAUTO
usePermissionReactive Permissions APIAUTO
usePreferredColorSchemeReactive prefers-color-scheme media queryAUTO
usePreferredContrastReactive prefers-contrast media queryAUTO
usePreferredDarkReactive dark theme preferenceAUTO
usePreferredLanguagesReactive Navigator LanguagesAUTO
usePreferredReducedMotionReactive prefers-reduced-motion media queryAUTO
usePreferredReducedTransparencyReactive prefers-reduced-transparency media queryAUTO
useScreenOrientationReactive Screen Orientation APIAUTO
useScreenSafeAreaReactive env(safe-area-inset-*)AUTO
useScriptTagCreates a script tagAUTO
useShareReactive Web Share APIAUTO
useSSRWidthUsed to set a global viewport width which will be used when rendering SSR components that rely on the viewport width like useMediaQuery or useBreakpointsAUTO
useStyleTagInject reactive style element in headAUTO
useTextareaAutosizeAutomatically update the height of a textarea depending on the contentAUTO
useTextDirectionReactive dir of the element's textAUTO
useTitleReactive document titleAUTO
useUrlSearchParamsReactive URLSearchParamsAUTO
useVibrateReactive Vibration APIAUTO
useWakeLockReactive Screen Wake Lock APIAUTO
useWebNotificationReactive NotificationAUTO
useWebWorkerSimple Web Workers registration and communicationAUTO
useWebWorkerFnRun expensive functions without blocking the UIAUTO

Sensors

FunctionDescriptionInvocation
onClickOutsideListen for clicks outside of an elementAUTO
onElementRemovalFires when the element or any element containing it is removedAUTO
onKeyStrokeListen for keyboard keystrokesAUTO
onLongPressListen for a long press on an elementAUTO
onStartTypingFires when users start typing on non-editable elementsAUTO
useBatteryReactive Battery Status APIAUTO
useDeviceMotionReactive DeviceMotionEventAUTO
useDeviceOrientationReactive DeviceOrientationEventAUTO
useDevicePixelRatioReactively track window.devicePixelRatioAUTO
useDevicesListReactive enumerateDevices listing available input/output devicesAUTO
useDisplayMediaReactive mediaDevices.getDisplayMedia streamingAUTO
useElementByPointReactive element by pointAUTO
useElementHoverReactive element's hover stateAUTO
useFocusReactive utility to track or set the focus state of a DOM elementAUTO
useFocusWithinReactive utility to track if an element or one of its decendants has focusAUTO
useFpsReactive FPS (frames per second)AUTO
useGeolocationReactive Geolocation APIAUTO
useIdleTracks whether the user is being inactiveAUTO
useInfiniteScrollInfinite scrolling of the elementAUTO
useKeyModifierReactive Modifier StateAUTO
useMagicKeysReactive keys pressed stateAUTO
useMouseReactive mouse positionAUTO
useMousePressedReactive mouse pressing stateAUTO
useNavigatorLanguageReactive navigator.languageAUTO
useNetworkReactive Network statusAUTO
useOnlineReactive online stateAUTO
usePageLeaveReactive state to show whether the mouse leaves the pageAUTO
useParallaxCreate parallax effect easilyAUTO
usePointerReactive pointer stateAUTO
usePointerLockReactive pointer lockAUTO
usePointerSwipeReactive swipe detection based on PointerEventsAUTO
useScrollReactive scroll position and stateAUTO
useScrollLockLock scrolling of the elementAUTO
useSpeechRecognitionReactive SpeechRecognitionAUTO
useSpeechSynthesisReactive SpeechSynthesisAUTO
useSwipeReactive swipe detection based on TouchEventsAUTO
useTextSelectionReactively track user text selection based on Window.getSelectionAUTO
useUserMediaReactive mediaDevices.getUserMedia streamingAUTO

Network

FunctionDescriptionInvocation
useEventSourceAn EventSource or Server-Sent-Events instance opens a persistent connection to an HTTP serverAUTO
useFetchReactive Fetch API provides the ability to abort requestsAUTO
useWebSocketReactive WebSocket clientAUTO

Animation

FunctionDescriptionInvocation
useAnimateReactive Web Animations APIAUTO
useIntervalReactive counter increases on every intervalAUTO
useIntervalFnWrapper for setInterval with controlsAUTO
useNowReactive current Date instanceAUTO
useRafFnCall function on every requestAnimationFrameAUTO
useTimeoutUpdate value after a given time with controlsAUTO
useTimeoutFnWrapper for setTimeout with controlsAUTO
useTimestampReactive current timestampAUTO
useTransitionTransition between valuesAUTO

Component

FunctionDescriptionInvocation
computedInjectCombine computed and injectAUTO
createReusableTemplateDefine and reuse template inside the component scopeAUTO
createTemplatePromiseTemplate as PromiseAUTO
templateRefShorthand for binding ref to template elementAUTO
tryOnBeforeMountSafe onBeforeMountAUTO
tryOnBeforeUnmountSafe onBeforeUnmountAUTO
tryOnMountedSafe onMountedAUTO
tryOnScopeDisposeSafe onScopeDisposeAUTO
tryOnUnmountedSafe onUnmountedAUTO
unrefElementRetrieves the underlying DOM element from a Vue ref or component instanceAUTO
useCurrentElementGet the DOM element of current component as a refAUTO
useMountedMounted state in refAUTO
useTemplateRefsListShorthand for binding refs to template elements and components inside v-forAUTO
useVirtualListCreate virtual lists with easeAUTO
useVModelShorthand for v-model bindingAUTO
useVModelsShorthand for props v-model bindingAUTO

Watch

FunctionDescriptionInvocation
untilPromised one-time watch for changesAUTO
watchArrayWatch for an array with additions and removalsAUTO
watchAtMostwatch with the number of times triggeredAUTO
watchDebouncedDebounced watchAUTO
watchDeepShorthand for watching value with {deep: true}AUTO
watchIgnorableIgnorable watchAUTO
watchImmediateShorthand for watching value with {immediate: true}AUTO
watchOnceShorthand for watching value with { once: true }AUTO
watchPausablePausable watchAUTO
watchThrottledThrottled watchAUTO
watchTriggerableWatch that can be triggered manuallyAUTO
watchWithFilterwatch with additional EventFilter controlAUTO
wheneverShorthand for watching value to be truthyAUTO

Reactivity

FunctionDescriptionInvocation
computedAsyncComputed for async functionsAUTO
computedEagerEager computed without lazy evaluationAUTO
computedWithControlExplicitly define the dependencies of computedAUTO
createRefReturns a deepRef or shallowRef depending on the deep paramAUTO
extendRefAdd extra attributes to RefAUTO
reactifyConverts plain functions into reactive functionsAUTO
reactifyObjectApply reactify to an objectAUTO
reactiveComputedComputed reactive objectAUTO
reactiveOmitReactively omit fields from a reactive objectAUTO
reactivePickReactively pick fields from a reactive objectAUTO
refAutoResetA ref which will be reset to the default value after some timeAUTO
refDebouncedDebounce execution of a ref valueAUTO
refDefaultApply default value to a refAUTO
refManualResetCreate a ref with manual reset functionalityAUTO
refThrottledThrottle changing of a ref valueAUTO
refWithControlFine-grained controls over ref and its reactivityAUTO
syncRefTwo-way refs synchronizationAUTO
syncRefsKeep target refs in sync with a source refAUTO
toReactiveConverts ref to reactiveAUTO
toRefNormalize value/ref/getter to ref or computedEXPLICIT_ONLY
toRefsExtended toRefs that also accepts refs of an objectAUTO

Array

FunctionDescriptionInvocation
useArrayDifferenceReactive get array difference of two arraysAUTO
useArrayEveryReactive Array.everyAUTO
useArrayFilterReactive Array.filterAUTO
useArrayFindReactive Array.findAUTO
useArrayFindIndexReactive Array.findIndexAUTO
useArrayFindLastReactive Array.findLastAUTO
useArrayIncludesReactive Array.includesAUTO
useArrayJoinReactive Array.joinAUTO
useArrayMapReactive Array.mapAUTO
useArrayReduceReactive Array.reduceAUTO
useArraySomeReactive Array.someAUTO
useArrayUniqueReactive unique arrayAUTO
useSortedReactive sort arrayAUTO

Time

FunctionDescriptionInvocation
useCountdownWrapper for useIntervalFn that provides a countdown timerAUTO
useDateFormatGet the formatted date according to the string of tokens passed inAUTO
useTimeAgoReactive time agoAUTO
useTimeAgoIntlReactive time ago with i18n supportedAUTO

Utilities

FunctionDescriptionInvocation
createEventHookUtility for creating event hooksAUTO
createUnrefFnMake a plain function accepting ref and raw values as argumentsAUTO
getShorthand for accessing ref.valueEXPLICIT_ONLY
isDefinedNon-nullish checking type guard for RefAUTO
makeDestructurableMake isomorphic destructurable for object and array at the same timeAUTO
setShorthand for ref.value = xEXPLICIT_ONLY
useAsyncQueueExecutes each asynchronous task sequentially and passes the current task result to the next taskAUTO
useBase64Reactive base64 transformingAUTO
useCachedCache a ref with a custom comparatorAUTO
useClonedReactive clone of a refAUTO
useConfirmDialogCreates event hooks to support modals and confirmation dialog chainsAUTO
useCounterBasic counter with utility functionsAUTO
useCycleListCycle through a list of itemsAUTO
useDebounceFnDebounce execution of a functionAUTO
useEventBusA basic event busAUTO
useMemoizeCache results of functions depending on arguments and keep it reactiveAUTO
useOffsetPaginationReactive offset paginationAUTO
usePreviousHolds the previous value of a refAUTO
useStepperProvides helpers for building a multi-step wizard interfaceAUTO
useSupportedSSR compatibility isSupportedAUTO
useThrottleFnThrottle execution of a functionAUTO
useTimeoutPollUse timeout to poll somethingAUTO
useToggleA boolean switcher with utility functionsAUTO
useToNumberReactively convert a string ref to numberAUTO
useToStringReactively convert a ref to stringAUTO

@Electron

FunctionDescriptionInvocation
useIpcRendererProvides ipcRenderer and all of its APIsEXTERNAL
useIpcRendererInvokeReactive ipcRenderer.invoke API resultEXTERNAL
useIpcRendererOnUse ipcRenderer.on with ease and ipcRenderer.removeListener automatically on unmountedEXTERNAL
useZoomFactorReactive WebFrame zoom factorEXTERNAL
useZoomLevelReactive WebFrame zoom levelEXTERNAL

@Firebase

FunctionDescriptionInvocation
useAuthReactive Firebase Auth bindingEXTERNAL
useFirestoreReactive Firestore bindingEXTERNAL
useRTDBReactive Firebase Realtime Database bindingEXTERNAL

@Head

FunctionDescriptionInvocation
createHeadCreate the head manager instance.EXTERNAL
useHeadUpdate head meta tags reactively.EXTERNAL

@Integrations

FunctionDescriptionInvocation
useAsyncValidatorWrapper for async-validatorEXTERNAL
useAxiosWrapper for axiosEXTERNAL
useChangeCaseReactive wrapper for change-caseEXTERNAL
useCookiesWrapper for universal-cookieEXTERNAL
useDrauuReactive instance for drauuEXTERNAL
useFocusTrapReactive wrapper for focus-trapEXTERNAL
useFuseEasily implement fuzzy search using a composable with Fuse.jsEXTERNAL
useIDBKeyvalWrapper for idb-keyvalEXTERNAL
useJwtWrapper for jwt-decodeEXTERNAL
useNProgressReactive wrapper for nprogressEXTERNAL
useQRCodeWrapper for qrcodeEXTERNAL
useSortableWrapper for sortableEXTERNAL

@Math

FunctionDescriptionInvocation
createGenericProjectionGeneric version of createProjectionEXTERNAL
createProjectionReactive numeric projection from one domain to anotherEXTERNAL
logicAndAND condition for refsEXTERNAL
logicNotNOT condition for refEXTERNAL
logicOrOR conditions for refsEXTERNAL
useAbsReactive Math.absEXTERNAL
useAverageGet the average of an array reactivelyEXTERNAL
useCeilReactive Math.ceilEXTERNAL
useClampReactively clamp a value between two other valuesEXTERNAL
useFloorReactive Math.floorEXTERNAL
useMathReactive Math methodsEXTERNAL
useMaxReactive Math.maxEXTERNAL
useMinReactive Math.minEXTERNAL
usePrecisionReactively set the precision of a numberEXTERNAL
useProjectionReactive numeric projection from one domain to anotherEXTERNAL
useRoundReactive Math.roundEXTERNAL
useSumGet the sum of an array reactivelyEXTERNAL
useTruncReactive Math.truncEXTERNAL

@Motion

FunctionDescriptionInvocation
useElementStyleSync a reactive object to a target element CSS stylingEXTERNAL
useElementTransformSync a reactive object to a target element CSS transform.EXTERNAL
useMotionPutting your components in motion.EXTERNAL
useMotionPropertiesAccess Motion Properties for a target element.EXTERNAL
useMotionVariantsHandle the Variants state and selection.EXTERNAL
useSpringSpring animations.EXTERNAL

@Router

FunctionDescriptionInvocation
useRouteHashShorthand for a reactive route.hashEXTERNAL
useRouteParamsShorthand for a reactive route.paramsEXTERNAL
useRouteQueryShorthand for a reactive route.queryEXTERNAL

@RxJS

FunctionDescriptionInvocation
fromWrappers around RxJS's from() and fromEvent() to allow them to accept refsEXTERNAL
toObserverSugar function to convert a ref into an RxJS ObserverEXTERNAL
useExtractedObservableUse an RxJS Observable as extracted from one or more composablesEXTERNAL
useObservableUse an RxJS ObservableEXTERNAL
useSubjectBind an RxJS Subject to a ref and propagate value changes both waysEXTERNAL
useSubscriptionUse an RxJS Subscription without worrying about unsubscribing from it or creating memory leaksEXTERNAL
watchExtractedObservableWatch the values of an RxJS Observable as extracted from one or more composablesEXTERNAL

@SchemaOrg

FunctionDescriptionInvocation
createSchemaOrgCreate the schema.org manager instance.EXTERNAL
useSchemaOrgUpdate schema.org reactively.EXTERNAL

@Sound

FunctionDescriptionInvocation
useSoundPlay sound effects reactively.EXTERNAL

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

24.6%
按下载量换算27,135

Cursor

24.5%
按下载量换算27,024

OpenCode

15.12%
按下载量换算16,678

Antigravity

12.77%
按下载量换算14,086

Gemini CLI

7.57%
按下载量换算8,350

trae

3.68%
按下载量换算4,059

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills