| name | vue-master |
| version | 1.0.0 |
| description | Vue 3 application development with Composition API, script setup, TypeScript props/emits, Pinia, reactivity, component design, testing, and performance patterns. |
| author | skillregistry |
| license | MIT |
| agents | ["cursor","codex"] |
| categories | ["frontend"] |
| tags | ["vue","frontend","pinia"] |
Vue Master
Build Vue 3 components with <script setup>, Composition API, strong prop/event typing, focused stores, and predictable reactivity.
Workflow
- Inspect whether the project uses Options API, Composition API, Nuxt, or plain Vue.
- Match existing component and store conventions.
- Use
<script setup lang="ts"> for new Vue 3 SFCs unless the project uses another pattern.
- Keep props immutable and emit events for parent-owned changes.
- Use Pinia for shared application state, not for every local component field.
- Test component behavior through rendered output and user events.
Component Pattern
<script setup lang="ts">
const props = defineProps<{
title: string
disabled?: boolean
}>()
const emit = defineEmits<{
save: [value: string]
}>()
</script>
<template>
<button type="button" :disabled="props.disabled" @click="emit('save', props.title)">
{{ props.title }}
</button>
</template>
Rules
- Use
ref for primitives and replacement, reactive for cohesive objects.
- Use
computed for derived state instead of watchers.
- Use watchers for side effects and external synchronization.
- Destructure props carefully; Vue 3.5+ supports reactive destructured props, but older versions do not.
- Use
storeToRefs when destructuring Pinia state/getters.
- Keep composables framework-focused and side-effect-aware.
Verification
pnpm test
pnpm typecheck
pnpm build
Resources
Principles
- Reactivity should be explicit.
- Props down, events up.
- Stores are shared state, not dumping grounds.
- Computed state beats watcher-maintained duplicates.
- Version-specific Vue behavior matters.