vue

Write Vue 3 components using Composition API, script setup macros, and built-in components.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing modern Vue 3 applications requires knowing the correct Composition API patterns, compiler macros, and reactivity rules, and outdated Options API habits or incorrect reactivity usage lead to bugs and poor performance. ## Core Features & Use Cases - Script Setup & Macros: Guidance on defineProps, defineEmits, defineModel, defineExpose, defineOptions, defineSlots, and generic components with TypeScript. - Reactivity & Lifecycle: Patterns for ref vs shallowRef, computed, watch, watchEffect, effectScope, lifecycle hooks, and composable authoring conventions. - Built-in Components & Directives: Usage of Transition, TransitionGroup, Teleport, Suspense, KeepAlive, v-memo, and custom directives. - Use Case: When building a modal component, apply Teleport to render it at the document body, defineModel for v-model binding, and Transition for enter/leave animations, all with typed script setup syntax. ## Quick Start Write a Vue 3 component with script setup and TypeScript that uses defineProps, defineModel, and a watcher to fetch 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, available in Vue 3.4+. Call const model = defineModel<string>() for the default modelValue, or pass a name like defineModel<number>('count') for named models such as v-model:count.

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 is reassigned. Prefer shallowRef for large data structures where deep tracking is unnecessary, since it reduces reactivity overhead.

Does Vue script setup support TypeScript generics?

Yes, Vue 3.3+ supports generic components via the generic attribute on the script setup tag, such as generic="T extends string | number". This lets props like items: T[] and selected: T share an inferred type parameter.

How do I type props with default values in script setup?

In Vue 3.5+, destructure defineProps directly with defaults, like const { count = 0 } = defineProps<{ count?: number }>(). In Vue 3.4 and below, use withDefaults with factory functions for array or object defaults.

Why does my Vue composable lose reactivity when destructured?

Reactivity is lost when a composable returns a reactive() object that gets destructured. Return a plain object containing refs instead, and use toValue() to accept refs, getters, or plain values as composable inputs.

When should I use Suspense with async Vue components?

Use Suspense when components have async setup() or top-level await in script setup, providing a fallback template for loading states. Note that Suspense is still an experimental feature in Vue 3.