vue
moeru-ai/airi/.agents/skills/vue/SKILL.md
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.
Skill50k starsChanged 3 days ago
What's in it
- Vue
- Preferences
- Core
- Features
- Quick Reference
- Component Template
- Key Imports
---
name: vue
description: 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.
metadata:
author: Anthony Fu
version: "2026.1.31"
source: Generated from https://github.com/vuejs/docs, scripts at https://github.com/antfu/skills
---
# 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](references/script-setup-macros.md) |
| Reactivity & Lifecycle | ref, shallowRef, computed, watch, watchEffect, effectScope, lifecycle hooks, composables | [core-new-apis](references/core-new-apis.md) |
## Features
| Topic | Description | Reference |
|-------|-------------|-----------|
| Built-in Components & Directives | Transition, Teleport, Suspense, KeepAlive, v-memo, custom directives | [advanced-patterns](references/advanced-patterns.md) |
## Quick Reference
### Component Template
```vue
<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
```ts
// 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'
```
More agent context in moeru-ai/airi
36 other files this repository gives its agents.
AGENTS.md
CLAUDE.md
Copilot instructions
Skill
- agent-browser-electron.agents/skills/agent-browser-electron/SKILL.md
- agent-browser.agents/skills/agent-browser/SKILL.md
- analyze-io-traces.agents/skills/analyze-io-traces/SKILL.md
- create-pr.agents/skills/create-pr/SKILL.md
- enforce-rules-for-i18n.agents/skills/enforce-rules-for-i18n/SKILL.md
- enforce-rules-for-pinia-synced.agents/skills/enforce-rules-for-pinia-synced/SKILL.md
- enforce-rules-for-typescript.agents/skills/enforce-rules-for-typescript/SKILL.md
- enforce-rules-for-unocss.agents/skills/enforce-rules-for-unocss/SKILL.md
- enforce-rules-for-vitest.agents/skills/enforce-rules-for-vitest/SKILL.md
- eventa.agents/skills/eventa/SKILL.md
- pinia.agents/skills/pinia/SKILL.md
- pnpm.agents/skills/pnpm/SKILL.md
- release-note-writer.agents/skills/release-note-writer/SKILL.md
- simple-english.agents/skills/simple-english/SKILL.md
- stage-tamagotchi-godot-csharp.agents/skills/stage-tamagotchi-godot-csharp/SKILL.md
- tsdown.agents/skills/tsdown/SKILL.md
- unocss.agents/skills/unocss/SKILL.md
- upload-github-attachment.agents/skills/upload-github-attachment/SKILL.md
- use-agent-browser-for-airi.agents/skills/use-agent-browser-for-airi/SKILL.md
- use-agent-browser-with-input-file.agents/skills/use-agent-browser-with-input-file/SKILL.md
- use-vishot-for-airi.agents/skills/use-vishot-for-airi/SKILL.md
- use-vishot.agents/skills/use-vishot/SKILL.md
- use-vishot-with-capacitor.agents/skills/use-vishot-with-capacitor/SKILL.md
- use-vishot-with-electron.agents/skills/use-vishot-with-electron/SKILL.md
- use-vishot-with-input-file.agents/skills/use-vishot-with-input-file/SKILL.md
- use-vishot-with-web.agents/skills/use-vishot-with-web/SKILL.md
- vue-best-practices.agents/skills/vue-best-practices/SKILL.md
- vue-testing-best-practices.agents/skills/vue-testing-best-practices/SKILL.md
- vueuse-functions.agents/skills/vueuse-functions/SKILL.md
- web-design-guidelines.agents/skills/web-design-guidelines/SKILL.md
- xsai.agents/skills/xsai/SKILL.md
Also found in 9 other repositories
The same file, byte for byte, in the weekly crawl of public GitHub.
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
Reports can't be read right now.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

