Composables
Teaches Vue composables for reusable stateful logic with the Composition API. Use when extracting shared reactive state, side effects, or computed logic that multiple components need.
Install
npx skills add PatternsDev/skills --skill composablesgit clone --depth 1 https://github.com/PatternsDev/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/vue/composables ~/.claude/skills/composablesPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Composables ## Table of Contents - [When to Use](#when-to-use) - [Instructions](#instructions) - [Details](#details) - [Source](#source) Composables are functions that encapsulate and reuse stateful logic using Vue's Composition API. They replace the Options API's fragmented code organization with clean, composable functions that can be shared across components. ## When to Use - Use this when you need to share stateful logic across multiple components without duplication - This is helpful for extracting concerns like data fetching, event listeners, or timers into reusable functions ## Instructions - Name composable functions with the `use` prefix by convention (e.g., `useCounter`, `useWidth`) - Use `ref()`, `reactive()`, and lifecycle hooks (`onMounted`, `onBeforeUnmount`) inside composables - Return reactive state and methods from composables for use in component templates - Prefer composables over the Options API for better code organization, reusability, and TypeScript support ## Details ### Options API Before the introduction of the Composition API in Vue, developers relied on the **Options API** to organize component logic which include reactive data, lifecycle methods, computed properties, and more. The Options API allowed defining these aspects within specific options, as shown in the example below:
Details
- Skill name
composables- Repository
- PatternsDev/skills
- Path
vue/composables/SKILL.md- Repo updated
- 15 April 2026
FAQ
What does the Composables skill do?
Teaches Vue composables for reusable stateful logic with the Composition API. Use when extracting shared reactive state, side effects, or computed logic that multiple components need.
How do I install the Composables skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add PatternsDev/skills --skill composables. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Composables popular?
It lives in PatternsDev/skills, which has 259 GitHub stars and 28 forks.
Related skills
AI UI Patterns
259PatternsDev/skills
Teaches design patterns for building AI-powered React interfaces. Use when creating chatbots, intelligent assistants, streaming UIs, or any AI-driven user experience in React.
Async Components
259PatternsDev/skills
Teaches async component loading in Vue for performance optimization. Use when you have heavy components that aren't needed on initial render and can be loaded on demand.
Bundle Splitting
259PatternsDev/skills
Teaches bundle splitting techniques for web performance. Use when your application has a large JavaScript bundle that affects load times or when you need to reduce FCP/LCP.
Compound Pattern
259PatternsDev/skills
Teaches the compound component pattern for shared implicit state. Use when building related components like tabs, accordions, or dropdowns that need to coordinate without explicit prop passing.
Components
259PatternsDev/skills
Teaches Vue component fundamentals including markup, logic, and styles. Use when building or structuring Vue single-file components as the foundational building blocks of your application.
Data Provider
259PatternsDev/skills
Teaches the data provider pattern using renderless components and scoped slots. Use when you need to abstract data fetching or state management logic and expose it to child components via slots.
Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.