vue

Guides writing Vue 3 single-file components with Composition API and script setup macros.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing Vue 3 components requires knowing the correct Composition API patterns, compiler macros, and built-in components, and outdated Options API habits or incorrect reactivity usage lead to bugs and poor performance. ## Core Features & Use Cases - Script Setup & Macros: Covers defineProps, defineEmits, defineModel, defineExpose, defineOptions, defineSlots, and generic components with TypeScript. - Reactivity & Lifecycle: Explains ref vs shallowRef, computed, watch, watchEffect, effectScope, lifecycle hooks, and composable patterns. - Built-in Components & Directives: Documents Transition, TransitionGroup, Teleport, Suspense, KeepAlive, v-memo, and custom directives. - Use Case: When building a modal component, use this Skill to correctly implement v-model two-way binding with defineModel, wrap the markup in Teleport to render at document body, and animate it with Transition. ## Quick Start Use the vue skill to write a Vue 3 component with script setup, typed props, and a watcher that fetches data when a prop changes.

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 creates a two-way binding prop consumed via v-model in Vue 3.4+. Calling defineModel<string>() creates a modelValue prop, and assigning to model.value emits update:modelValue. Named models like defineModel<number>('count') map to v-model:count on the parent.

What is the difference between ref and shallowRef in Vue?

ref provides deep reactivity that tracks nested property changes, while shallowRef only triggers reactivity when .value itself is reassigned. Prefer shallowRef for large data structures or when deep tracking is unnecessary, since it avoids the performance cost of deep observation.

Should I use Composition API or Options API in Vue 3?

Use the Composition API with <script setup lang="ts">, which is the recommended approach for Vue 3. It provides better runtime performance, improved TypeScript type inference, and enables reusable logic through composables. Options API is discouraged for new code.

How do I watch a prop for changes in Vue script setup?

Use watch with a getter function: watch(() => props.id, (id) => fetchData(id), { immediate: true }). Watching the getter ensures reactivity tracking, since watching props.id directly would capture only the initial value. Vue 3.5 also supports deep watch with a depth limit.

Does Vue Suspense work with async setup components?

Yes, Suspense handles components with async setup() or top-level await in <script setup>, showing a fallback slot while dependencies resolve. Note that Suspense remains an experimental feature, and it also supports pending, resolve, and fallback events for tracking loading states.

Why does destructuring reactive props lose reactivity in Vue?

Destructuring a reactive() object or props breaks the reactive proxy connection, so the extracted values stop triggering updates. Use toRefs() to convert properties into refs, or rely on defineProps destructure behavior in Vue 3.5 which the compiler handles specially.