vue-best-practices

Enforce Vue 3 Composition API and TypeScript patterns in Vue projects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill consolidates Vue 3 best practices, emphasizing the Composition API, <script setup>, and TypeScript as the standard approach. It covers SSR considerations, Volar, vue-tsc, and integration with Vue Router, Pinia, and Vite, to guide teams from small components to large-scale apps.

Core Features & Use Cases

  • Enforces Composition API as default (avoid unnecessary Options API)
  • Encourages code organization by feature, reusable composables, and clean typing
  • Provides patterns for computed, watchers, lifecycle, transitions, and performance
  • Applies to projects using Vue 3, SSR, Vite, Router, and Pinia

Quick Start

Use this skill to align your Vue projects on the Composition API and TypeScript, adopting recommended patterns for scalable UI development.

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 a Vue 3 project using the Composition API and script setup?

Structure a Vue 3 project using the Composition API by organizing code by feature, creating reusable composables, and enforcing <script setup> in single-file components. This approach ensures clean typing and scalable UI architecture.

What's the best way to integrate TypeScript with Vue 3 single-file components?

The best way to integrate TypeScript with Vue 3 is using <script setup> and Volar. Enforce consistent TypeScript typing across composables and components to build maintainable applications.

Does this Vue best practices guidance apply to SSR and Vite configurations?

Yes, this Vue best practices guidance applies to SSR and Vite configurations. It provides architectural patterns and performance-conscious guidance specifically for Vue 3 projects utilizing Server-Side Rendering and Vite.

When should I use the Composition API instead of the Options API in Vue?

Use the Composition API instead of the Options API in Vue to achieve better code organization and scalability. Enforcing the Composition API as the default avoids unnecessary Options API usage and simplifies complex component logic.

How do I manage state and routing in a scalable Vue 3 application?

Manage state and routing in a scalable Vue 3 application by integrating Pinia for state management and Vue Router for navigation. This ensures consistent architectural patterns across your project.