
unhead-vue-skilld
Full-stack manager for Vue (@unhead/vue 3.x). Use when writing, reviewing, or debugging code that imports @unhead/vue, calls useHead, useSeoMeta, useHeadSafe, useScript, injectHead, createHead, or sets up Unhead SSR / streaming SSR / build plugins in a Vue app.
- Installs
- 105
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/skilld-dev/vue-ecosystem-skills --skill unhead-vue-skilld- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads unhead-vue-skilld automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
@unhead/vue 3.4.1
Full-stack <head> management for Vue 3. ESM only ("type": "module"), no CJS.
Peer deps: vue >= 3.5.18; optional vite >= 6.4.2, webpack >= 5.0.0 (source: package.json:138-150).
Vue 2: not supported; use @unhead/vue@^1.
Nuxt: Unhead is integrated already; do not install or set it up manually.
Setup (mandatory)
Install @unhead/vue, create the head instance, and register it as a Vue plugin. createHead comes from a subpath export, not the package root.
// entry-client.ts (SPA or hydration)
import { createHead } from '@unhead/vue/client'
import { createApp } from './main'
const { app } = createApp()
const head = createHead()
app.use(head)
app.mount('#app')
// entry-server.ts (SSR)
import { createHead } from '@unhead/vue/server'
import { renderToString } from 'vue/server-renderer'
import { createApp } from './main'
export async function render(url: string) {
const { app } = createApp()
const head = createHead()
app.use(head)
const html = await renderToString(app)
return { html, head } // render tags later with transformHtmlTemplate(head, template)
}
Full SSR template wiring, streaming SSR, Options API, and auto-imports: references/setup.md.
Composables
All imported from @unhead/vue root and used inside setup():
<script setup lang="ts">
import { useHead, useSeoMeta } from '@unhead/vue'
useHead({
title: () => `${user.value.name} - Profile`, // getters, refs, computed all reactive
titleTemplate: '%s | My Site',
meta: [{ name: 'description', content: () => description.value }],
})
useSeoMeta({ // flat, type-safe keys; og/twitter handled automatically
ogTitle: 'My Page',
ogImage: 'https://example.com/image.jpg',
})
</script>
// Third-party scripts
import { useScript } from '@unhead/vue'
const { proxy, onLoaded, status } = useScript(
{ src: 'https://example.com/analytics.js' },
{ use: () => window.analytics, trigger: 'client' },
)
proxy.track('pageview') // queued until the script loads
Details, options tables, and recipes: references/composables.md.
Critical rules
- Async context: calling
useHead()after anawaitinsideonMounted()/watchers throwsuseHead() was called without provide context. Fix, in order of preference: top-levelawaitin<script setup>; declareuseHead()once with refs/computed and update the ref later; captureconst head = injectHead()at setup time and passuseHead(input, { head }). Source: https://unhead.unjs.io/docs/vue/head/guides/core-concepts/reactivity-and-context - Never call
useHead()inside a watcher callback: each call pushes a new entry and duplicates tags. Pass the reactive value into oneuseHead()call instead. - Deduplication key is
key, nothid/vmid:meta: [{ key: 'description', name: 'description', content: '...' }]. - Inline content:
innerHTML(waschildrenin v1); body scripts usetagPosition: 'bodyClose'(wasbody: true). - Untrusted input: use
useHeadSafe(); it whitelists attributes and strips scripts/handlers. - Head instance access in Vue: use
injectHead()from@unhead/vue, notgetActiveHead()fromunhead; only the former binds to component context (e.g.onServerPrefetch).
Deprecated in 3.4.1 (present but slated for removal)
| Export | Status | Replacement |
|---|---|---|
useServerHead, useServerHeadSafe, useServerSeoMeta | deprecated (dist/index.d.ts:26-30) | useHead / useHeadSafe / useSeoMeta |
@unhead/vue/legacy (createHead, createServerHead, legacyPlugins) | deprecated, removed in v4 (dist/legacy.d.ts:14-30) | @unhead/vue/client / @unhead/vue/server |
resolveUnrefHeadInput | deprecated (dist/utils.d.ts:9) | resolveTags(head) from unhead/utils |
unheadVuePlugin from @unhead/vue/stream/vite | deprecated (dist/stream/vite.d.ts:8) | Unhead({ streaming: true }).vite() from @unhead/vue/bundler |
MergeHead type | deprecated (dist/types.d.ts:66) | generics on VueHeadClient |
Removed in v3 (will not compile): DeprecationsPlugin, setHeadInjectionHandler, createHeadCore, { mode: 'server' | 'client' } entry option, init/dom:renderTag/dom:rendered hooks, headEntries() (use [...head.entries.values()]).
Migration details: references/migration.md.
Export map
| Subpath | Purpose |
|---|---|
@unhead/vue | composables: useHead, useSeoMeta, useHeadSafe, useScript, injectHead, VueHeadMixin, unheadVueComposablesImports, createUnhead, defineLink, defineScript |
@unhead/vue/client | createHead() (SPA/hydration), renderDOMHead, VueHeadMixin |
@unhead/vue/server | createHead() (SSR), renderSSRHead, transformHtmlTemplate, propsToString |
@unhead/vue/components | <Head> component |
@unhead/vue/plugins | re-exports unhead/plugins (TemplateParamsPlugin, AliasSortingPlugin, PromisePlugin, InferSeoMetaPlugin, ValidatePlugin, ...) |
@unhead/vue/bundler | unified build plugin Unhead() for vite/webpack/rspack/rollup |
@unhead/vue/vite | Vite-only Unhead(); prefer /bundler |
@unhead/vue/stream/server, /stream/client | createStreamableHead() for streaming SSR |
@unhead/vue/types, /utils, /scripts, /legacy | types, utilities, script types, legacy shims |
Signatures and full type surface: references/api-surface.md.
Optional plugins at creation
Template params (%s, %separator), alias sorting (before:/after:), and Promise inputs are opt-in since v2:
import { createHead } from '@unhead/vue/client'
import { AliasSortingPlugin, TemplateParamsPlugin } from '@unhead/vue/plugins'
const head = createHead({ plugins: [TemplateParamsPlugin, AliasSortingPlugin] })
Without TemplateParamsPlugin, %siteName placeholders render literally.
Build plugin (recommended for standalone Vue apps)
// vite.config.ts
import { Unhead } from '@unhead/vue/bundler'
export default defineConfig({
plugins: [vue(), Unhead()], // add { streaming: true } for streaming SSR
})
Tree-shakes server-only composables from the client bundle, converts useSeoMeta() to useHead() (~3kb), injects ValidatePlugin in dev. Options table and webpack notes: references/build-plugins.md.
Common mistakes
- Importing
createHeadfrom@unhead/vueroot (removed in v2): use/clientor/server. - Awaiting
renderSSRHead/renderDOMHead: both are synchronous in v3. useScript()return is not a Promise: useonLoaded(() => ...); call APIs through.proxy.- Meta tags require
content:{ name: 'description', content: null }removes the tag. - Font preloads require
crossorigin:{ rel: 'preload', as: 'font', href: '/f.woff2', crossorigin: 'anonymous' }.
References
- references/setup.md — SPA, SSR, streaming SSR, Options API,
<Head>component, auto-imports, defaults - references/composables.md —
useHead,useSeoMeta,useHeadSafe,useScriptusage and options - references/api-surface.md — export map, types, instance API
- references/build-plugins.md —
Unhead()bundler plugin and streaming - references/migration.md — v2 and v3 breaking changes
FAQ
What does the unhead-vue-skilld skill do?
Full-stack manager for Vue (@unhead/vue 3.x). Use when writing, reviewing, or debugging code that imports @unhead/vue, calls useHead, useSeoMeta, useHeadSafe, useScript, injectHead, createHead, or sets up Unhead SSR / streaming SSR / build plugins in a Vue app.
How do I install unhead-vue-skilld?
Run npx skills add https://github.com/skilld-dev/vue-ecosystem-skills --skill unhead-vue-skilld in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/unhead-vue-skilld/ (personal) or .claude/skills/unhead-vue-skilld/ (project).
Which AI agents can use unhead-vue-skilld?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is unhead-vue-skilld safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains unhead-vue-skilld?
It is published by skilld-dev in skilld-dev/vue-ecosystem-skills. It has 105 recorded installs.
More from skilld-dev/vue-ecosystem-skills
quasar-skilld
skilld-dev/vue-ecosystem-skills
Build, configure, and debug apps with the Quasar framework (quasar npm package, v2.33.1). Use when writing, reviewing, or debugging code that imports "quasar" or "quasar/wrappers", configuring Quasar with Vite, Vitest, Storybook, UMD, or Quasar CLI, styling with Quasar Sass variables, or upgrading between Quasar v2 releases.
vue-i18n-skilld
skilld-dev/vue-ecosystem-skills
Open the skill to read its SKILL.md instructions.
vue-skilld
skilld-dev/vue-ecosystem-skills
Build, debug, and modernize UI with Vue 3.6. Use when editing .vue files, writing components or composables, or working with code that imports "vue". Covers script setup, reactivity, Vapor Mode, SSR, and version-specific API changes from 3.4 through 3.6.0-beta.17.
vuetify-skilld
skilld-dev/vue-ecosystem-skills
Vue Material Component Framework. Use when writing, debugging, or configuring code that imports vuetify v4.x. Covers createVuetify setup, components and labs, composables, theming, icons, dates and locale, styles and SASS variables, treeshaking, and v3 to v4 migration.
pinia-skilld
skilld-dev/vue-ecosystem-skills
Open the skill to read its SKILL.md instructions.
vue-router-skilld
skilld-dev/vue-ecosystem-skills
Open the skill to read its SKILL.md instructions.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.