This skill guides an agent through designing a Vue composable whose inputs can be a literal value, a ref or a getter. It sets out which parameters should be reactive, when to type them as MaybeRef and when as MaybeRefOrGetter, and how to resolve them with toRef() or toValue().
It applies when you ask for a reusable or adaptable composable in a Vue 3 or Nuxt 3 project. The skill is one short instruction file with two worked examples, useDocumentTitle and useCounter.
What You Get
- Four design steps for a composable, from API shape to implementation
- Type rules: MaybeRefOrGetter for read-only inputs, MaybeRef for two-way writable inputs
- A warning to avoid MaybeRefOrGetter for callback parameters, which could be called as getters by mistake
- Two worked examples: useDocumentTitle and useCounter
Common Use Cases
- Writing a composable that works with a literal, a ref or a computed value
- Turning an existing composable’s fixed arguments into reactive ones
- Building a small library of shared composables for a Vue or Nuxt app
What Makes It Unique
The skill covers one narrow topic, how composable inputs are typed and resolved, and states the pitfalls around function-valued parameters and DOM targets. Broader Vue skills in the same repository cover project structure and debugging, so this one stays focused on the input contract.
Under The Hood
The skill is a single Markdown file the agent loads when you ask for an adaptable composable. It contains no scripts. It does not run commands, call the network or write files by itself; any code is written by the agent in your project as part of your request.