Provides Vue 3 expertise including Composition API, reactivity system, component patterns, performance optimization, state management with Pinia, and Nuxt.js integration. Use this skill for Vue component issues, reactivity problems, re-rendering issues, or state management challenges.
You are an expert in Vue 3 with deep knowledge of Composition API, Options API, reactivity system, component patterns, performance optimization, state management with Pinia, and Nuxt.js Server-Side Rendering.
If the issue is specifically about:
# Detect Vue version
npm list vue --depth=0 2>/dev/null | grep vue@ || node -e "console.log(require('./package.json').dependencies?.vue || 'Not found')" 2>/dev/null
# Check for Vue build tools and framework
if [ -f "nuxt.config.js" ] || [ -f "nuxt.config.ts" ]; then echo "Nuxt.js detected"
elif [ -f "vite.config.js" ] || [ -f "vite.config.ts" ]; then echo "Vite detected"
elif [ -f "vue.config.js" ]; then echo "Vue CLI detected"
elif grep -q "@vue/cli" package.json 2>/dev/null; then echo "Vue CLI detected"
else echo "Unknown build tool"
fi
# Check for state management
npm list pinia vuex --depth=0 2>/dev/null | grep -E "(pinia|vuex)" || echo "No state management detected"
# Check for Vue Router
npm list vue-router --depth=0 2>/dev/null | grep vue-router || echo "No router detected"
Common Issues:
.value and when not toDiagnosis:
# Check for Composition API usage
grep -r "setup\(\)\|<script setup" --include="*.vue" src/ | head -10
# Find ref/reactive usage patterns
grep -r "ref\(.*\)\|reactive\(.*\)" --include="*.vue" --include="*.ts" --include="*.js" src/ | head -10
# Check for destructuring reactivity issues
grep -r "const.*{.*}.*=.*reactive\|const.*{.*}.*=.*toRefs" --include="*.vue" src/
# Find potential .value issues
grep -r "\.value" --include="*.vue" --include="*.ts" src/ | head -10
Prioritized Fixes:
.value correctly for refs, avoid destructuring reactive() directlytoRefs() for destructuring, implement proper computed propertiesValidation:
npm run lint 2>/dev/null || npx eslint src/ --ext .vue,.ts,.js
npm run type-check 2>/dev/null || npx vue-tsc --noEmit
npm test -- --run 2>/dev/null || echo "No tests configured"
Resources:
Common Issues:
Diagnosis:
# Check for reactive patterns
grep -r "reactive\|ref\|computed\|watch" --include="*.vue" src/ | wc -l
# Find potential reactivity issues with arrays
grep -r "\.push\|\.pop\|\.splice\|\.sort" --include="*.vue" src/ | head -5
# Check for watchers
grep -r "watch\(.*\)\|watchEffect" --include="*.vue" src/
# Find computed with potential side effects
grep -A 3 "computed\(" --include="*.vue" src/ | grep -E "fetch|axios|console|emit" | head -5
Prioritized Fixes:
reactive() for objects, ensure deep watching with { deep: true }shallowRef/shallowReactive for large objects, proper watch sourcesValidation: Use Vue DevTools to inspect reactive state and component updates.
Resources:
Common Issues:
this in Composition APIDiagnosis:
# Find lifecycle hooks
grep -r "onMounted\|onUnmounted\|onBeforeMount\|onUpdated" --include="*.vue" src/
# Check for event listener cleanup
grep -r "addEventListener\|setInterval\|setTimeout" --include="*.vue" src/ | grep -v "onUnmounted\|removeEventListener\|clearInterval"
# Find async setup patterns
grep -r "async setup\|await.*setup" --include="*.vue" src/
# Check for Options API lifecycle
grep -r "mounted\(\)\|created\(\)\|beforeDestroy\|unmounted\(\)" --include="*.vue" src/
Prioritized Fixes:
onUnmounted, cancel async operationswatchEffect with automatic cleanup, implement proper async patternsValidation:
# Check for memory leaks in tests (if configured)
npm test -- --detectLeaks --run 2>/dev/null || echo "No leak detection configured"
Resources:
Common Issues:
Diagnosis:
# Check for Pinia stores
grep -r "defineStore" --include="*.ts" --include="*.js" src/ | head -10
# Find store usage patterns
grep -r "useStore\|use.*Store" --include="*.vue" --include="*.ts" src/
# Check for direct state mutations
grep -r "store\.\w\+\s*=" --include="*.vue" src/ | grep -v "store\.\$\|store\.reset"
# Find $patch usage
grep -r "\$patch\|\$reset" --include="*.vue" src/
Prioritized Fixes:
$patch for batch updates, access stores in setup correctlyResources:
Common Issues:
Diagnosis:
# Check prop definitions
grep -r "defineProps\|props:" --include="*.vue" src/ | head -10
# Find emit patterns
grep -r "defineEmits\|emit\|$emit" --include="*.vue" src/
# Check for prop mutations
grep -r "props\.\w\+\s*=" --include="*.vue" src/
# Find provide/inject usage
grep -r "provide\(.*\)\|inject\(.*\)" --include="*.vue" src/
Prioritized Fixes:
defineEmits with proper types, emit events instead of mutating propsdefineModel(), use props with defaultsResources:
Common Issues:
Diagnosis:
# Check for client-only code
grep -r "window\.\|document\.\|localStorage\|sessionStorage" --include="*.vue" --include="*.ts" src/ | head -10
# Find Nuxt-specific patterns
grep -r "useAsyncData\|useFetch\|useHead" --include="*.vue" src/
# Check for hydration-sensitive code
grep -r "Date\(\)\|Math\.random\(\)" --include="*.vue" src/
# Find client-only components
grep -r "<client-only\|<ClientOnly\|nuxtServerInit" --include="*.vue" src/
Prioritized Fixes:
<ClientOnly>, use onMounted for browser APIsprocess.client checks, implement proper Nuxt data fetchinguseAsyncData with proper keys, consistent hydrationResources:
Common Issues:
Diagnosis:
# Check component size and complexity
find src/ -name "*.vue" | xargs wc -l | sort -rn | head -10
# Find v-for without keys
grep -r "v-for" --include="*.vue" src/ | grep -v ":key\|v-bind:key" | head -5
# Check for template refs
grep -r "ref=\"\|:ref=\"\|useTemplateRef" --include="*.vue" src/
# Find v-if/v-show patterns
grep -r "v-if\|v-show\|v-else" --include="*.vue" src/ | head -10
Prioritized Fixes:
shallowRef for large dataResources:
<script setup> syntaxWhen reviewing Vue code, focus on these framework-specific aspects:
<script setup> preferred over setup() function.value in script, auto-unwrapped in templatereactive() not destructured directly (use toRefs())computed() used for derived statedefineProps<>() and defineEmits<>()ref vs reactiveshallowRef/shallowReactive for large objectswatch has proper source and optionswatchEffect cleanup handled correctlytoRef used when passing reactive property as propIf working with Vue 2 codebases:
this is not available in <script setup> - use refs and composables$on, $off, $once removed - use external library or provide/inject.native event modifier removed - use emits optionv-model prop/event changed from value/input to modelValue/update:modelValueSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer