Skip to content
cccskills
FreePublished on GitHub

vueuse

Use when working with VueUse composables - track mouse position with useMouse, manage localStorage with useStorage, detect network status with useNetwork, debounce values with refDebounced, and access browser APIs reactively. Check VueUse before writing custom composables - most patterns already implemented.

The English summary is being prepared. Showing the original description.

plutocms/pluto4 stars(GitHub 4 + cccskills 0)

Run score Not tested

See how to install

Files included (200)

  • SKILL.md4.2 KB
  • composables/computed-async.md423 B
  • composables/computed-eager.md453 B
  • composables/computed-inject.md536 B
  • composables/computed-with-control.md406 B
  • composables/create-event-hook.md681 B
  • composables/create-generic-projection.md248 B
  • composables/create-global-state.md448 B
  • composables/create-injection-state.md762 B
  • composables/create-projection.md497 B
  • composables/create-ref.md444 B
  • composables/create-reusable-template.md716 B
  • composables/create-shared-composable.md534 B
  • composables/create-template-promise.md709 B
  • composables/create-unref-fn.md733 B
  • composables/extend-ref.md625 B
  • composables/from.md173 B
  • composables/get.md247 B
  • composables/inject-local.md420 B
  • composables/is-defined.md373 B
  • composables/logic-and.md373 B
  • composables/logic-not.md335 B
  • composables/logic-or.md366 B
  • composables/make-destructurable.md330 B
  • composables/on-click-outside.md1.1 KB
  • composables/on-element-removal.md394 B
  • composables/on-key-stroke.md534 B
  • composables/on-long-press.md1.2 KB
  • composables/on-start-typing.md631 B
  • composables/provide-local.md421 B
  • composables/reactify-object.md529 B
  • composables/reactify.md932 B
  • composables/reactive-computed.md418 B
  • composables/reactive-omit.md411 B
  • composables/reactive-pick.md411 B
  • composables/ref-auto-reset.md494 B
  • composables/ref-debounced.md595 B
  • composables/ref-default.md427 B
  • composables/ref-manual-reset.md409 B
  • composables/ref-throttled.md346 B
  • composables/ref-with-control.md846 B
  • composables/set.md247 B
  • composables/sync-ref.md406 B
  • composables/sync-refs.md656 B
  • composables/template-ref.md428 B
  • composables/to-observer.md242 B
  • composables/to-reactive.md671 B
  • composables/to-ref.md364 B
  • composables/to-refs.md725 B
  • composables/try-on-before-mount.md327 B
  • composables/try-on-before-unmount.md323 B
  • composables/try-on-mounted.md311 B
  • composables/try-on-scope-dispose.md323 B
  • composables/try-on-unmounted.md307 B
  • composables/unref-element.md747 B
  • composables/until.md459 B
  • composables/use-abs.md259 B
  • composables/use-active-element.md710 B
  • composables/use-animate.md1.6 KB
  • composables/use-array-difference.md607 B
  • composables/use-array-every.md481 B
  • composables/use-array-filter.md503 B
  • composables/use-array-find-index.md490 B
  • composables/use-array-find-last.md340 B
  • composables/use-array-find.md324 B
  • composables/use-array-includes.md403 B
  • composables/use-array-join.md458 B
  • composables/use-array-map.md492 B
  • composables/use-array-reduce.md312 B
  • composables/use-array-some.md473 B
  • composables/use-array-unique.md492 B
  • composables/use-async-queue.md1.2 KB
  • composables/use-async-state.md896 B
  • composables/use-async-validator.md649 B
  • composables/use-auth.md963 B
  • composables/use-average.md311 B
  • composables/use-axios.md926 B
  • composables/use-base64.md664 B
  • composables/use-battery.md888 B
  • composables/use-bluetooth.md972 B
  • composables/use-breakpoints.md811 B
  • composables/use-broadcast-channel.md1012 B
  • composables/use-browser-location.md283 B
  • composables/use-cached.md636 B
  • composables/use-ceil.md254 B
  • composables/use-change-case.md685 B
  • composables/use-clamp.md329 B
  • composables/use-clipboard-items.md1.6 KB
  • composables/use-clipboard.md1.5 KB
  • composables/use-cloned.md742 B
  • composables/use-color-mode.md1.4 KB
  • composables/use-confirm-dialog.md981 B
  • composables/use-cookies.md625 B
  • composables/use-countdown.md1023 B
  • composables/use-counter.md440 B
  • composables/use-css-supports.md377 B
  • composables/use-css-var.md700 B
  • composables/use-current-element.md324 B
  • composables/use-cycle-list.md982 B
  • composables/use-dark.md743 B
  • composables/use-date-format.md831 B
  • composables/use-debounce-fn.md378 B
  • composables/use-debounced-ref-history.md425 B
  • composables/use-device-motion.md939 B
  • composables/use-device-orientation.md598 B
  • composables/use-device-pixel-ratio.md374 B
  • composables/use-devices-list.md857 B
  • composables/use-display-media.md1.1 KB
  • composables/use-document-visibility.md324 B
  • composables/use-draggable.md1.7 KB
  • composables/use-drauu.md938 B
  • composables/use-drop-zone.md1.5 KB
  • composables/use-element-bounding.md1.1 KB
  • composables/use-element-by-point.md633 B
  • composables/use-element-hover.md524 B
  • composables/use-element-size.md619 B
  • composables/use-element-visibility.md1.1 KB
  • composables/use-event-bus.md679 B
  • composables/use-event-listener.md418 B
  • composables/use-event-source.md1.1 KB
  • composables/use-extracted-observable.md292 B
  • composables/use-eye-dropper.md535 B
  • composables/use-favicon.md332 B
  • composables/use-fetch.md1.6 KB
  • composables/use-file-dialog.md1.5 KB
  • composables/use-file-system-access.md835 B
  • composables/use-firestore.md467 B
  • composables/use-floor.md262 B
  • composables/use-focus-trap.md1.0 KB
  • composables/use-focus-within.md1.0 KB
  • composables/use-focus.md1.0 KB
  • composables/use-fps.md384 B
  • composables/use-fullscreen.md1003 B
  • composables/use-fuse.md715 B
  • composables/use-gamepad.md730 B
  • composables/use-geolocation.md720 B
  • composables/use-idbkeyval.md854 B
  • composables/use-idle.md843 B
  • composables/use-image.md1.2 KB
  • composables/use-infinite-scroll.md1.5 KB
  • composables/use-intersection-observer.md1.3 KB
  • composables/use-interval-fn.md675 B
  • composables/use-interval.md701 B
  • composables/use-ipc-renderer-invoke.md644 B
  • composables/use-ipc-renderer-on.md579 B
  • composables/use-ipc-renderer.md1.0 KB
  • composables/use-jwt.md810 B
  • composables/use-key-modifier.md397 B
  • composables/use-last-changed.md414 B
  • composables/use-local-storage.md162 B
  • composables/use-magic-keys.md783 B
  • composables/use-manual-ref-history.md1.2 KB
  • composables/use-math.md429 B
  • composables/use-max.md262 B
  • composables/use-media-controls.md1.6 KB
  • composables/use-media-query.md488 B
  • composables/use-memoize.md850 B
  • composables/use-memory.md653 B
  • composables/use-min.md262 B
  • composables/use-mounted.md250 B
  • composables/use-mouse-in-element.md842 B
  • composables/use-mouse-pressed.md1.2 KB
  • composables/use-mouse.md1.0 KB
  • composables/use-mutation-observer.md750 B
  • composables/use-navigator-language.md491 B
  • composables/use-network.md1.2 KB
  • composables/use-now.md644 B
  • composables/use-nprogress.md321 B
  • composables/use-object-url.md535 B
  • composables/use-observable.md420 B
  • composables/use-offset-pagination.md1.4 KB
  • composables/use-online.md257 B
  • composables/use-page-leave.md289 B
  • composables/use-parallax.md564 B
  • composables/use-parent-element.md377 B
  • composables/use-performance-observer.md517 B
  • composables/use-permission.md729 B
  • composables/use-pointer-lock.md533 B
  • composables/use-pointer-swipe.md1.2 KB
  • composables/use-pointer.md697 B
  • composables/use-precision.md620 B
  • composables/use-preferred-color-scheme.md326 B
  • composables/use-preferred-contrast.md313 B
  • composables/use-preferred-dark.md279 B
  • composables/use-preferred-languages.md538 B
  • composables/use-preferred-reduced-motion.md337 B
  • composables/use-preferred-reduced-transparency.md373 B
  • composables/use-previous.md447 B
  • composables/use-projection.md426 B
  • composables/use-qrcode.md321 B
  • composables/use-raf-fn.md927 B
  • composables/use-ref-history.md1.2 KB
  • composables/use-resize-observer.md747 B
  • composables/use-round.md262 B
  • composables/use-route-hash.md367 B
  • composables/use-route-params.md566 B
  • composables/use-route-query.md618 B
  • composables/use-rtdb.md563 B
  • composables/use-screen-orientation.md687 B
  • composables/use-screen-safe-area.md451 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

