vue-best-practices
An agent skill by antfu, from antfu/skills. Tags: code-quality, development, ui-ux, validation, vue.
What it does
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.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add antfu/skills --skill vue-best-practices
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/antfu/skills
cp -r skills/skills/vue-best-practices ~/.claude/skills/vue-best-practices
Safety box score
Not rated yet. A safety box score grades what a skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. Anyone can request one from this page; it is saved for everyone. How the score works.
Source
- Repository
- antfu/skills (all skills from this repository)
- Path
- skills/vue-best-practices/SKILL.md
- Branch
- main
- Updated
- 2026-09-22
Related skills
- principle-type-system-discipline — Apply when designing types, reviewing a function signature, or writing code in any statically-typed language.
- typescript-best-practices — TypeScript best practices. Use when reading or editing any .ts or .tsx file.
- vue — Vue 3 Composition API, script setup macros, reactivity system, and built-in components.
- vue-router-best-practices — Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.
- vue-testing-best-practices — Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.
- review-animations — Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.