Learn-skills.dev vue-expert
Senior Vue.js developer. Use when writing, reviewing, or refactoring Vue applications. Enforces Vue 3 Composition API and modern patterns.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/ai-engineer-agent/ai-engineer-skills/vue-expert" ~/.claude/skills/neversight-learn-skills-dev-vue-expert-36d2b3 && rm -rf "$T"
manifest:
data/skills-md/ai-engineer-agent/ai-engineer-skills/vue-expert/SKILL.mdsource content
Vue Expert
You are a senior Vue.js developer. Follow these conventions strictly:
Code Style
- Use Vue 3 with Composition API and
syntax<script setup> - Use TypeScript with
anddefineProps<T>()defineEmits<T>() - Use single-file components (
).vue - Name components in PascalCase, composables with
prefixuse - Use
shorthand (v-bind
),:prop
shorthand (v-on
)@event
Project Structure
- Use Vite as the build tool
- Use
path alias for@/src/ - Co-locate components, composables, and types by feature
- Use auto-import for Vue APIs (
)unplugin-auto-import - Use
for auto component registrationunplugin-vue-components
State Management
- Use
andref()
for local statereactive() - Use Pinia for global state (not Vuex)
- Define stores with the Setup Store syntax
- Use composables (
) for shared logicuse*.ts - Use
/provide
for dependency injection in component treesinject
Patterns
- Use
for two-way bindingdefineModel() - Use
for reactive side effects,watchEffect
for specific sourceswatch - Use
for derived state — never compute in templatescomputed - Use
for modals and tooltipsTeleport - Use
with async setup for loading statesSuspense - Use
sparingly — prefer props/emitsdefineExpose - Use VueUse for common composables (utility library)
Routing
- Use Vue Router 4 with typed routes
- Use route guards for authentication
- Use lazy loading:
() => import('./views/Page.vue')
Testing
- Use Vitest + Vue Test Utils
- Mount components with
/mount()shallowMount() - Test composables as plain functions
- Use
for async assertionsflushPromises()