VueUse

Collection of essential Vue Composition utilities. Check VueUse before writing custom composables - most patterns already implemented.

Current stable: VueUse 14.x for Vue 3.5+

Installation

Vue 3:

pnpm add @vueuse/core

Nuxt:

pnpm add @vueuse/nuxt @vueuse/core
// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@vueuse/nuxt'],
})

Nuxt module auto-imports composables - no import needed.

Categories

CategoryExamples
StateuseLocalStorage, useSessionStorage, useRefHistory
ElementsuseElementSize, useIntersectionObserver, useResizeObserver
BrowseruseClipboard, useFullscreen, useMediaQuery
SensorsuseMouse, useKeyboard, useDeviceOrientation
NetworkuseFetch, useWebSocket, useEventSource
AnimationuseTransition, useInterval, useTimeout
ComponentuseVModel, useVirtualList, useTemplateRefsList
WatchwatchDebounced, watchThrottled, watchOnce
ReactivitycreateSharedComposable, toRef, toReactive
ArrayuseArrayFilter, useArrayMap, useSorted
TimeuseDateFormat, useNow, useTimeAgo
UtilitiesuseDebounce, useThrottle, useMemoize

Quick Reference

Load composable files based on what you need:

Working on...Load file
Finding a composablereferences/composables.md
Specific composablecomposables/<name>.md

