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.
Install
/plugin marketplace add vuejs-ai/skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add vuejs-ai/skills --skill create-adaptable-composablegit clone --depth 1 https://github.com/vuejs-ai/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/create-adaptable-composable ~/.claude/skills/create-adaptable-composablePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Create Adaptable Composable Adaptable composables are reusable functions that can accept both reactive and non-reactive inputs. This allows developers to use the composable in a variety of contexts without worrying about the reactivity of the inputs. Steps to design an adaptable composable in Vue.js: 1. Confirm the composable's purpose and API design and expected inputs/outputs. 2. Identify inputs params that should be reactive (MaybeRef / MaybeRefOrGetter). 3. Use `toValue()` or `toRef()` to normalize inputs inside reactive effects. 4. Implement the core logic of the composable using Vue's reactivity APIs. ## Core Type Concepts ### Type Utilities ```ts /** * value or writable ref (value/ref/shallowRef/writable computed) */ export type MaybeRef<T = any> = T | Ref<T> | ShallowRef<T> | WritableComputedRef<T>; /** * MaybeRef<T> + ComputedRef<T> + () => T */ export type MaybeRefOrGetter<T = any> = MaybeRef<T> | ComputedRef<T> | (() => T); ``` ### Policy and Rules - Read-only, computed-friendly input: use `MaybeRefOrGetter` - Needs to be writable / two-way input: use `MaybeRef` - Parameter might be a function value (callback/predicate/comparator): do not use `MaybeRefOrGetter`, or you may accidentally invoke it as a getter. - DOM/Element targets: if you want computed/derived targets, use `MaybeRefOrGetter`. When `MaybeRefOrGetter` or `MaybeRef` is used: - resolve reactive value using `toRef()` (e.g. watcher source) - resolve non-reactive value using `toValue()`
Details
- Skill name
create-adaptable-composable- Repository
- vuejs-ai/skills
- Path
skills/create-adaptable-composable/SKILL.md- License
- MIT
- Repo updated
- 23 October 2026
FAQ
What does the Create Adaptable Composable skill do?
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.
How do I install the Create Adaptable Composable skill?
Claude Code plugin: /plugin marketplace add vuejs-ai/skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Create Adaptable Composable popular?
It lives in vuejs-ai/skills, which has 3,356 GitHub stars and 199 forks.
Related skills
Vue Best Practices
3.4kvuejs-ai/skills
MUST be used for Vue.js tasks. Strongly recommends Composition API with `<script setup>` and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.
Vue Router Best Practices
3.4kvuejs-ai/skills
Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.
Vue Testing Best Practices
3.4kvuejs-ai/skills
Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.
Vue Debug Guides
3.4kvuejs-ai/skills
Vue 3 debugging and error handling for runtime errors, warnings, async failures, and SSR/hydration issues. Use when diagnosing or fixing Vue issues.
UI Styling
2.2kmrgoonie/claudekit-skills
Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns, forms, tables), customizing themes and colors, implementing dark mode, generating visual designs and posters, or establishing consistent styling patterns across applications.
Vue Jsx Best Practices
3.4kvuejs-ai/skills
JSX syntax in Vue (e.g., class vs className, JSX plugin config).
Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.