vue

Develop Vue 3 components with Composition API, script setup, and TypeScript.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/xurenlu/marstaff --skill vue-xurenlu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue
Source: https://github.com/xurenlu/marstaff/tree/main/skills/vue
Command: npx skills add https://github.com/xurenlu/marstaff --skill vue-xurenlu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write modern Vue.js applications efficiently by leveraging the Composition API, <script setup>, and built-in features, leading to cleaner, more maintainable code.

Core Features & Use Cases

  • Composition API & <script setup>: Write reusable logic and organize component code effectively.
  • Reactivity System: Understand and utilize ref, computed, watch, and watchEffect for dynamic UIs.
  • Built-in Components: Master Transition, Teleport, Suspense, and KeepAlive for advanced UI patterns.
  • Use Case: When building a complex form with multiple interdependent fields and validation, use the Composition API and <script setup> to manage the state and logic cleanly.

Quick Start

Use the vue skill to define a component with props and emits using <script setup lang="ts">.

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 Single File Component?

To define props and emits in a Vue 3 Single File Component, use the `<script setup>` syntax with TypeScript. This approach allows you to declare component inputs and outputs cleanly, ensuring type-safe communication between parent and child components.

What is the best way to manage reactive state in Vue 3?

The best way to manage reactive state in Vue 3 is by using the Composition API with `ref` and `computed`. These functions allow you to track reactive dependencies and compute derived values dynamically, ensuring your UI updates efficiently when underlying data changes.

How does the Vue 3 Composition API help organize complex component logic?

The Vue 3 Composition API helps organize complex component logic by allowing you to group related state and methods together. Instead of separating data, methods, and watchers, you can colocate interdependent fields and validation logic for cleaner, more maintainable code.

Can I use built-in components like Teleport and Suspense in Vue 3?

Yes, you can use built-in components like Teleport and Suspense in Vue 3. These components enable advanced UI patterns such as rendering content outside the DOM hierarchy and managing asynchronous component loading states effectively.

When should I use `watch` versus `watchEffect` for reactivity in Vue?

Use `watch` when you need to track specific reactive dependencies and access previous and new values. Use `watchEffect` for automatically tracking reactive dependencies within a callback and executing side effects immediately without explicitly declaring the sources.