vue-best-practices

Guides Vue 3 development with Composition API, component design, and performance best practices.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/falentio/cimi --skill vue-best-practices-falentio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue-best-practices
Source: https://github.com/falentio/cimi/tree/main/.agents/skills/vue-best-practices
Command: npx skills add https://github.com/falentio/cimi --skill vue-best-practices-falentio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Vue projects often suffer from inconsistent architecture, bloated components, unclear data flow, and premature optimization. This Skill enforces a structured workflow for Vue 3 development so components stay focused, typed, and maintainable. ## Core Features & Use Cases - Architecture enforcement: Defaults to Vue 3 + Composition API with <script setup lang="ts">, requiring component boundary planning before coding. - Core foundations: Covers reactivity, SFC structure, component data flow (props down, events up, v-model, provide/inject), and composable organization with typed contracts. - Optional features and performance: Loads references for slots, KeepAlive, Teleport, Suspense, transitions, directives, plugins, and performance techniques (virtualized lists, v-once/v-memo) only when requirements demand them. - Use Case: When building a CRUD list feature in a Nuxt or Vite app, use this Skill to split the UI into container, form, list, and filter components with typed props/emits and composable-based state. ## Quick Start Use the vue-best-practices skill to refactor this Vue component following Composition API and component splitting guidelines.

Frequently Asked Questions about vue-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Vue 3 components with Composition API?

Use `<script setup lang="ts">` with SFC sections ordered as script, template, style. Keep components focused on a single responsibility, extract stateful logic into composables, and define typed contracts with defineProps and defineEmits.

When should I split a Vue component into smaller components?

Split when a component owns both orchestration and substantial presentational markup, has 3 or more distinct UI sections, or contains repeated template blocks. Entry and route view components should stay thin composition surfaces.

Should I use Composition API or Options API in Vue 3?

Composition API with `<script setup>` is the recommended default for Vue 3 projects. Use Options API only when the project explicitly requires it, such as maintaining legacy codebases.

How do I handle two-way binding with v-model in Vue 3?

Use defineModel in Vue 3.4+ for component v-model bindings. For earlier versions, use the modelValue prop with an update:modelValue emit. Reserve v-model for true two-way component contracts.

How do I improve performance for large lists in Vue?

Virtualize lists over 50-100 items using libraries like vue-virtual-scroller or @tanstack/vue-virtual so only visible items render. Apply v-memo to skip re-renders of unchanged items and avoid deep component nesting in list rows.

When should I use provide/inject instead of props in Vue?

Use provide/inject for deep-tree dependencies or shared context crossing more than about three layers. Use symbol-based InjectionKey keys, keep mutations in the provider, and expose explicit actions rather than letting consumers mutate shared state.