vue-composition-patterns

Provide Vue 3 Composition API patterns for scalable component architecture and state management.

Updated Feb 17, 2026
One-click install
npx skills add https://github.com/martylouis/agents --skill vue-composition-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue-composition-patterns
Source: https://github.com/martylouis/agents/tree/main/skills/vue-composition-patterns
Command: npx skills add https://github.com/martylouis/agents --skill vue-composition-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write more scalable, maintainable, and flexible Vue 3 components by leveraging advanced Composition API patterns, avoiding common pitfalls like boolean prop proliferation.

Core Features & Use Cases

  • Component Architecture: Design reusable and composable components using patterns like compound components and explicit variants.
  • State Management: Implement robust state sharing across components using provide/inject.
  • Use Case: Refactor a large, monolithic Vue component with numerous boolean props into smaller, more manageable, and explicitly defined variant components that compose together seamlessly.

Quick Start

Apply the 'avoid-boolean-props' pattern to refactor a Vue component with excessive boolean props.

Frequently Asked Questions about vue-composition-patterns

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

FAQPage Schema
How do I refactor a Vue 3 component with too many boolean props?

Vue 3 component refactoring with the Composition API uses patterns like compound components and explicit variants to replace boolean prop proliferation, yielding smaller, explicitly defined variant components that compose together seamlessly.

What is the best way to share state across Vue 3 components?

The best way to share state across Vue 3 components is using the provide/inject pattern within the Composition API, which establishes robust state management and improves code maintainability across your component architecture.

How do compound components work in Vue 3?

Compound components in Vue 3 work by composing smaller, explicitly defined variant components together using the Composition API, allowing you to build scalable and reusable component architectures without boolean prop proliferation.

When do I need provide/inject in Vue 3?

You need provide/inject in Vue 3 when you want to implement robust state sharing across deeply nested components, avoiding prop drilling and improving code maintainability and reusability in your application architecture.

Does the Composition API work for building scalable Vue 3 component architectures?

Yes, the Composition API works for building scalable Vue 3 component architectures by providing implementation techniques like compound components, provide/inject, and slots to improve code maintainability and reusability.

Why does my Vue 3 component architecture suffer from prop proliferation?

Your Vue 3 component architecture suffers from prop proliferation when relying on excessive boolean props to manage component variations, which you can resolve by applying advanced Composition API patterns like explicit variants and compound components.