All skills
onmax avatar

/vue

@de09c7b official
by Maxonmax/nuxt-skills715 stars
38

Vue 3 Composition API, script setup macros, reactivity system, and built-in components. Use when writing Vue SFCs, defineProps/defineEmits/defineModel, watchers, or using Transition/Teleport/Suspense/KeepAlive.

Use this Skill: https://skilld.dev/gh/onmax/nuxt-skills/vue

This session only. Nothing lands on disk.

SKILL.md

≈54 tokens always: the name and description. ≈665 when used: this file. ≈3.9k more on demand in 3 files.

Vue

Based on Vue 3.5. Always use Composition API with <script setup lang="ts">.

Preferences

  • Prefer TypeScript over JavaScript
  • Prefer <script setup lang="ts"> over <script>
  • For performance, prefer shallowRef over ref if deep reactivity is not needed
  • Always use Composition API over Options API
  • Discourage using Reactive Props Destructure

Core

Topic Description Reference
Script Setup & Macros <script setup>, defineProps, defineEmits, defineModel, defineExpose, defineOptions, defineSlots, generics script-setup-macros
Reactivity & Lifecycle ref, shallowRef, computed, watch, watchEffect, effectScope, lifecycle hooks, composables core-new-apis

Features

Topic Description Reference
Built-in Components & Directives Transition, Teleport, Suspense, KeepAlive, v-memo, custom directives advanced-patterns

Quick Reference

Component Template

<script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue'

const props = defineProps<{
  title: string
  count?: number
}>()

const emit = defineEmits<{
  update: [value: string]
}>()

const model = defineModel<string>()

const doubled = computed(() => (props.count ?? 0) * 2)

watch(() => props.title, (newVal) => {
  console.log('Title changed:', newVal)
})

onMounted(() => {
  console.log('Component mounted')
})
</script>

<template>
  <div>{{ title }} - {{ doubled }}</div>
</template>

Key Imports

// Reactivity
import { ref, shallowRef, computed, reactive, readonly, toRef, toRefs, toValue } from 'vue'

// Watchers
import { watch, watchEffect, watchPostEffect, onWatcherCleanup } from 'vue'

// Lifecycle
import { onMounted, onUpdated, onUnmounted, onBeforeMount, onBeforeUpdate, onBeforeUnmount } from 'vue'

// Utilities
import { nextTick, defineComponent, defineAsyncComponent } from 'vue'

Source: SKILL.md on GitHub

No alerts9d5 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    This skill provides a high-quality reference and set of code templates for Vue 3.5 development using the Composition API, sourced from official documentation and reputable community resources.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

  • Runlayer7mo

    11 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at de09c7b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated last week
Other metadata
metadata
{
  "author": "Anthony Fu",
  "version": "2026.1.31",
  "source": "Generated from https://github.com/vuejs/docs, scripts at https://github.com/antfu/skills"
}

README badge

README badge for onmax/nuxt-skills/vue

Provides Composition API patterns, component architecture, testing practices, and TypeScript guidance for Vue 3 development. Covers .vue files, composables, reactivity, routing, and testing with Vitest and @vue/test-utils, organized as modular reference files loaded on-demand.

Generated from the current SKILL.md.

Does this skill cover Nuxt-specific patterns like server routes and file-based routing?
No. This skill focuses on Vue 3 components, composables, and client-side code. Load the separate `nuxt` skill for server routes, API endpoints, and file-based routing.
What testing framework does this skill assume?
Vitest with @vue/test-utils for component and composable testing, as documented in the testing reference.
Does this cover VueUse composables?
This skill references VueUse integration patterns in composables, but the dedicated `vueuse` skill is recommended for in-depth VueUse guidance.
Can I use this skill with Vue 2?
No. This skill targets Vue 3.5+ with Composition API patterns and modern reactivity features.
Should I load all the reference files at once?
No. Load only the reference files relevant to your current task to minimize context usage, such as references/components.md for .vue files or references/testing.md for test files.

Generated from the current SKILL.md. These answers refresh after source changes.