Back to Vue.js

vue

Vue.jsVue 3Composition APIFrontendJavaScriptReactive ProgrammingComponent DevelopmentTesting
682🕒 2026-06-01Source ↗

Install this skill

npx skills add onmax/nuxt-skills

Works across Claude Code, Cursor, Codex, Copilot & Antigravity

This skill provides a modular reference framework for Vue 3 application development, emphasizing the Composition API and modern reactivity patterns. It organizes documentation into granular files to maintain low token consumption while providing specific syntax for components, composables, and testing. The skill acts as a technical navigator, helping agents apply correct TypeScript configurations, defineModel patterns, and Vitest testing practices without polluting the active context. By partitioning knowledge into distinct domains—such as client-side utilities or Vue Router typing—it ensures that architectural decisions remain consistent with Vue 3.5+ standards. It focuses on clean code structure, reactive state management, and lifecycle hook handling, preventing unnecessary imports while keeping the development environment focused on the immediate task. It is strictly optimized for standalone Vue applications, distinct from full-stack meta-framework requirements.

When to Use This Skill

  • Building reusable components with clear prop and emit interfaces
  • Abstracting logic into composables using VueUse patterns
  • Setting up unit tests for components with mocked router dependencies
  • Refactoring existing options API code to modern composition syntax

How to Invoke This Skill

Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:

  • how do I implement defineModel in my Vue component?
  • what is the standard pattern for a Vue composable?
  • guide me through testing a Vue component with Vitest
  • how should I structure my Provide/Inject with TypeScript?
  • explain Vue 3 reactive destructuring

Pro Tips

  • 💡Combine this skill with the `vueuse` skill when leveraging common utility composables to ensure optimal integration and pattern adherence.
  • 💡For server-side rendering (SSR) or file-based routing contexts, remember to switch to the `nuxt` skill to gain Nuxt-specific insights and prevent context clashes.
  • 💡Prioritize loading specific reference files (e.g., `references/composables.md`) based on your current task to minimize token usage and keep the AI's focus sharp.

What this skill does

  • Context-aware documentation loading for Vue components and composables
  • Standardized patterns for reactive destructuring and defineModel usage
  • TypeScript integration guidance for provide/inject and generic components
  • Test suite configuration using Vitest and @vue/test-utils
  • Typed route management for Vue Router

When not to use it

  • Server-side rendering logic or backend API route configuration
  • Styling UI components that require specific library-bound logic
  • General non-Vue web development or framework-agnostic TypeScript tasks

Example workflow

  1. Identify if the task involves UI, logic, or testing
  2. Load the corresponding reference file for the chosen domain
  3. Review the specific syntax patterns for props or lifecycle hooks
  4. Apply the code structure to your local .vue or .ts file
  5. Run the local test suite using the documented testing patterns

Prerequisites

  • Node.js environment
  • Vue 3.x project setup
  • TypeScript configuration

Pitfalls & limitations

  • !Loading multiple reference files simultaneously will deplete context limits
  • !Confusing Vue-specific utilities with Nuxt-specific auto-imports
  • !Over-engineering simple components by ignoring reactivity performance guidelines

FAQ

Should I use this for Nuxt projects?
No. Use the nuxt skill for Nuxt-specific patterns like file-based routing and server middleware to avoid conflicts.
Can I load all reference files at once?
Do not load all files. Only pull in the specific reference file needed for your current task to keep token usage efficient.
How does this handle reactivity performance?
The reference content follows Vue 3.5+ standards, favoring optimized array tracking and minimal reactivity overhead.
Is this suitable for testing Vue components?
Yes. It contains a dedicated section on configuring Vitest and @vue/test-utils for component and composable unit tests.

How it compares

Unlike generic web development prompts, this skill forces context-sensitive code patterns, preventing common Vue 3 anti-patterns and ensuring type safety in reactive state management.

Source & trust

682 stars🕒 Updated 2026-06-01
📄 Full skill instructions — original source: onmax/nuxt-skills
# Vue 3 Development

Reference for Vue 3 Composition API patterns, component architecture, and testing practices.

