vue-engineering

Guide Vue 3 component creation with Composition API and script setup.

1|Updated Oct 21, 2025
One-click install
npx skills add https://github.com/vinceh/recipe --skill vue-engineering
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue-engineering
Source: https://github.com/vinceh/recipe/tree/main/.claude/skills/vue-engineering
Command: npx skills add https://github.com/vinceh/recipe --skill vue-engineering

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

Provides a practical, up-to-date guide to Vue 3 development using the Composition API and script setup, including patterns for components and composables, TypeScript integration, performance optimization, and testing with Vitest. It helps teams build maintainable Vue apps faster.

Core Features & Use Cases

  • Quick Start: Basic component using script setup.
  • Composables patterns and TS-friendly prop/emit usage.
  • Performance optimization and Vite-based tooling.
  • Testing guidance with Vitest and Vue Test Utils.

Quick Start

Create a basic Vue 3 component with script setup and a small composable using the templates and references provided.

Frequently Asked Questions about vue-engineering

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

FAQPage Schema
How do I build Vue 3 components with TypeScript and script setup?

Vue 3 components using script setup combine TypeScript with the Composition API for type-safe, concise syntax. Define props, emits, and reactive state directly in `<script setup>`, then use composables to extract and reuse logic across components while maintaining full type inference.

What are composables and how do I structure them in Vue 3?

Composables are reusable functions that encapsulate reactive logic and state in Vue 3. They follow the Composition API pattern, returning reactive data and methods for use across components. TypeScript-friendly composables leverage type generics to provide intellisense and prevent runtime errors.

How do I optimize Vue 3 application performance with Vite?

Vue 3 + Vite optimization includes code splitting, lazy loading, tree-shaking unused code, and leveraging Vite's fast HMR. The Composition API reduces bundle size compared to Options API, and proper composable organization prevents duplicate logic in the final build.

How do I test Vue 3 components with Vitest and Vue Test Utils?

Vitest integrated with Vue Test Utils enables fast unit testing for Vue 3 components and composables. Mock reactive state, test emitted events, and verify component behavior without a browser. TypeScript support ensures test code receives type safety alongside application code.

Can I use the Composition API with TypeScript in existing Vue 3 projects?

Yes. The Composition API works alongside the Options API in the same project. Migrating to script setup and strict TypeScript gradually improves maintainability without requiring a full rewrite. Both patterns coexist within a Vite-based Vue 3 ecosystem.