vuejs-patterns

Provides Composition API patterns and reusable TypeScript-based Vue.js 3 components and stores.

Updated Jul 19, 2025
One-click install
npx skills add https://github.com/omanjaya/attendancedev --skill vuejs-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vuejs-patterns
Source: https://github.com/omanjaya/attendancedev/tree/main/.claude/skills/vuejs-patterns
Command: npx skills add https://github.com/omanjaya/attendancedev --skill vuejs-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guidance for writing clean, maintainable Vue.js 3 code using the Composition API, state management, and renderless patterns.

Core Features & Use Cases

  • Component Structure: SFC patterns with <script setup>, props, emits, and lifecycle hooks.
  • Composables: Reusable logic patterns (useAsync, usePagination, etc.).
  • State Management: Pinia-store patterns and typed APIs.
  • Renderless Components: Slot-based patterns for flexible composition.

Quick Start

Create a renderless DataFetcher component and use it in a parent component to fetch and render data.

Frequently Asked Questions about vuejs-patterns

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

FAQPage Schema
How do I structure Vue 3 components using the Composition API?

Vue 3 Composition API enables scalable component structure through <script setup>, typed props, emits, and lifecycle hooks. This approach centralizes reactive logic, improves code reusability, and makes dependencies explicit compared to the Options API.

What are composables and how do I build reusable logic in Vue 3?

Composables are JavaScript functions that encapsulate and reuse stateful logic in Vue 3 using the Composition API. Common patterns include useAsync for data fetching, usePagination for handling pagination, useDebounce for input throttling, and useLocalStorage for persistent state across sessions.

How do I manage state in Vue 3 applications at scale?

State management in Vue 3 scales through Pinia store patterns with typed APIs and composables. This approach handles multiple concerns—reactivity, TypeScript typing for refs and computed values, error handling, and predictable API design—enabling maintainable stores across large projects.

What are renderless components and when should I use them?

Renderless components use slot-based patterns to separate logic from presentation, enabling flexible composition. A renderless DataFetcher, for example, handles data fetching logic while parent components control rendering, allowing reuse across different UI patterns without duplication.

Can I use Vue 3 Composition API patterns with TypeScript?

Yes. Vue 3 Composition API provides full TypeScript support, including typed refs, computed values, and composable functions. This enables compile-time safety for reactive properties, lifecycle hooks, and form validation, reducing runtime errors in large applications.