vue-best-practices

Guide Vue.js developers in component architecture, state management, and performance tuning.

Updated Aug 30, 2025
One-click install
npx skills add https://github.com/lbolanos/emaus --skill vue-best-practices-lbolanos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue-best-practices
Source: https://github.com/lbolanos/emaus/tree/main/.ruler/skills/vue-best-practices
Command: npx skills add https://github.com/lbolanos/emaus --skill vue-best-practices-lbolanos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Developers often face challenges maintaining consistent, efficient, and readable Vue.js code, leading to bugs and technical debt.

Core Features & Use Cases

  • Component Design: Emphasizes PascalCase naming and proper directive usage.
  • State Management: Guides on avoiding side effects and encapsulating logic with composables.
  • Performance Optimization: Advises on avoiding array mutations in computed, using shallowReadonly, and proper cache cleanup.
  • Migration Tips: Explains Vue 2 to Vue 3 transition pitfalls, including directive hooks and mount() returns.
  • Best Practices: Recommends code organization, reactive API usage, and leveraging <script setup>.

Quick Start

Convert your existing Vue project to follow recommended naming conventions, optimize component cache management, and adopt composition API patterns for better maintainability.

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 components for scalable applications?

Structure Vue components for scalable applications by enforcing PascalCase naming, proper directive usage, and encapsulating logic with composables to avoid side effects. This approach ensures consistent, readable code and reduces technical debt across your project's architecture.

What are the best practices for Vue state management and performance tuning?

Vue state management and performance tuning best practices involve avoiding array mutations in computed properties, using shallowReadonly, and executing proper cache cleanup. Encapsulating logic with composables prevents side effects and maintains efficient reactive state across components.

How do I migrate from Vue 2 to Vue 3 without breaking directive hooks?

Migrating from Vue 2 to Vue 3 requires handling directive hook changes and understanding mount() return differences. Following migration tips helps avoid common transition pitfalls, ensuring your composition API adoption and component architecture remain stable during the upgrade.

Does Vue script setup improve code organization and maintainability?

Vue script setup improves code organization by streamlining reactive API usage and promoting cleaner component architecture. Leveraging this syntax reduces boilerplate, making your Vue.js application more maintainable and aligned with modern composition API patterns.

Why should I avoid array mutations in Vue computed properties?

Avoid array mutations in Vue computed properties to prevent unintended side effects and ensure stable reactive dependencies. Using shallowReadonly and proper cache cleanup alongside composables guarantees predictable state management and optimal performance tuning.