# Vue3 composition

> Vue3 composition is an open-source agent skill for developer tools. Guides an agent to write Vue 3 components and composables with the Composition API. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/pstuart/pstuart/tree/main/plugins/nuxt-modern-dev/skills/vue3-composition
- **Repository:** https://github.com/pstuart/pstuart
- **GitHub stars:** 20
- **License:** MIT
- **Skill name:** vue3-composition
- **Collection:** https://github.com/pstuart/pstuart
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill sets Vue 3 Composition API with script setup and TypeScript as the default style for new components. It lays out a decision flow for choosing between a reusable composable, provide and inject with typed keys, or local ref and reactive state inside a component.

The instructions also list reactivity pitfalls to avoid, such as losing reactivity when destructuring props without toRefs or storeToRefs, and prefer a ref over reactive for state that gets reassigned. It includes a short checklist the agent can run through before finishing: script setup with TypeScript, no prop mutation, composables returning a named object, and no Options API in new files.

It points to companion skills for Nuxt data fetching and Tailwind CSS styling. The skill is a single SKILL.md with no scripts, and it expects the agent to confirm the exact Vue version from the repository lockfile.

## When your agent uses it

> Use when writing Vue 3 components or composables, choosing Options vs Composition API, handling reactivity, provide/inject, or script setup patterns.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/pstuart/pstuart/tree/HEAD/plugins/nuxt-modern-dev/skills/vue3-composition)
- [License: MIT](https://github.com/pstuart/pstuart/tree/HEAD/plugins/nuxt-modern-dev/skills/vue3-composition)

## Features

- **Script setup defaults:** Standard component layout using script setup with TypeScript, typed props and emits.
- **Composable conventions:** Naming and return-shape rules for reusable stateful logic in useXxx files.
- **Dependency injection guidance:** When to use provide and inject with typed keys instead of passing props.
- **Reactivity pitfalls:** Common mistakes with destructured props, reactive reassignment and async setup.
- **API style decision:** Rules for choosing Composition API over Options API in new code.
- **Pre-finish checklist:** A short review list covering props, composables and API style.

## Good for

- Write a new Vue 3 component in TypeScript with typed props
- Extract shared stateful logic into a composable
- Share state across a component tree with provide and inject
- Fix a reactivity bug caused by destructuring props
- Review a component for prop mutation or Options API usage

## Install

### Claude Code

This skill ships in the `nuxt-modern-dev` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add pstuart/pstuart
/plugin install nuxt-modern-dev@pstuart
```

Or copy only this skill to `~/.claude/skills/vue3-composition`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/vue3-composition &&
cp -R "$tmp/plugins/nuxt-modern-dev/skills/vue3-composition" ~/.claude/skills/vue3-composition &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/vue3-composition` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/vue3-composition` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/vue3-composition &&
cp -R "$tmp/plugins/nuxt-modern-dev/skills/vue3-composition" ~/.agents/skills/vue3-composition &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/vue3-composition` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/vue3-composition` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/vue3-composition &&
cp -R "$tmp/plugins/nuxt-modern-dev/skills/vue3-composition" ~/.cursor/skills/vue3-composition &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/vue3-composition` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/pstuart/pstuart.git --path plugins/nuxt-modern-dev/skills/vue3-composition
```

Or copy the folder to `~/.gemini/skills/vue3-composition` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/vue3-composition`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/vue3-composition &&
cp -R "$tmp/plugins/nuxt-modern-dev/skills/vue3-composition" ~/.copilot/skills/vue3-composition &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/vue3-composition` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/pstuart/pstuart.git
```

Then copy `pstuart/plugins/nuxt-modern-dev/skills/vue3-composition` into your agent's skills folder as `vue3-composition`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Vue3 composition trigger?

It is meant for writing Vue 3 components or composables, choosing between Options and Composition API, handling reactivity, provide and inject, or script setup patterns.

### Which Vue version does Vue3 composition target?

It sets Vue 3 Composition API as the baseline and tells the agent to confirm the exact version from the repository lockfile.

### Does Vue3 composition cover Nuxt data fetching?

No. For useFetch and useAsyncData it points to a separate nuxt4-frontend skill, and for styling to a tailwindcss4 skill.

### How do I install Vue3 composition in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/vue3-composition to use it in all your projects, or to .claude/skills/vue3-composition in one project. Or install the nuxt-modern-dev plugin, which includes it: /plugin marketplace add pstuart/pstuart, then /plugin install nuxt-modern-dev@pstuart.

### Does Vue3 composition run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Vue3 composition?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Vue3 composition?

The closest alternatives to Vue3 composition are Vue, Vue clean components, Nuxt4 frontend, Vue UI and Vue data.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Vue](https://ai-powered.com/skills/vue): Vue is an open-source agent skill for developer tools.
- [Vue clean components](https://ai-powered.com/skills/vue-clean-components): Vue clean components is an open-source agent skill for developer tools.
- [Nuxt4 frontend](https://ai-powered.com/skills/nuxt4-frontend): Nuxt4 frontend is an open-source agent skill for developer tools.
- [Vue UI](https://ai-powered.com/skills/vue-ui): Vue UI is an open-source agent skill for developer tools.
- [Vue data](https://ai-powered.com/skills/vue-data): Vue data is an open-source agent skill for developer tools.
- [TypeScript strict](https://ai-powered.com/skills/typescript-strict): TypeScript strict is an open-source agent skill for developer tools.
- [Nuxt](https://ai-powered.com/skills/nuxt): Nuxt is an open-source agent skill for developer tools.
- [React frontend](https://ai-powered.com/skills/react-frontend): React frontend is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/vue3-composition
