vue-best-practices

Solid

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.

Web & Frontend 5,273 stars 289 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
100
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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. - **Favor small, focused components:** easier to test, reuse, and maintain. - **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) Create a brief component map before implementation for any non-trivial feature. - Define each component's single responsibility in one sentence. - Keep entry/root and route-level view components as composition sur...

Details

Author
antfu
Repository
antfu/skills
Created
4 months ago
Last Updated
1 months ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category