Vue Best Practices
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.
- Type
- Skill
- Author
- antfu
- Category
- Frontend
- GitHub stars
- 6.0K
- Installs
- 23.4K
- Last updated
- October 30, 2026
Install
npx skills add https://github.com/antfu/skills --skill vue-best-practicesUse cases
- Write new Vue components using Composition API and script setup.
- Review .vue files, Vue Router, or Pinia code against the recommended style.
- Set up TypeScript tooling with Volar and vue-tsc in a Vite project.
Frequently Asked Questions
Does it ever recommend Options API?
Only when a project explicitly requires Options API; otherwise it insists on Composition API.
Which Vue version does it target?
It covers Vue 3, including SSR, Volar, and vue-tsc.
When should this skill be loaded?
For any Vue work, including .vue files, Vue Router, Pinia, or Vite with Vue.
About this skill
A prescriptive Vue.js skill that recommends Composition API with <script setup> and TypeScript as the standard approach, covering Vue 3, SSR, Volar, and vue-tsc. Load it for any work involving .vue files, Vue Router, Pinia, or Vite with Vue. It insists on Composition API unless a project explicitly requires Options API.
Summary written with AI assistance from the project's public description.
Categories
More from antfu
Vitest
Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with...
by antfu
Vite
Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plugins, o...
by antfu
Vue
Vue 3 Composition API, script setup macros, reactivity system, and built-in components. Use when writing Vue SFCs, defineProps/defineEmits/defineMo...
by antfu
Nuxt
Nuxt full-stack Vue framework with SSR, auto-imports, and file-based routing. Use when working with Nuxt apps, server routes, useFetch, middleware,...
by antfu
Similar Skills
Find Skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", o...
by vercel-labs
Grill Me
A relentless interview to sharpen a plan or design.
by mattpocock
Ai Video Generation
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0,...
by inference-sh
Ai Image Generation
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FL...
by inference-sh