**Current stable:** Vue 3.5+ with enhanced reactivity performance (-56% memory, 10x faster array tracking), new SSR features, and improved developer experience.

## Overview

Progressive reference system for Vue 3 projects. Load only files relevant to current task to minimize context usage (~250 tokens base, 500-1500 per sub-file).

## When to Use

**Use this skill when:**

- Writing .vue components
- Creating composables (use* functions)
- Building client-side utilities
- Testing Vue components/composables

**Use nuxt skill instead for:**

- Server routes, API endpoints
- File-based routing, middleware
- Nuxt-specific patterns

**For styled UI components:** use nuxt-ui skill
**For headless accessible components:** use reka-ui skill
**For VueUse composables:** use vueuse skill

## Quick Reference

| Working on... | Load file |
| ------------------------ | -------------------------- |
| .vue in components/ | references/components.md |
| File in composables/ | references/composables.md |
| File in utils/ | references/utils-client.md |
| .spec.ts or .test.ts | references/testing.md |
| TypeScript patterns | references/typescript.md |
| Vue Router typing | references/router.md |

## Loading Files

**Load one file at a time based on file context:**

- Component work → [references/components.md](references/components.md)
- Composable work → [references/composables.md](references/composables.md)
- Utils work → [references/utils-client.md](references/utils-client.md)
- Testing → [references/testing.md](references/testing.md)
- TypeScript → [references/typescript.md](references/typescript.md)
- Vue Router → [references/router.md](references/router.md)

**DO NOT load all files at once** - wastes context on irrelevant patterns.

## Available Guidance

**[references/components.md](references/components.md)** - Props with reactive destructuring, emits patterns, defineModel for v-model, slots shorthand

**[references/composables.md](references/composables.md)** - Composition API structure, VueUse integration, lifecycle hooks, async patterns, reactivity gotchas

**[references/utils-client.md](references/utils-client.md)** - Pure functions, formatters, validators, transformers, when NOT to use utils

**[references/testing.md](references/testing.md)** - Vitest + @vue/test-utils, component testing, composable testing, router mocking

**[references/typescript.md](references/typescript.md)** - InjectionKey for provide/inject, vue-tsc strict templates, tsconfig settings, generic components

**[references/router.md](references/router.md)** - Route meta types, typed params with unplugin-vue-router, scroll behavior, navigation guards

## Examples

Working examples in resources/examples/:

- component-example.vue - Full component with all patterns
- composable-example.ts - Reusable composition function

How to Use This Skill Unit

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/skills/vue/
  3. Save the file as SKILL.md
  4. The agent will automatically discover the skill based on its description.

Option B: Global Installation (All Agents)

Save the file to these locations to make it available across all projects:

  • Claude Code: ~/.claude/skills/onmax/nuxt-skills/vue/SKILL.md
  • Cursor: ~/.cursor/skills/onmax/nuxt-skills/vue/SKILL.md
  • Antigravity: ~/.gemini/antigravity/skills/onmax/nuxt-skills/vue/SKILL.md

🚀 Install with CLI:
npx skills add onmax/nuxt-skills

Read the Master Guide: Mastering Agent Skills

Related Skill Units

Recommended Rules

View more rules

Recommended Workflows

View more workflows

Recommended MCP Servers

View more MCP servers

Take It Further

Maximize your productivity with these powerful resources

📋

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
📖

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide

How to use this Skill in Claude Code & Cursor

For Claude Code (CLI)

To use this skill in Claude Code, copy the rule content into your project's custom instructions or follow our Add-Skill CLI guide. This ensures Claude follows your standards during every code generation.

For Cursor & Windsurf

For Cursor or Windsurf, individual skills are best used in the "Rules for AI" section. This specific unit helps the agent avoid vue.js issues, leading to cleaner, more efficient code.

Why the skill format matters: the standardized Agent Skills format lets your AI agent load detailed instructions only when they are relevant, keeping your prompt clean while improving results.

Source & attribution

This skill is categorized under Vue.js and is published by Onmax, maintained in onmax/nuxt-skills.

← Browse All Agent Skills
Sponsored AI assistant. Recommendations may be paid.