Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

vue — Claude Code skill: what it does, how to install

This skill guides agents through Vue 3 Composition API, script setup, and reactivity. Use it when writing Vue SFCs or built-in component flows.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add antfu/skills --skill vue -a claude-code
Open on GitHub

What vue does

The skill directs agents toward Vue 3 Composition API and <script setup lang="ts">. It covers defineProps, defineEmits, defineModel, defineExpose, defineOptions, defineSlots, generics, ref, shallowRef, computed, watch, watchEffect, lifecycle hooks, and composables.

Its reference material is grouped around script setup macros, core reactivity APIs, and advanced patterns. The advanced section covers Transition, Teleport, Suspense, KeepAlive, v-memo, and custom directives. It also recommends TypeScript and shallowRef when deep reactivity is unnecessary.

For a codebase built around the Options API, check whether these recommendations fit before applying them. The skill is available for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode.

What it helps with

  • write Vue SFCs with Composition API
  • type props, emits, and model bindings
  • configure watchers and component lifecycle hooks
  • choose between ref and shallowRef
  • add Transition, Teleport, or Suspense

Example prompts for the agent

  • Create a Vue SFC for a user profile with `<script setup lang="ts">`, typed `defineProps`, and `defineEmits`.
  • Review this Vue component, move it from Options API to Composition API, and explain where `shallowRef` fits.
  • Add `defineModel`, `watch`, and `onMounted` to this component, then use `Teleport` for its modal.

How to install vue

1Skills CLI (Vercel)

npx skills add antfu/skills --skill vue -a claude-code

2Manually: put the files in place

~/.claude/skills/vue/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/vue/

From the same set7

The whole set →

Similar

web-design-reviewer official github This skill inspects a running website, spots layout, responsive, and accessibility issues, and can fix them in the source code. Use it when a UI review should lead to verified code changes. GitHub Copilot 13,957installs better-layout jakubkrehel A skill that sets grouping, alignment, reading order and responsive structure, then stress-tests the result by resizing, translating and mirroring it for RTL. Claude Code CX Codex Cursor +1 30,400installs better-interface jakubkrehel Runs a cross-discipline interface review covering accessibility, layout, copy, typography, color, and UI polish into one ranked report. Claude Code CX Codex Cursor +1 29,700installs better-accessibility jakubkrehel Reviews an interface against WCAG 2.2 and fixes issues in the project’s styling system. Use it to check keyboard navigation and screen-reader behavior. Claude Code CX Codex Cursor +1 29,200installs better-writing jakubkrehel Writes and reviews UI copy, from button labels to errors and empty states. It keeps product vocabulary consistent and guides users to the next step. Claude Code CX Codex Cursor +1 28,700installs game-engine official github Guides GitHub Copilot when building browser games and game engines with HTML5 and JavaScript. Use it for 2D or 3D rendering, physics, collisions, and controls. GitHub Copilot 13,140installs frontend-design official anthropics This skill guides intentional visual design for new interfaces and redesigns. Use it when a generic generated UI is not enough. Claude Code Claude.ai 1,025,790installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. Claude Code CX Codex Cursor +1 673,100installs

Questions about vue

How do I install vue in Claude Code?

Run npx skills add antfu/skills --skill vue -a claude-code, then run npx skills add antfu/skills --skill vue -a claude-code again. The skill file will be placed at ~/.claude/skills/vue/SKILL.md.

What does the vue skill do?

It gives an agent guidance for Vue 3 Composition API, script setup, reactivity, watchers, lifecycle hooks, and built-in components.

Which Vue built-in components does vue cover?

The skill covers Transition, Teleport, Suspense, and KeepAlive, along with v-memo and custom directives.

Source text

SKILL.md · MIT
---
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.9.25"
  source: Generated from https://github.com/vuejs/docs, scripts at https://github.com/antfu/skills
---

# Vue

> Based on Vue 3.5, generated at 2026-09-25. 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'
```

© Anthony Fu · MIT · antfu/skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor