From mk
Provides opinionated Vue 3 patterns for Composition API, Pinia, Pinia Colada, file-based routing, and performance. Quick reference for everyday Vue development.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mk:vueWhen to use
Use when writing/reviewing/refactoring Vue 3 (components, composables, reactivity, Pinia, Pinia Colada, routing). Auto-activates on .vue files. NOT for deep best-practices review/recommendations or the ordered best-practices workflow (see mk:vue-best-practices), generic TypeScript (see mk:typescript), React (see mk:react-patterns), or Angular (see mk:angular).
This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Opinionated Vue 3 patterns — Composition API + `<script setup lang="ts">`, Pinia, Pinia
references/advanced-patterns.mdreferences/components.mdreferences/composables.mdreferences/core-new-apis.mdreferences/pinia-colada-advanced.mdreferences/pinia-colada-cache.mdreferences/pinia-colada-plugins.mdreferences/pinia-colada.mdreferences/project-standards.mdreferences/reactivity-performance.mdreferences/routing-pages.mdreferences/script-setup-macros.mdreferences/state-pinia.mdOpinionated Vue 3 patterns — Composition API + <script setup lang="ts">, Pinia, Pinia
Colada, file-based routing, and performance. Single entrypoint routing to focused references.
Use
npx chub search vuefor relevant documentation packages within the Context Hub.
Auto-activate on: .vue files, Vue 3 Composition API, <script setup>, Pinia stores,
Pinia Colada queries/mutations, Vue Router file-based routes, composables.
Explicit: /mk:vue [concern]
Deep best practices: for a thorough best-practices review/recommendations pass or the
full ordered workflow — built-in components (Teleport/Suspense/KeepAlive/Transition),
animation techniques, optional features, and the performance pass — use mk:vue-best-practices.
This skill stays the everyday quick-reference.
Do NOT invoke for: deep best-practices review/workflow (use mk:vue-best-practices),
TypeScript fundamentals (use mk:typescript), React (use mk:react-patterns), Angular (use
mk:angular), visual design (use mk:frontend-design), testing (use mk:testing / mk:qa;
Vue test design/review → mk:vue-testing-best-practices).
Distilled from the rulekit standards. These are non-negotiable defaults; everything else is in the references.
<script setup lang="ts"> only — never Options API, never defineComponent() wrapper.type over interface for defining object/prop shapes; keep types alongside the code.export default.UserProfile in
user-profile.vue); composables are camelCase with use prefix (useAuth).SearchButtonClear.vue, not ClearSearchButton.vue.ref() for primitives, reactive() only for complex objects; computed() for derived state.v-html with user-provided content — XSS vector (see mk: security rules).When the project depends on @pinia/colada, it is the preferred async/data-fetching layer
— see references/pinia-colada.md. Otherwise use plain Pinia stores + composables for state.
Pinia stores hold global UI/app state; data fetching belongs in Pinia Colada when present.
Read one level deep from this file. Read multiple when a task spans topics.
| Task involves | Read |
|---|---|
Components, props/emits, slots, defineModel, naming, templates | references/components.md |
Composables (use*), shared reactive logic | references/composables.md |
ref/reactive/computed/watch, toRefs, performance | references/reactivity-performance.md |
Global state with Pinia setup stores, storeToRefs | references/state-pinia.md |
Pinia Colada core: keys, defineQueryOptions, useQuery, mutations | references/pinia-colada.md |
| Optimistic updates, infinite/paginated queries, SSR, cancellation | references/pinia-colada-advanced.md |
| Pinia Colada plugins (retry, delay, auto-refetch, persister, hooks) | references/pinia-colada-plugins.md |
Direct cache access: getQueryData/setQueryData/invalidateQueries | references/pinia-colada-cache.md |
File-based routing, route groups, params, definePage, typed router | references/routing-pages.md |
| Project stack, structure, commands, conventions, docs research | references/project-standards.md |
3.4/3.5 core APIs: useId, nextTick, flush timing, watch once/deep, onWatcherCleanup | references/core-new-apis.md |
<script setup> compiler macros — defineOptions, withDefaults, generic components | references/script-setup-macros.md |
Advanced reactivity: effectScope, customRef, triggerRef, markRaw, shallowReadonly | references/advanced-patterns.md |
reactive() loses reactivity — const { count } = reactive({ count: 0 })
makes count a plain number; keep the reactive object intact, or use toRefs(), or ref().storeToRefs() required when destructuring Pinia state — const { user } = useAuthStore()
gives a non-reactive snapshot; use const { user } = storeToRefs(useAuthStore()). Methods
are destructured directly from the store (not through storeToRefs).ref access needs defineExpose() — childRef.value.method() returns undefined
unless the child <script setup> explicitly defineExpose({ method }).:slotted() not :deep() for slotted content — slot content comes from the parent
scope, so :deep(.child-class) in a scoped style block does not match it; use :slotted(.child-class).watchEffect cleanup race on fast re-renders — register cleanup to cancel async work:
watchEffect((onCleanup) => { onCleanup(() => controller.abort()) }), or a fast prop change
starts a second effect before the first resolves and writes stale state.useMyStore() outside a component setup context
(e.g. a top-level module) creates an instance disconnected from the SSR app; call stores inside
setup() or pass the pinia instance explicitly: useMyStore(pinia).key: () => [...] so the key
re-evaluates reactively; a plain array snapshot never updates.refresh() over refetch() — refresh() reuses in-flight requests and respects
staleTime; refetch() always forces a new fetch.index.vue route files — use a named group like pages/(home).vue for a meaningful
route name.userId not id, postSlug not slug, for type-safe,
self-documenting routes.const { count } = defineProps() stays reactive
in templates, but watch(count, ...) watches a snapshot; use watch(() => count, ...)
(references/core-new-apis.md).onWatcherCleanup() must be called synchronously — invoking it after an await throws, since
the active-watcher context is gone; use the onCleanup callback param for post-await cancellation
(references/core-new-apis.md).| Don't | Do Instead |
|---|---|
Options API (data(), methods:) | Composition API <script setup> |
this.$store / Vuex | Pinia with setup store syntax |
| Direct store state destructuring | storeToRefs(useMyStore()) |
v-html with dynamic content | v-text or sanitized rendering |
reactive() for primitives | ref() for primitives |
| Watchers when computed works | computed() for derived state |
| Global event bus | provide/inject or Pinia |
defineComponent() wrapper | <script setup> directly |
Auto-activates during Build when a Vue project is detected (.vue files, vue in
package.json). Loaded by the developer agent alongside mk:typescript.
npx claudepluginhub ngocsangyem/meowkit --plugin mkDelivers Vue 3 best practices for Composition API script setup, composables, ref/reactive patterns, Pinia state management, and Nuxt apps. Activates on .vue files and Vue triggers.
Guides Vue.js 3 Composition API patterns, component architecture, reactivity, Pinia state management, Vue Router, and Nuxt SSR. Activates for Vue, Nuxt, Vite, or Pinia projects.
Deep Vue 3 best-practices review and ordered authoring workflow covering built-in components, animations, slots, directives, render functions, plugins, and performance.