Skip to main content
skill CX Codex

vueuse-shared-skilld — Claude Code skill for @vueuse/shared 15.0.0

vueuse-shared-skilld — a skill that brings @vueuse/shared v15.0.0 API reference into Claude Code, Cursor, and other editors. Covers reactive utilities: debounce, throttle, watch variants, state sharing, and ref synchronization for Vue 3.

MIT 137 installs ★ 186 updated 2026-10-10

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add skilld-dev/vue-ecosystem-skills --skill vueuse-shared-skilld -a claude-code
Open on GitHub

What vueuse-shared-skilld does

The skill bundles documentation for @vueuse/shared v15.0.0, including function signatures and default values. It knows about breaking changes in v15, such as useThrottleFn now firing on both edges (leading and trailing) instead of trailing only. It covers common patterns: rate-limiting handlers with useDebounceFn and useThrottleFn, one-shot async flow control via until, syncing refs across type boundaries, and building typed provider-consumer stores with createInjectionState.

Includes a decision table for state-sharing tools: when to pick createGlobalState for app lifetime, createSharedComposable for a single shared instance, or createInjectionState for component-scoped state. Notes SSR behavior: createSharedComposable falls back to a plain composable on the server, so each request gets fresh state.

Once installed, it activates in your editor when you work with imports from @vueuse/shared or @vueuse/core. Requires Node.js ≥ 22 and Vue ^3.5.0 in your project.

What it helps with

  • Write a debounced search handler with a maximum wait time
  • Sync two refs that hold different types (number and string)
  • Build a typed store for component provide and inject
  • Choose between global state patterns for your app
  • Migrate throttle logic from v14 to v15 defaults

Example prompts for the agent

  • Create a debounced API search function with 1 second max wait using useDebounceFn
  • Set up two synchronized refs where a number becomes a string via syncRef
  • Help me replace watchPausable with native watch that has pause() and resume()

How to install vueuse-shared-skilld

1Skills CLI (Vercel)

npx skills add skilld-dev/vue-ecosystem-skills --skill vueuse-shared-skilld -a claude-code

2Manually: put the files in place

~/.claude/skills/vueuse-shared-skilld/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/vueuse-shared-skilld/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about vueuse-shared-skilld

How do I install vueuse-shared-skilld in Claude Code?

Run npx skills add skilld-dev/vue-ecosystem-skills --skill vueuse-shared-skilld -a claude-code, then open ~/.claude/skills/vueuse-shared-skilld/SKILL.md in your editor.

What does this skill do while I write code?

The skill helps your editor suggest correct function calls from @vueuse/shared with v15.0.0 defaults, warn about deprecated functions like computedEager, and remember migration rules between versions.

When should I use createGlobalState versus createSharedComposable?

createGlobalState holds state for the entire app lifetime. createSharedComposable creates one shared instance across all subscribers, but on the server it disables itself and each request gets fresh state.

Source text

SKILL.md · MIT
---
name: vueuse-shared-skilld
description: Use when writing, reviewing, or debugging code that imports from "@vueuse/shared" (or its utilities re-exported by "@vueuse/core"). Provides the v15.0.0 API surface, debounce and throttle defaults, watch variants, state-sharing patterns, and v14 to v15 migration rules.
license: MIT
---

# @vueuse/shared 15.0.0

Framework-agnostic reactive utilities for Vue. Peer dependency `vue ^3.5.0`
(`package.json:40`). ESM-only: `"type": "module"` and no CJS build in `dist`
(`package.json:2`). Requires Node.js >= 22 (`package.json:37`).

Source citations like `dist/index.js:904` refer to the prepared package source.
Function docs: `https://vueuse.org/<functionName>`.

## Critical v15 rules

- `useThrottleFn` default `trailing` changed from `false` to `true` in v15.0.0.
  Defaults are now `ms = 200, trailing = true, leading = true, rejectOnCancel = false`
  (dist/index.js:904). Release: https://github.com/vueuse/vueuse/releases/tag/v15.0.0
  To get v14 leading-edge-only behavior, pass `trailing = false` explicitly.
- `computedEager` / `eagerComputed` are deprecated and slated for removal.
  Use Vue 3.4+ `computed` instead (dist/index.d.ts:5-18).
- `watchPausable` / `pausableWatch` are deprecated on every overload.
  Use Vue's built-in `watch`, whose handle already has `pause()` and `resume()`
  (dist/index.js:1021, dist/index.d.ts:1459-1466).
- Prefer primary names over deprecated aliases; see the table in
  [migration-v15](./references/migration-v15.md).
- Timer composables are no-ops on the server: `useIntervalFn` and `useTimeoutFn`
  only start timers when `isClient` (dist/index.js:1654, dist/index.js:1726-1729).

## Common tasks

```ts
import { useDebounceFn, useThrottleFn } from '@vueuse/shared'

// Debounced fn: returns a promise; cancel/flush/isPending attached
const search = useDebounceFn(query => fetchApi(query), 300, { maxWait: 1000 })

// Rate-limit scroll/resize; v15 fires on BOTH edges by default
const onScroll = useThrottleFn(handler, 200)          // leading + trailing
const onScrollV14 = useThrottleFn(handler, 200, false) // trailing=false, v14 style
```

```ts
import { until, whenever } from '@vueuse/shared'

// One-shot async flow control instead of manual watchers
await until(isReady).toBe(true, { timeout: 5000, throwOnTimeout: true })

// Runs only while truthy; { once: true } auto-stops after the first run
whenever(isReady, data => render(data), { once: true })
```

```ts
import { createInjectionState } from '@vueuse/shared'

// Typed provide/inject pair without manual InjectionKey
const [useProvideStore, useStore] = createInjectionState(() => {
  const count = ref(0)
  return { count, inc: () => count.value++ }
}, { defaultValue: { count: ref(0), inc: () => {} } })
```

```ts
import { refManualReset, syncRef } from '@vueuse/shared'

const message = refManualReset('idle')   // message.reset() restores 'idle'
const num = ref(10), str = ref('10')
syncRef(num, str, {                       // transform is required when
  transform: {                            // types differ (type-level check)
    ltr: v => String(v),
    rtl: v => Number(v),
  },
})
```

More worked patterns: [reactivity-utilities](./references/reactivity-utilities.md),
[watch-utilities](./references/watch-utilities.md).

## Choosing state-sharing tools

| Tool | Lifetime | Use when |
| --- | --- | --- |
| `createGlobalState` | App lifetime, never disposed (dist/index.js:169-180) | App-wide singleton state |
| `createSharedComposable` | Disposed when last subscriber leaves (dist/index.js:583-605) | One shared instance of a composable, e.g. one `useMouse` |
| `createInjectionState` | Tied to component tree | Typed provider/consumer stores |
| `provideLocal` / `injectLocal` | Same component or scope | Provide and inject within one component |

SSR: `createSharedComposable` falls back to the plain composable on the server,
so every request gets fresh state (dist/index.js:584). Details:
[state-sharing](./references/state-sharing.md).

## References

- [api-surface](./references/api-surface.md): complete export inventory with signatures and defaults
- [migration-v15](./references/migration-v15.md): v14 to v15 changes and deprecated alias map
- [debounce-throttle](./references/debounce-throttle.md): filters, `useDebounceFn`, `useThrottleFn` semantics
- [watch-utilities](./references/watch-utilities.md): watch variants, `until`, `whenever`
- [reactivity-utilities](./references/reactivity-utilities.md): ref/computed/sync helpers
- [state-sharing](./references/state-sharing.md): global, shared, and injected state
- [timers-and-utils](./references/timers-and-utils.md): timers, counters, formatting, plain utils

© skilld-dev · MIT · skilld-dev/vue-ecosystem-skills

Similar skills

All skills for Frontend and UI →

From the same set32

The whole set →
reka-ui-skilld reka-ui-skilld is a Claude Code skill for building accessible interfaces with Reka UI 2.10.5 in Vue 3. It helps agents write clean component compositions and use props accurately. CX Codex +1 146installs vueuse-integrations-skilld vueuse-integrations-skilld equips AI agents with reference rules for 12 utility wrappers in @vueuse/integrations v15. Prevents broken imports and guides API migration. CX Codex +1 145installs tanstack-vue-table-skilld tanstack-vue-table-skilld helps AI agents write and migrate @tanstack/vue-table v9 code. Enforces explicit tableFeatures, atom-based state, and clean Vue 3 reactivity patterns. CX Codex +1 144installs vueuse-motion-skilld vueuse-motion-skilld guides coding agents through @vueuse/motion v3 APIs in Vue 3 and Nuxt 3, preventing runtime bugs with SSR, timing units, and imports. CX Codex +1 141installs tanstack-vue-virtual-skilld The tanstack-vue-virtual-skilld skill guides Vue work with @tanstack/vue-virtual, from implementing virtual lists to debugging adapter usage. It also covers window scrolling and chat feeds anchored at the end. CX Codex +1 129installs tanstack-vue-form-skilld tanstack-vue-form-skilld guides agents through writing, reviewing, and debugging Vue forms built with @tanstack/vue-form and its current API. CX Codex +1 125installs vueuse-math-skilld vueuse-math-skilld — a skill for @vueuse/math composables in Vue 3: clamp, project, round, and aggregate reactive numbers. CX Codex +1 119installs floating-ui-vue-skilld floating-ui-vue-skilld guides AI coding agents on anchoring tooltips, popovers, and menus using @floating-ui/vue 2.0.1 in Vue 3.3+. CX Codex +1 119installs

Project sponsors

Companies that keep this analytics open