Loading Files

Consider loading these reference files based on your task:

DO NOT load all files at once. Load only what's relevant to your current task.

Common Patterns

State persistence:

const state = useLocalStorage('my-key', { count: 0 })

Mouse tracking:

const { x, y } = useMouse()

Debounced ref:

const search = ref('')
const debouncedSearch = refDebounced(search, 300)

Shared composable (singleton):

const useSharedMouse = createSharedComposable(useMouse)

SSR Gotchas

Many VueUse composables use browser APIs unavailable during SSR.

Check with isClient:

import { isClient } from '@vueuse/core'

if (isClient) {
  // Browser-only code
  const { width } = useWindowSize()
}

Wrap in onMounted:

const width = ref(0)

onMounted(() => {
  // Only runs in browser
  const { width: w } = useWindowSize()
  width.value = w.value
})

Use SSR-safe composables:

// These check isClient internally
const mouse = useMouse() // Returns {x: 0, y: 0} on server
const storage = useLocalStorage('key', 'default') // Uses default on server

@vueuse/nuxt auto-handles SSR - composables return safe defaults on server.

Target Element Refs

When targeting component refs instead of DOM elements:

import type { MaybeElementRef } from '@vueuse/core'

// Component ref needs .$el to get DOM element
const compRef = ref<ComponentInstance>()
const { width } = useElementSize(compRef) // ❌ Won't work

// Use MaybeElementRef pattern
import { unrefElement } from '@vueuse/core'

const el = computed(() => unrefElement(compRef)) // Gets .$el
const { width } = useElementSize(el) // ✅ Works

Or access $el directly:

const compRef = ref<ComponentInstance>()

onMounted(() => {
  const el = compRef.value?.$el as HTMLElement
  const { width } = useElementSize(el)
})

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

nuxt

Free

Use when working on Nuxt 4+ projects - provides server routes, file-based routing, middleware patterns, Nuxt-specific composables, and configuration with latest docs. Covers h3 v1 helpers (validation, WebSocket, SSE) and nitropack v2 patterns. Updated for Nuxt 4.3+.

The English summary is being prepared. Showing the original description.

plutocms/pluto4Updated Oct 26, 2026

Use when creating Nuxt modules: (1) Published npm modules (@nuxtjs/, nuxt-), (2) Local project modules (modules/ directory), (3) Runtime extensions (components, composables, plugins), (4) Server extensions (API routes, middleware), (5) Releasing/publishing modules to npm, (6) Setting up CI/CD workflows for modules. Provides defineNuxtModule patterns, Kit utilities, hooks, E2E testing, and release automation.

The English summary is being prepared. Showing the original description.

plutocms/pluto4Updated Oct 26, 2026

Use when building styled UI with @nuxt/ui v4 components - create forms with validation, implement data tables with sorting, build modal dialogs and overlays, configure Tailwind Variants theming. Use vue skill for raw component patterns, reka-ui for headless primitives.

The English summary is being prepared. Showing the original description.

plutocms/pluto4Updated Oct 26, 2026

Use when building with Reka UI (headless Vue components) - provides component API, accessibility patterns, composition (asChild), controlled/uncontrolled state, virtualization, and styling integration. Formerly Radix Vue.

The English summary is being prepared. Showing the original description.

plutocms/pluto4Updated Oct 26, 2026

vite

Free

Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plugins, or building libraries/SSR apps with Vite.

The English summary is being prepared. Showing the original description.

plutocms/pluto4Updated Oct 26, 2026

vitest

Free

Use when writing unit/integration tests for Vite projects - configure vitest.config.ts, write test suites with describe/it, create mock implementations with vi.fn and vi.mock, set up code coverage thresholds, and run tests in parallel

The English summary is being prepared. Showing the original description.

plutocms/pluto4Updated Oct 26, 2026

See all skills by plutocms

Report a problem with this skill