What problem does it solve?
Standard Vue composables often only accept reactive inputs, forcing developers to manually wrap plain values, refs, or getter functions in refs to use them, which adds unnecessary boilerplate and risks reactivity bugs. This Skill eliminates that friction by enabling composables to natively accept both reactive and non-reactive inputs.
Core Features & Use Cases
- Flexible Input Support: Accepts plain values, refs, computed refs, and getter functions as composable parameters using Vue's MaybeRef and MaybeRefOrGetter type utilities.
- Predictable Reactivity: Normalizes inputs with toValue() and toRef() inside reactive effects to ensure consistent reactive behavior regardless of input type.
- Use Case: Build a reusable useCounter composable that works with both a plain number count and a ref holding the count, so callers don't need to adjust their code based on their reactivity setup.
Quick Start
Use the create-adaptable-composable skill to build a reusable useTheme composable that accepts both a plain theme string and a ref holding the current theme value to sync with browser preferences.