Vueuse core skilld

From skilld-dev/vue-ecosystem-skills · View interactive version

Vueuse core skilld is an AI agent skill from the GitHub repository skilld-dev/vue-ecosystem-skills. Collection of essential Vue Composition Utilities. ALWAYS use when writing code that imports "@vueuse/core" or "@vueuse/shared" (VueUse). Provides the v15.0.0 API surface, v14 to v15 migration rules, new composables (useWebMCP, useTemporalNow, useLiveAnnouncer, useElementOverflow), deprecations, and

How to use this skill

Skill file

@vueuse/core 15.0.0

Prepared source: @vueuse/core@15.0.0 (package.json:4). File citations below use

paths relative to that package root. Docs citations are absolute URLs.

Environment limits

(release).

(dist/index.d.ts:3), so import { useToggle } from '@vueuse/core' works; see

shared API.

v15 rules that change generated code

  1. No templateRef. Removed in v15.0.0

(release). Use Vue's

built-in useTemplateRef() instead.

  1. Timer options are gone; pass scheduler. The deprecated per-composable

interval / immediate options were removed from ConfigurableScheduler

composables in v15.0.0 (release).

Affected options interfaces extend or intersect ConfigurableScheduler

(dist/index.d.ts:212-217): useCountdown, useNow, useTimestamp,

useTimeAgo, useTimeAgoIntl, useTemporalNow, useElementByPoint,

useMemory, useVibrate, and useWebSocket's heartbeat option.

scheduler is (cb: Fn) => Pausable, so useRafFn plugs in directly.

  1. useThrottleFn now fires trailing calls by default (trailing default

changed false to true, v15.0.0

(release)). Pass

trailing = false (3rd argument) to keep v14 behavior.

  1. useEventSource handles SSE message events and triggers both

onmessage and addEventListener handlers (v15.0.0

(release)). Do not

add manual duplicate listeners for unnamed events.

  1. deepRefs default flips next major. It defaults to true today with an

explicit warning that the next major changes it to false

(dist/index.d.ts:204-211). Pass deepRefs explicitly where the value

matters.

Do not use (deprecated or replaced)

| Export | Replacement | Evidence |

| --- | --- | --- |

| computedEager | computed() (Vue 3.4+ no longer re-triggers on unchanged values) | docs "will be removed in future version" |

| watchPausable | Vue 3.5 native watch() returns { stop, pause, resume } | docs |

| executeTransition | transition(source, from, to, options) | deprecated at dist/index.d.ts:5114-5121 |

| UseTransitionOptions.transition | easing option | same deprecation block |

| breakpointsVuetify | breakpointsVuetifyV2 or breakpointsVuetifyV3 | deprecated at dist/index.d.ts:758-762 |

| asyncComputed | computedAsync (alias remains, dist/index.d.ts:46) | alias of computedAsync |

Common tasks

import { useLocalStorage, useDark, useTitle, useThrottleFn } from '@vueuse/core'

// Reactive getter args enable derived values without computed()
const isDark = useDark()
const title = useTitle(() => isDark.value ? 'Night' : 'Day')

// Storage with schema evolution: mergeDefaults fills new keys
const settings = useLocalStorage('settings', { theme: 'light', density: 'comfortable' }, { mergeDefaults: true })

// v15 throttle fires a trailing call by default; 3rd arg is `trailing`
const onResize = useThrottleFn(handler, 200, false, true) // trailing=false, leading=true
import { useWebMCP } from '@vueuse/core'

// Register a WebMCP tool for browser agents (new in v15)
const { isSupported, isRegistered, error } = useWebMCP({
  name: 'get-current-user',
  description: 'Returns the signed-in user id',
  inputSchema: { type: 'object' },
  execute: () => ({ userId: user.value?.id ?? null }),
})

More patterns: best practices.

References

Debugging notes (v15 fixes that may explain behavior changes)

ignores stale abort errors after a refetch succeeds

(v15,

v14.4).

CLOSED after explicit close() (same releases).

comment nodes no longer crash it (v15).

usePointer resets isInside, onLongPress clears pending presses

(v15,

v14.4).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.