Guides Vue 3 development with a focus on type safety, composition patterns, and user-behavior testing.
Install
mkdir -p .claude/skills/vue-hateskream && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19051" && unzip -o skill.zip -d .claude/skills/vue-hateskream && rm skill.zipInstalls to .claude/skills/vue-hateskream
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when planning or implementing Vue 3 projects - helps architect component structure, plan feature implementation, and enforce TypeScript-first patterns with Composition API, defineModel for bindings, Testing Library for user-behavior tests. Especially useful in planning phase to guide proper patterns before writing code.Key capabilities
- →Architect component structure for Vue 3 projects.
- →Plan feature implementation using Composition API.
- →Enforce TypeScript-first patterns with generics.
- →Utilize `defineModel` for two-way data binding.
- →Implement user-behavior tests with Testing Library.
- →Guide proper patterns before writing code.
How it works
The skill provides guidance on modern Vue 3 development, emphasizing TypeScript, Composition API, `defineModel` for bindings, and Testing Library for user-behavior tests, while highlighting anti-patterns to avoid.
Inputs & outputs
When to use vue
- →Planning Vue 3 components
- →Structuring composition API logic
- →Enforcing type safety
- →Implementing behavior tests
About this skill
Vue Development
Overview
Modern Vue 3 development with TypeScript, Composition API, and user-behavior testing. Core principle: Use TypeScript generics (not runtime validation), modern APIs (defineModel not manual props), and test user behavior (not implementation details).
Red Flags - STOP and Fix
If you catch yourself thinking or doing ANY of these, STOP:
- "For speed" / "quick demo" / "emergency" → Using shortcuts
- "We can clean it up later" → Accepting poor patterns
- "TypeScript is too verbose" → Skipping types
- "This is production-ready" → Without type safety
- "Following existing code style" → When existing code uses legacy patterns
- "Task explicitly stated..." → Following bad requirements literally
- Manual
modelValueprop +update:modelValueemit → Use defineModel() - "Component that takes value and emits changes" → Use defineModel(), NOT manual props/emit
- Using runtime prop validation when TypeScript is available
- Array syntax for emits:
defineEmits(['event'])→ Missing type safety setTimeout()in tests → Use proper async utilities- Testing
wrapper.vm.*internal state → Test user-visible behavior - Generic route params
[id]→ Use explicit[userId],[postSlug] - Composables calling
showToast(),alert(), or modals → Expose error state, component handles UI
All of these mean: Use the modern pattern. No exceptions.
Quick Rules
Components: defineProps<{ }>(), defineEmits<{ event: [args] }>(), defineModel<type>() for v-model. See @references/component-patterns.md
Composables: START INLINE for component-specific logic, extract to external file when reused. External composables: prefix use, NO UI logic (expose error state instead). See @references/composable-patterns.md
Key Pattern: defineModel()
The most important pattern to remember - use for ALL two-way binding:
<script setup lang="ts">
// ✅ For simple v-model
const value = defineModel<string>({ required: true })
// ✅ For multiple v-models
const firstName = defineModel<string>('firstName')
const lastName = defineModel<string>('lastName')
</script>
<template>
<input v-model="value" />
<!-- Parent uses: <Component v-model="data" /> -->
</template>
Why: Reduces 5 lines of boilerplate to 1. No manual modelValue prop + update:modelValue emit.
Component Implementation Workflow
When implementing complex Vue components, use TodoWrite to track progress:
TodoWrite checklist for component implementation:
- [ ] Define TypeScript interfaces for props/emits/models
- [ ] Implement props with defineProps<{ }>()
- [ ] Implement emits with defineEmits<{ event: [args] }>()
- [ ] Add v-model with defineModel<type>() if needed
- [ ] Verify: No red flags, no setTimeout in tests, all types present
When to create TodoWrite todos:
- Implementing new components with state, v-model
- Refactoring components to modern patterns
- Adding routing with typed params
- Creating composables with async logic
Rationalizations Table
| Excuse | Reality |
|---|---|
| "For speed/emergency/no time" | Correct patterns take SAME time. TypeScript IS fast. |
| "TypeScript is too verbose" | defineProps<{ count: number }>() is LESS code. |
| "We can clean it up later" | Write it right the first time. |
| "This is production-ready" | Without type safety, it's not production-ready. |
| "Simple array syntax is fine" | Missing types = runtime errors TypeScript would catch. |
| "Manual modelValue was correct" | That was Vue 2. Use defineModel() in Vue 3.4+. |
| "Tests are flaky, add timeout" | Timeouts mask bugs. Use proper async handling. |
| "Following existing code style" | Legacy code exists. Use modern patterns to improve. |
| "Task explicitly stated X" | Understand INTENT. Bad requirements need good implementation. |
| "Composables can show toasts" | UI belongs in components. Expose error state. |
| "[id] is industry standard" | Explicit names prevent bugs, enable TypeScript autocomplete. |
| "counter.ts is fine" | Must prefix with 'use': use-counter.ts |
| "test-utils is the standard" | Testing Library is gold standard for user-behavior. |
Detailed References
See @references/ directory for comprehensive guides: component-patterns.md, composable-patterns.md
When NOT to Use This Skill
- Vue 2 projects (different API)
- Options API codebases (this is Composition API focused)
- Projects without TypeScript (though you should add it)
Real-World Impact
Baseline: 37.5% correct patterns under pressure With skill: 100% correct patterns under pressure
Type safety prevents runtime errors. defineModel() reduces boilerplate. Testing Library catches real user issues.
When not to use it
- →Vue 2 projects (different API).
- →Options API codebases (this is Composition API focused).
- →Projects without TypeScript (though you should add it).
Limitations
- →Focuses on Composition API, not Options API.
- →Requires TypeScript for full benefit.
- →Does not apply to Vue 2 projects.
How it compares
This skill enforces modern Vue 3 patterns and TypeScript-first development, guiding away from legacy approaches and ensuring type safety and user-behavior focused testing, unlike developing without specific pattern enforcement.
Compared to similar skills
vue side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| vue (this skill) | 0 | — | No flags | Intermediate |
| vue-testing-best-practices | 5 | 6mo | No flags | Intermediate |
| comprehensive-testing-verification | 1 | 7mo | No flags | Intermediate |
| vue | 0 | 5mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
vue-testing-best-practices
vuejs-ai
Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.
comprehensive-testing-verification
ananddtyagi
MASTER Vue.js application testing with strict enforcement of verification protocols. Systematically test functionality with Playwright, validate bug fixes, verify features work, and enforce zero-tolerance policies for false success claims. MANDATORY testing with visual evidence before any deployment or functionality claims.
vue
valibali
Use when editing .vue files, creating Vue 3 components, writing composables, or testing Vue code - provides Composition API patterns, props/emits best practices, VueUse integration, and reactive destructuring guidance
vue-best-practices
antfu
MUST be used for Vue.js tasks. Strongly recommends Composition API with `<script setup>` and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.
vue-debug-guides
vuejs-ai
Vue 3 debugging and error handling for runtime errors, warnings, async failures, and SSR/hydration issues. Use when diagnosing or fixing Vue issues.
vue-router-best-practices
antfu
Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.