Create Adaptable Composable
Create a library-grade Vue composable that accepts maybe-reactive inputs (MaybeRef / MaybeRefOrGetter) so callers can pass a plain value, ref, or getter. Normalize inputs with toValue()/toRef() inside reactive effects (watch/watchEffect) to keep behavior predictable and reactive. Use this skill when user asks for creating adaptable or reusable composables.
- Type
- Skill
- Author
- vuejs-ai
- Category
- Frontend
- GitHub stars
- 3.2K
- Installs
- 13.9K
- Last updated
- October 23, 2026
Install
npx skills add https://github.com/vuejs-ai/skills --skill create-adaptable-composableUse cases
- Wrap a prop or ref in a composable that accepts MaybeRefOrGetter inputs.
- Normalize a getter with toValue() inside watchEffect to keep state reactive.
- Refactor a one-off helper into a reusable, library-grade composable.
Frequently Asked Questions
What input types can the composable accept?
Plain values, refs, or getters, expressed through the MaybeRef and MaybeRefOrGetter types.
How are maybe-reactive inputs normalized?
With toValue() and toRef() inside watch or watchEffect, so behavior stays predictable.
When should I use this skill?
When you are asked to create an adaptable or reusable Vue composable.
About this skill
Creates library-grade Vue composables that accept maybe-reactive inputs — plain values, refs, or getters via MaybeRef and MaybeRefOrGetter. It normalizes inputs with toValue() and toRef() inside watch and watchEffect so behavior stays predictable and reactive. Use it when asked to build an adaptable or reusable composable.
Summary written with AI assistance from the project's public description.
Categories
More from vuejs-ai
Vue Best Practices
MUST be used for Vue.js tasks. Strongly recommends Composition API with `<script setup>` and TypeScript as the standard approach. Covers Vue 3, SSR...
by vuejs-ai
Vue Debug Guides
Vue 3 debugging and error handling for runtime errors, warnings, async failures, and SSR/hydration issues. Use when diagnosing or fixing Vue issues.
by vuejs-ai
Vue Pinia Best Practices
Pinia stores, state management patterns, store setup, and reactivity with stores.
by vuejs-ai
Vue Router Best Practices
Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.
by vuejs-ai
Similar Skills
Find Skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", o...
by vercel-labs
Grill Me
A relentless interview to sharpen a plan or design.
by mattpocock
Ai Video Generation
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0,...
by inference-sh
Ai Image Generation
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FL...
by inference-sh