vue
Show how to use custom elements in Vue, including required configuration for the Vue compiler
Install / Use
npx skills add bennypowers/cem --skill vueInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of vue
vue scores 76/100 on our quality scale, 3674th of 4,617 Development & Engineering skills we index.
Its SKILL.md is 6.7 KB long, well organised into 18 sections with 16 code examples: a thorough specification that gives an agent plenty to work with.
It has no GitHub stars yet, so there is no community track record; judge it on its content.
Maintenance, license and trust
- The repository was last updated 3 days ago, so vue is actively maintained.
- Our last check on 2026-09-26 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 80/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
vue compared with similar skills
All 4 of these similar skills score higher than vue; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| vue (this skill)by bennypowers | 76 | 0 | 3d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 110.6k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 69.8k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 46.6k | 2d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 44d ago | SKILL.md |
Frequently asked questions
- How do I install vue?
- Run
npx skills add bennypowers/cem --skill vue. The install tabs above show the steps for each supported agent. - Which AI agents does vue work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is vue safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 80/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is vue still maintained?
- The repository was last updated 3 days ago, so vue is actively maintained.
Skill content
View source on GitHubname: vue description: Show how to use custom elements in Vue, including required configuration for the Vue compiler. Use when the user asks to "use in Vue", "Vue custom elements", "custom elements in Vue", "isCustomElement", or mentions "Vue 3", "Vue 2", "Nuxt", or "vue integration". tools: Read, Glob, Grep
Custom Elements in Vue
Generate framework-specific guidance for using custom elements in Vue, including required compiler configuration.
Workflow
Phase 1: Detect Vue Version and Build Setup
Search the project for Vue version and tooling:
- Check
package.jsonforvueversion (2.x vs 3.x) - Check for build tool: Vite (
vite.config), Vue CLI (vue.config), Nuxt (nuxt.config), or webpack - Check for TypeScript usage
- Check for existing custom element configuration
Phase 2: Gather Element Data
Read the target element(s):
cem://element/{tagName}
cem://element/{tagName}/attributes
cem://element/{tagName}/events
cem://element/{tagName}/slots
Understand which features need framework-specific handling:
- Attributes vs properties: Vue can bind either with different syntax
- Events: Vue's
v-on/@syntax works with custom events - Slots: Vue slots and web component slots interact
- v-model: May need custom setup for two-way binding
Phase 3: Required Configuration
Vue 3 + Vite
// vite.config.ts
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [
vue({
template: {
compilerOptions: {
// Tell Vue to treat tags with a dash as custom elements
isCustomElement: (tag) => tag.includes('-'),
},
},
}),
],
});
If the project only uses elements from specific libraries, be more specific:
isCustomElement: (tag) => tag.startsWith('my-') || tag.startsWith('prefix-'),
Vue 3 + Vue CLI (webpack)
// vue.config.js
module.exports = {
chainWebpack: (config) => {
config.module
.rule('vue')
.use('vue-loader')
.tap((options) => ({
...options,
compilerOptions: {
isCustomElement: (tag) => tag.includes('-'),
},
}));
},
};
Nuxt 3
// nuxt.config.ts
export default defineNuxtConfig({
vue: {
compilerOptions: {
isCustomElement: (tag) => tag.includes('-'),
},
},
});
Vue 2
Vue 2 uses Vue.config.ignoredElements:
// main.js
Vue.config.ignoredElements = [
'my-element',
/^prefix-/, // regex for all elements with a prefix
];
Note: Vue 2 reached end-of-life on December 31, 2023. Consider migrating to Vue 3.
Phase 4: Generate Integration Code
Basic Usage
<template>
<my-element
variant="primary"
:disabled="isDisabled"
@my-event="handleEvent"
>
Default slot content
</my-element>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import 'my-element-library';
const isDisabled = ref(false);
function handleEvent(e: CustomEvent) {
console.log(e.detail);
}
</script>
Attribute vs Property Binding
<template>
<!-- Attribute binding (string coercion) -->
<my-element variant="primary" />
<!-- Property binding (passes JS values directly) -->
<my-element :complex-data="myObject" />
<!-- or explicitly with .prop modifier -->
<my-element :complex-data.prop="myObject" />
<!-- Boolean attribute -->
<my-element :disabled="true" />
<!-- or just present for true -->
<my-element disabled />
</template>
Vue 3 passes :bound values as properties if the element has a matching property, and as attributes otherwise. Use the .prop modifier to force property binding.
In Vue 2, use the .prop modifier explicitly:
<my-element :complex-data.prop="myObject" />
Event Handling
Vue's @ / v-on works with custom element events:
<template>
<!-- kebab-case event names work directly -->
<my-element @my-event="handleMyEvent" />
<!-- Access event detail -->
<my-element @change="(e) => value = e.detail.value" />
</template>
Note: Vue converts @myEvent to listen for my-event (camelCase to kebab-case). If the custom element fires a camelCase event name, use the explicit form:
<my-element v-on:myEvent="handler" />
Slots
Web component slots and Vue slots coexist but work differently:
Important: Do not use Vue's v-slot / #slotname syntax for web component slots. Use the native HTML slot="name" attribute instead.
<template>
<my-element>
<!-- Default slot -->
<span>Content goes to the default slot</span>
<!-- Named slots — use the native HTML slot attribute -->
<span slot="header">This goes to the web component's header slot</span>
<span slot="footer">This goes to the web component's footer slot</span>
</my-element>
</template>
v-model
Custom elements don't support v-model out of the box. Wire it up manually:
<template>
<my-input
:value="inputValue"
@input="inputValue = $event.detail.value"
/>
</template>
Or create a composable for reusable v-model binding:
function useCustomElementModel(eventName = 'input', detailKey = 'value') {
return {
modelValue: (props: any) => props.modelValue,
listener: (emit: any) => (e: CustomEvent) => emit('update:modelValue', e.detail[detailKey]),
};
}
TypeScript
Add type declarations for custom elements in Vue templates:
// custom-elements.d.ts
declare module 'vue' {
interface GlobalComponents {
'my-element': import('my-element-library').MyElement;
}
}
For more detailed type checking, use the element's type with Vue's HTMLAttributes:
declare module 'vue' {
interface GlobalComponents {
'my-element': DefineComponent<{
variant?: 'primary' | 'secondary';
disabled?: boolean;
}>;
}
}
Phase 5: Output
Present the integration with:
- Required config appropriate to the project's build tool
- Usage examples for each element the user asked about
- Property binding for complex (non-string) properties
- Event handling for each event in the manifest
- Slot usage with the correct native
slotattribute (not Vuev-slot) - TypeScript declarations if the project uses TypeScript
Guidelines
- Always include the
isCustomElementconfig: Without it, Vue warns about unresolved components - Use native
slotattribute, notv-slot: This is the most common mistake when using web components in Vue - Prefer
:propbinding for non-strings: Vue's property binding passes values correctly to custom elements - Check for Nuxt: Nuxt has its own config location for compiler options
- Note Vue 2 EOL: If the project uses Vue 2, mention the EOL status but still provide working guidance
Related Skills
taste-skill
110.6kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
69.8kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
46.6kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
