create-adaptable-composable
vuejs-ai/skills · Agent Skill
Create library-grade Vue composables that support plain values, refs, and getters with predictable reactivity.
Jump to install ↓Overview
| Publisher | |
|---|---|
| Repository | vuejs-ai/skills ↗ |
| Skill folder | create-adaptable-composable |
| Stars | 3,151 |
| Forks | 184 |
| Bundled files | 1 |
| License | MIT |
| Last updated | October 23, 2026 |
| Links | Skill source ↗ · Repository ↗ |
Mozgi check
What we found in the skill files. Details come with a subscription.
Installation
A skill is a folder with a SKILL.md file. Pick your agent and run the commands in a terminal (macOS, Linux or Git Bash on Windows) from your project root.
Copy the prompt into Claude, Codex or another assistant: it will review the skill and install it for you.
Install the “create-adaptable-composable” skill from mozgi.io (https://mozgi.io/skills/vuejs-ai-create-adaptable-composable/) for me. 1. Download the archive: https://mozgi.io/skills/vuejs-ai-create-adaptable-composable/download If it fails, take the skill folder from the source: https://github.com/vuejs-ai/skills/tree/main/skills/create-adaptable-composable 2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me. 3. Put the “create-adaptable-composable” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.). 4. Make sure <skills folder>/create-adaptable-composable/SKILL.md exists. 5. Briefly tell me what this skill does and offer to try it on my task. If you cannot do a step yourself, tell me what to click or type.
git clone --depth 1 --branch main 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-composable
Restart Claude Code — the skill appears in the list; call it manually with /create-adaptable-composable. For all projects use ~/.claude/skills.
git clone --depth 1 --branch main https://github.com/vuejs-ai/skills.git /tmp/skills mkdir -p .agents/skills cp -r /tmp/skills/skills/create-adaptable-composable .agents/skills/create-adaptable-composable
Codex looks for skills in .agents/skills from the current folder up to the repo root; call one with /skills or $create-adaptable-composable. For all projects use ~/.agents/skills.
git clone --depth 1 --branch main https://github.com/vuejs-ai/skills.git /tmp/skills mkdir -p .cursor/skills cp -r /tmp/skills/skills/create-adaptable-composable .cursor/skills/create-adaptable-composable
Cursor picks the skill up on start; call it with “/” in Agent chat. Cursor also reads .claude/skills and .agents/skills. For all projects use ~/.cursor/skills.
git clone --depth 1 --branch main https://github.com/vuejs-ai/skills.git /tmp/skills mkdir -p .gemini/skills cp -r /tmp/skills/skills/create-adaptable-composable .gemini/skills/create-adaptable-composable
Gemini CLI offers to activate the skill when a task matches — you approve it. For all projects use ~/.gemini/skills.
Read SKILL.md and any companion files before deciding whether to install. Click a file to preview it.
SKILL.md contents
Original author text · read-onlyCreate 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
/**
* 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()
Examples
Adaptable useDocumentTitle Composable: read-only title parameter
import { watch, toRef } from 'vue'
import type { MaybeRefOrGetter } from 'vue'
export function useDocumentTitle(title: MaybeRefOrGetter<string>) {
watch(toRef(title), (t) => {
document.title = t
}, { immediate: true })
}
Adaptable useCounter Composable: two-way writable count parameter
import { watch, toRef } from 'vue'
import type { MaybeRef } from 'vue'
function useCounter(count: MaybeRef<number>) {
const countRef = toRef(count)
function add() {
countRef.value++
}
return { add }
}Frequently asked questions
What does the create-adaptable-composable skill do?
Create library-grade Vue composables that support plain values, refs, and getters with predictable reactivity.
How do I install create-adaptable-composable?
Open the “Installation” block on this page and pick your agent — Claude Code, Codex, Cursor or Gemini CLI — for ready-made commands that copy the skill folder to the right place. Or copy the prompt from the “Via assistant” tab and let the assistant review and install the skill.
Which AI models work with create-adaptable-composable?
Skills are plain Markdown instructions (the Agent Skills format), so create-adaptable-composable works with any agent that reads SKILL.md: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and more. The model loads the instructions only when a task matches the skill's description.
Is create-adaptable-composable free?
The skill is published openly by vuejs-ai under the MIT license. The skill itself costs nothing — you only pay your AI provider for the tokens you use.
Is it safe to install skills?
A skill is a set of instructions your agent will follow, so read SKILL.md and its companion files before installing. Scripts in the skill folder only run if your agent runs them — keep an eye on what it does and do not grant unnecessary permissions.
How is a skill different from an MCP server or a plugin?
An MCP server or plugin gives the model new tools — code that runs and returns a result. A skill gives it knowledge and process: how to approach a task, which steps to follow and what good output looks like. It needs no server or API key.