vue

Provides Vue 3 Composition API patterns, component guidance, and testing practices for .vue files.

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/Aveer/skills --skill vue-aveer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vue
Source: https://github.com/Aveer/skills/tree/main/skills/vue
Command: npx skills add https://github.com/Aveer/skills --skill vue-aveer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing Vue 3 code involves many subtle decisions—props destructuring, reactivity rules, watcher cleanup, and TypeScript typing—where mistakes cause silent failures or hard-to-debug issues. This Skill gives an AI assistant a progressive reference system so it applies correct, version-aware Vue 3 patterns instead of generic or outdated advice. ## Core Features & Use Cases - Component Patterns: Props with reactive destructuring, typed emits, defineModel for v-model, slots shorthand, template refs, and SSR hydration handling. - Composables & Reactivity: Rules for use* functions, VueUse-first guidance, ref/reactive/computed/watch fundamentals, and cleanup patterns like onWatcherCleanup. - Testing & TypeScript: Vitest + @vue/test-utils component and composable testing, router mocking, InjectionKey typing, vue-tsc strict templates, and generic components. - Use Case: When asked to build a form component with two-way binding, the assistant loads references/components.md and produces a typed defineModel implementation with proper emit handling instead of a manual modelValue prop pattern. ## Quick Start Use the vue skill to create a Vue 3 component with typed props, emits, and a defineModel two-way binding.

Frequently Asked Questions about vue

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use defineModel for v-model in Vue 3?▼

defineModel replaces the manual modelValue prop plus update:modelValue emit with a single two-way binding declaration. Call const model = defineModel<string>() in script setup, then bind with v-model in the template; use named models like defineModel('firstName') for multiple bindings.

How to test Vue 3 components with Vitest?▼

Mount components with @vue/test-utils, pass props and slots, then trigger interactions and assert on emitted events or rendered output. Colocate tests as Component.spec.ts files and mock vue-router's useRoute and useRouter when components depend on routing.

Does reactive props destructuring work in Vue 3?▼

Reactive props destructuring works in Vue 3.5 and later, letting you destructure defineProps with defaults while keeping reactivity. When passing destructured props to watchers, wrap them in a getter like watch(() => count, ...) so changes are tracked.

Why does destructuring reactive() lose reactivity in Vue?▼

Destructuring a reactive() object extracts raw values disconnected from the proxy, so updates no longer trigger. Use toRefs() to convert properties back into refs, or prefer ref() for individual state values instead of reactive().

When should I use a composable instead of a utility function?▼

Use composables (use* functions) for stateful logic involving refs, lifecycle hooks, or watchers, and reserve utils for pure functions like formatters and validators with no side effects. Check VueUse first since most common composable patterns are already implemented there.

How do I type provide/inject in Vue 3 TypeScript?▼

Create a Symbol cast as InjectionKey<T> and share it between provider and consumer files. provide(key, value) and inject(key) then carry full type information, and inject returns T | undefined unless you supply a default value.