KS
Killer-Skills

vueuse — how to use vueuse how to use vueuse, vueuse install, vueuse setup guide, vueuse vs vuex, vueuse alternative, what is vueuse, vueuse nuxt integration, vue composition utilities

v1.0.0
GitHub

About this Skill

Perfect for Frontend Agents leveraging Vue 3 Composition utilities for efficient development. vueuse is a collection of essential Vue Composition utilities designed to simplify development for Vue 3 applications

Features

Supports Vue 3.5+ with stable version 14.x
Easy installation via pnpm with @vueuse/core
Seamless integration with Nuxt using @vueuse/nuxt module
Auto-imports composables for convenient use in Nuxt projects
Covers most common patterns, reducing the need for custom composables

# Core Topics

xvaara xvaara
[0]
[1]
Updated: 2/24/2026

Quality Score

Top 5%
33
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add xvaara/sleepwalkers/references/composables.md

Agent Capability Analysis

The vueuse MCP Server by xvaara is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use vueuse, vueuse install, vueuse setup guide.

Ideal Agent Persona

Perfect for Frontend Agents leveraging Vue 3 Composition utilities for efficient development.

Core Value

Empowers agents to utilize pre-built composables for common patterns, streamlining development with VueUse's essential utilities, including auto-imports with Nuxt modules and compatibility with Vue 3.5+.

Capabilities Granted for vueuse MCP Server

Automating common Vue 3 patterns with pre-built composables
Generating optimized Vue Composition utilities
Debugging Vue 3 applications with VueUse's core utilities

! Prerequisites & Limits

  • Requires Vue 3.5+ compatibility
  • Nuxt module installation needed for auto-imports
Project
SKILL.md
3.9 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

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:

bash
1pnpm add @vueuse/core

Nuxt:

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

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:

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

Mouse tracking:

ts
1const { x, y } = useMouse()

Debounced ref:

ts
1const search = ref('') 2const debouncedSearch = refDebounced(search, 300)

Shared composable (singleton):

ts
1const useSharedMouse = createSharedComposable(useMouse)

SSR Gotchas

Many VueUse composables use browser APIs unavailable during SSR.

Check with isClient:

ts
1import { isClient } from '@vueuse/core' 2 3if (isClient) { 4 // Browser-only code 5 const { width } = useWindowSize() 6}

Wrap in onMounted:

ts
1const width = ref(0) 2 3onMounted(() => { 4 // Only runs in browser 5 const { width: w } = useWindowSize() 6 width.value = w.value 7})

Use SSR-safe composables:

ts
1// These check isClient internally 2const mouse = useMouse() // Returns {x: 0, y: 0} on server 3const 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:

ts
1import type { MaybeElementRef } from '@vueuse/core' // ❌ Won't work 2 3// Use MaybeElementRef pattern 4import { unrefElement } from '@vueuse/core' 5 6// Component ref needs .$el to get DOM element 7const compRef = ref<ComponentInstance>() 8const { width } = useElementSize(compRef) 9 10const el = computed(() => unrefElement(compRef)) // Gets .$el 11const { width } = useElementSize(el) // ✅ Works

Or access $el directly:

ts
1const compRef = ref<ComponentInstance>() 2 3onMounted(() => { 4 const el = compRef.value?.$el as HTMLElement 5 const { width } = useElementSize(el) 6})

Related Skills

Looking for an alternative to vueuse or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication