vue-patterns

Validate Vue 3 projects against Composition API and TypeScript standards.

11|1|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/mindcockpit-ai/cognitive-core --skill vue-patterns-mindcockpit-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue-patterns
Source: https://github.com/mindcockpit-ai/cognitive-core/tree/main/skills/cellular/templates/vue
Command: npx skills add https://github.com/mindcockpit-ai/cognitive-core --skill vue-patterns-mindcockpit-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many Vue 3 codebases suffer from inconsistent use of the Composition API, missing TypeScript typings, and legacy anti‑patterns, leading to maintenance overhead and bugs.

Core Features & Use Cases

  • Composition API Enforcement: Guarantees every component uses <script setup> with proper TypeScript typings.
  • State Management Standards: Requires Pinia stores for global state and discourages Vuex.
  • Reactive Primitive Guidelines: Shows correct use of ref, reactive, computed, and watch.
  • Anti‑Pattern Catalog: Lists common pitfalls like Options API and missing keys, with alternatives.
  • Fitness Criteria: Provides measurable thresholds (e.g., 100% typed props) to assess compliance.
  • Use Case: A development team can run the skill on a new Vue 3 project to automatically evaluate adherence to best practices and receive a compliance report.

Quick Start

Ask the skill to scan your Vue 3 project and produce a patterns compliance checklist.

Frequently Asked Questions about vue-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check my Vue 3 project for Composition API anti-patterns?

To check Vue 3 projects for Composition API anti-patterns, validate the codebase against modern standards enforcing script setup, typed props, and correct reactive primitives. This generates a measurable compliance report identifying legacy patterns and missing TypeScript typings.

What are common Vue 3 anti-patterns when using Pinia and TypeScript?

Common Vue 3 anti-patterns include using the Options API instead of script setup, missing keys in component templates, and avoiding typed props. Replacing Vuex with Pinia stores for global state management is required to meet type-safe state management standards.

Does this Vue 3 patterns validation work with legacy Vuex state management?

Vue 3 patterns validation does not work with legacy Vuex state management. It requires Pinia stores for global state management to enforce type-safe code, actively discouraging Vuex to ensure compliance with modern Composition API and TypeScript standards.

How do I enforce typed props and script setup in a Vue 3 codebase?

Enforce typed props and script setup in a Vue 3 codebase by applying fitness criteria that require 100% typed props and TypeScript typings. This evaluates component templates and reactive primitives to produce a patterns compliance checklist.

When do I need to validate reactive primitives in my Vue 3 components?

Validate reactive primitives in Vue 3 components when using ref, reactive, computed, and watch to ensure type-safe code. Applying validation rules detects incorrect usage and anti-patterns, guaranteeing adherence to modern Composition API guidelines.

What is the best way to migrate a Vue 3 project to use script setup and Pinia?

The best way to migrate a Vue 3 project to script setup and Pinia is to scan the codebase against fitness criteria. This identifies legacy anti-patterns, missing TypeScript typings, and Vuex usage, providing a compliance report for clean, type-safe code.