vue

Guide Vue 3 SFC development using the Composition API and script setup.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/WOOWOOYONG/Curl-Ticket --skill vue-woowooyong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue
Source: https://github.com/WOOWOOYONG/Curl-Ticket/tree/main/.agents/skills/vue
Command: npx skills add https://github.com/WOOWOOYONG/Curl-Ticket --skill vue-woowooyong

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers efficiently write Vue 3 Single File Components (SFCs) using the Composition API, leveraging modern features like <script setup> and compiler macros for cleaner, more performant code.

Core Features & Use Cases

  • Composition API: Utilize ref, computed, watch, and lifecycle hooks for organized stateful logic.
  • <script setup>: Write SFCs with less boilerplate and better type inference.
  • Macros: Effortlessly define props (defineProps), emits (defineEmits), and models (defineModel).
  • Built-in Components: Leverage Transition, Teleport, Suspense, and KeepAlive for advanced UI patterns.
  • Use Case: When building a complex form in Vue, use this Skill to define props for form fields, emit validation status, and manage component state using ref and computed within <script setup>.

Quick Start

Use the vue skill to define a component with a title prop and a count ref, then render a button that increments the count.

Frequently Asked Questions about vue

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

FAQPage Schema
How do I define props and emits in a Vue 3 script setup component?

The Vue 3 Composition API replaces Options API boilerplate by using `ref` and `reactive` for state, `computed` for derived values, and `watch` for side effects, allowing you to organize component logic by feature rather than by option type.

What is the best way to manage component state in Vue 3 using the Composition API?

Manage component state in Vue 3 by using `ref` or `reactive` to track reactive variables, `computed` for derived state, and `watch` to trigger side effects when dependencies change, all organized within the `<script setup>` block.

How do I use built-in components like Transition and Teleport in Vue SFCs?

Wrap dynamic elements with `Transition` for enter/leave animations, use `Teleport` to render DOM nodes outside the component hierarchy, `KeepAlive` to cache component instances, and `Suspense` to handle asynchronous component loading states.

Does Vue 3 script setup support type inference for props?

Yes, `<script setup>` provides better type inference for props and emits. By passing a type literal to `defineProps`, the compiler automatically generates runtime declarations while maintaining strict TypeScript integration for your component interfaces.

When should I use Vue lifecycle hooks with the Composition API?

Use Composition API lifecycle hooks like `onMounted` or `onUnmounted` within `<script setup>` to register side effects, fetch data, or clean up event listeners at specific stages of the component's lifecycle.

Why use defineModel instead of defineProps for two-way binding in Vue?

Use `defineModel` to simplify two-way binding by automatically generating a `modelValue` prop and an `update:modelValue` event, reducing boilerplate compared to manually defining and syncing `defineProps` and `defineEmits`.