This skill helps you apply Vue 3 performance best practices and Composition API patterns across components and state management.
npx playbooks add skill eva813/vue3-skills --skill vue3-best-practices
Comprehensive performance optimization and development guide for Vue 3 applications. Contains 45 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | Reactivity Performance | CRITICAL | reactivity- |
| 2 | Component Optimization | CRITICAL | component- |
| 3 | Bundle Size & Loading | HIGH | bundle- |
| 4 | Composition API | MEDIUM-HIGH | composition- |
| 5 | Template Performance | MEDIUM | template- |
| 6 | State Management | MEDIUM | state- |
| 7 | Lifecycle Optimization | LOW-MEDIUM | lifecycle- |
| 8 | Advanced Patterns | LOW | advanced- |
reactivity-ref-vs-reactive - Use ref for primitives, reactive for objectsreactivity-shallow-ref - Use shallowRef for large immutable objectsreactivity-computed-caching - Leverage computed property cachingreactivity-watch-vs-watcheffect - Choose appropriate watcherreactivity-unref-performance - Minimize unref calls in hot pathsreactivity-readonly-immutable - Use readonly for immutable datacomponent-async-components - Use defineAsyncComponent for heavy componentscomponent-functional - Use functional components for simple presentational logiccomponent-keep-alive - Cache expensive components with keep-alivecomponent-lazy-hydration - Implement lazy hydration for non-critical componentscomponent-prop-validation - Use efficient prop validationcomponent-emit-performance - Optimize event emissionsbundle-tree-shaking - Structure imports for optimal tree-shakingbundle-dynamic-imports - Use dynamic imports for code splittingbundle-plugin-imports - Use unplugin-auto-import for better DXbundle-lodash-imports - Import lodash functions individuallybundle-moment-alternatives - Use day.js instead of moment.jsbundle-icons-optimization - Optimize icon imports and usagecomposition-script-setup - Prefer <script setup> for better performancecomposition-composables-reuse - Extract reusable logic into composablescomposition-provide-inject - Use provide/inject for dependency injectioncomposition-expose-selectively - Expose only necessary propertiescomposition-reactive-transform - Use reactive transform where appropriatecomposition-auto-import - Configure auto-imports for better DXtemplate-v-once - Use v-once for static contenttemplate-v-memo - Use v-memo for expensive list renderingtemplate-key-optimization - Optimize v-for keys for performancetemplate-conditional-rendering - Choose v-if vs v-show appropriatelytemplate-slot-performance - Optimize slot usage and scoped slotstemplate-directive-optimization - Create efficient custom directivesstate-pinia-optimization - Optimize Pinia store structurestate-store-composition - Use store composition patternsstate-persistence - Implement efficient state persistencestate-normalization - Normalize complex state structuresstate-subscription - Optimize state subscriptionsstate-devtools - Configure devtools for debugginglifecycle-cleanup - Properly cleanup resources in onUnmountedlifecycle-async-setup - Handle async operations in setuplifecycle-watchers-cleanup - Clean up watchers and effectslifecycle-dom-access - Access DOM safely in lifecycle hookslifecycle-ssr-considerations - Handle SSR lifecycle differencesadvanced-teleport-usage - Use Teleport for portal patternsadvanced-suspense-async - Implement Suspense with async componentsadvanced-custom-renderer - Create custom renderers when neededadvanced-compiler-macros - Use compiler macros effectivelyadvanced-plugin-development - Develop efficient Vue pluginsRead individual rule files for detailed explanations and code examples:
rules/reactivity-ref-vs-reactive.md
rules/component-async-components.md
rules/composition-script-setup.md
Each rule file contains:
Special considerations for migrating from Vue 2:
Tools and techniques for monitoring Vue 3 performance:
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.