vue

Write TypeScript Vue 3 single-file components using script setup macros and reactivity utilities.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides concise, opinionated guidance for authoring Vue 3 single-file components with the Composition API so developers avoid common reactivity pitfalls, typing mistakes, and inconsistent component patterns.

Core Features & Use Cases

  • Opinionated preferences: favor TypeScript, use <script setup lang="ts">, prefer shallowRef for large structures, and use Composition API over Options API.
  • Script setup macros and typing: defineProps, defineEmits, defineModel, defineExpose, defineOptions, and defineSlots with generics and default handling.
  • Reactivity and lifecycle patterns: refs, shallowRef, computed, watch/watchEffect with flush timing, effectScope, and lifecycle hooks, plus built-in components like Transition, Teleport, Suspense, and KeepAlive for advanced UI behaviors.
  • Use Case: Quickly scaffold strongly-typed components, implement performant list rendering with v-memo, manage async setup with Suspense, or cache view states with KeepAlive while preserving lifecycle hooks.

Quick Start

Create a Vue 3 single-file component using <script setup lang="ts"> that declares typed props title:string and count?:number, emits an update event, computes a doubled value from count, and logs onMounted.

Frequently Asked Questions about vue

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

FAQPage Schema
How do I write Vue 3 single-file components with typed props and emits?

To write Vue 3 single-file components, use the `<script setup lang="ts">` macro to declare typed props and emits. This approach leverages TypeScript generics for defineProps and defineEmits, ensuring strongly-typed component interfaces and concise reactive code.

What is the best way to handle reactivity for large data structures in Vue 3?

The best way to handle reactivity for large data structures in Vue 3 is using shallowRef instead of standard refs. This prevents deep reactivity tracking, optimizing rendering performance and reducing overhead when dealing with extensive object arrays.

Does Vue 3 script setup support asynchronous operations and Suspense?

Yes, Vue 3 script setup supports asynchronous operations through top-level await. When paired with the built-in Suspense component, this mechanism manages async setup states, displaying fallback content while resolving data dependencies.

How do I optimize list rendering performance in Vue 3?

To optimize list rendering performance in Vue 3, apply the v-memo directive within your v-for loops. This directive caches portions of the virtual DOM based on specified dependencies, skipping unnecessary re-renders when list item data remains unchanged.

Can I use built-in components like Teleport and KeepAlive with the Composition API?

Yes, you can use built-in components like Teleport and KeepAlive with the Composition API. They integrate seamlessly within `<script setup>` blocks, allowing you to manage view state caching and render DOM elements outside the component hierarchy.

When should I use effectScope and watch flush modes in Vue 3?

Use effectScope to group and manually stop reactive effects, preventing memory leaks. Adjust watch flush modes like 'post' or 'sync' to precisely control when side effects execute relative to Vue's rendering cycle, avoiding layout thrashing.