vue-best-practices

Provides Vue 3 coding guidance for Composition API, reactivity, and TypeScript issues.

8|1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/belos-street/skill-kit --skill vue-best-practices-belos-street
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue-best-practices
Source: https://github.com/belos-street/skill-kit/tree/main/skills/vue-best-practices
Command: npx skills add https://github.com/belos-street/skill-kit --skill vue-best-practices-belos-street

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill collects Vue 3 best practices, common gotchas, and performance patterns so teams can avoid reactive bugs, inconsistent APIs, and costly regressions while standardizing on Composition API, script setup, and TypeScript.

Core Features & Use Cases

  • Reactivity & Composables: Guidance on refs vs reactive, watch vs watchEffect, computed usage, and composable design patterns to avoid hidden side effects.
  • Components & Architecture: Best practices for component naming, props/emits conventions, render/slot patterns, and migrating from Options API to Composition API.
  • Performance, SSR & Caching: Recommendations for KeepAlive caching, hydration strategies, async components, transition and animation pitfalls, and bundle-size considerations.
  • Directives, Lifecycle & Types: Rules for custom directives, lifecycle hook registration, v-model/defineModel behaviors, and TypeScript typing patterns.
  • Use Cases: Ideal for code reviews, onboarding, migration planning, debugging subtle reactivity bugs, and hardening route/keep-alive behavior.

Quick Start

Ask the vue-best-practices skill to review a Vue 3 component or directory and list detected best-practice violations with concrete fixes for Composition API, reactivity, and TypeScript issues.

Frequently Asked Questions about vue-best-practices

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

FAQPage Schema
How do I fix Vue 3 reactivity bugs when using refs and reactive?

Vue 3 reactivity bugs often stem from misusing refs versus reactive or improper watch and watchEffect usage. Apply composable design patterns and computed properties to avoid hidden side effects and ensure consistent state tracking.

What is the best way to migrate a Vue component from Options API to Composition API?

Migrating to the Composition API requires restructuring component logic into script setup syntax, updating props and emits conventions, and replacing lifecycle hooks. Following established best practices prevents inconsistent APIs and costly regressions.

Does this Vue 3 best practices guidance cover SSR hydration and KeepAlive caching?

Yes, the guidance covers SSR hydration strategies, KeepAlive caching, and async component patterns. It provides recommendations to optimize performance, handle transition pitfalls, and reduce bundle size.

How do I write TypeScript typing patterns for Vue 3 custom directives and defineModel?

TypeScript typing patterns for Vue 3 involve correctly typing custom directives, lifecycle hook registrations, and v-model or defineModel behaviors. Applying these rules ensures strict type safety and maintainable architecture.

Why does my Vue 3 watchEffect create hidden side effects and how do I fix it?

Vue 3 watchEffect can create hidden side effects when used improperly instead of watch or computed properties. Use precise watch sources and computed properties for derived state to avoid unnecessary reactivity triggers.

Can I use these Vue 3 best practices for code review and debugging?

Yes, you can use these Vue 3 best practices for code reviews, onboarding, and debugging. Ask the skill to review a component or directory to list detected violations and provide concrete fixes.