From harness-claude
Creates custom Vue directives for reusable DOM-level behaviors like auto-focus, click-outside, intersection observer, and tooltips.
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-claude:vue-directive-patternThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Create custom Vue directives for low-level DOM manipulation and reusable DOM behavior
Create custom Vue directives for low-level DOM manipulation and reusable DOM behavior
mounted, updated, unmounted).app.directive('name', directiveObj) or locally in <script setup> with vName convention.// v-focus directive — auto-focuses an input on mount
const vFocus = {
mounted(el: HTMLElement) {
el.focus();
},
};
// Usage in template: <input v-focus />
unmounted hook to prevent memory leaks.binding.value to pass dynamic data: <div v-tooltip="'Hello'">.Custom directives give you low-level access to DOM elements. They run at specific lifecycle points (created, beforeMount, mounted, beforeUpdate, updated, beforeUnmount, unmounted) and receive the element and binding information. Vue's built-in directives (v-if, v-show, v-model) are implemented the same way.
Trade-offs:
When NOT to use:
onMountedhttps://patterns.dev/vue/directive-pattern
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeVue 3 conventions, Composition API patterns, SFC structure, reactivity, composables, and TypeScript integration. Invoke whenever task involves any interaction with Vue code — writing, reviewing, refactoring, debugging, or understanding .vue files, composables, and Vue component architecture.
Provides patterns for Vue components including props validation with TypeScript, defaults, emits, slots, and provide/inject. Use when building reusable Vue components.
Builds Vue components with the Composition API, reactivity system (ref, reactive, computed, watch), and TypeScript. Activates when working on .vue files or Vue-specific patterns.