# Vue Best Practices

MUST be used for Vue.js tasks.

- Repository: https://github.com/vuejs-ai/skills (3229 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-23
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add vuejs-ai/skills --skill vue-best-practices -g -a claude-code -y`
Codex: `npx skills add vuejs-ai/skills --skill vue-best-practices -g -a codex -y`
Cursor: `npx skills add vuejs-ai/skills --skill vue-best-practices -g -a cursor -y`
Gemini CLI: `npx skills add vuejs-ai/skills --skill vue-best-practices -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add vuejs-ai/skills`

## Description

MUST be used for Vue.js tasks. Strongly recommends Composition API with `<script setup>` and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Vue Best Practices Workflow

Use this skill as an instruction set. Follow the workflow in order unless the user explicitly asks for a different order.

## Core Principles
- **Keep state predictable:** one source of truth, derive everything else.
- **Make data flow explicit:** Props down, Events up for most cases.
- **Decompose by responsibility:** keep each implementation focused and the contracts between implementations explicit.
- **Avoid unnecessary re-renders:** use computed properties and watchers wisely.
- **Readability counts:** write clear, self-documenting code.

## 1) Confirm architecture before coding (required)

- Default stack: Vue 3 + Composition API + `<script setup lang="ts">`.
- If the project explicitly uses Options API, load `vue-options-api-best-practices` skill if available.
- If the project explicitly uses JSX, load `vue-jsx-best-practices` skill if available.

### 1.1 Must-read core references (required)

- Before implementing any Vue task, make sure to read and apply these core references:
  - `references/reactivity.md`
  - `references/sfc.md`
  - `references/component-data-flow.md`
  - `references/composables.md`
- Keep these references in active working context for the entire task, not only when a specific issue appears.

### 1.2 Plan component boundaries before coding (required)

For a non-trivial feature or structural refactor, sketch responsibilities, state owners, and the contracts that cross their boundaries. For local fixes, preserve existing boundaries unless they obstruct the change.

The rest: https://github.com/vuejs-ai/skills/blob/HEAD/skills/vue-best-practices/SKILL.md
