Skills for Real Engineers. Straight from my .agents directory.
create-adaptable-composable
Agent skill fromvuejs-ai/skills
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 to install create-adaptable-composable
npx skills add vuejs-ai/skills# or add only this skill to Claude Code: copy the folder
skills/create-adaptable-composable/
# into
~/.claude/skills/create-adaptable-composable/ (all projects)
.claude/skills/create-adaptable-composable/ (one project)
1# Create Adaptable Composable23Adaptable 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.45Steps to design an adaptable composable in Vue.js:61. Confirm the composable's purpose and API design and expected inputs/outputs.72. Identify inputs params that should be reactive (MaybeRef / MaybeRefOrGetter).83. Use `toValue()` or `toRef()` to normalize inputs inside reactive effects.94. Implement the core logic of the composable using Vue's reactivity APIs.1011## Core Type Concepts1213### Type Utilities1415```ts16/**17 * value or writable ref (value/ref/shallowRef/writable computed)18 */19export type MaybeRef<T = any> = T | Ref<T> | ShallowRef<T> | WritableComputedRef<T>;2021/**22 * MaybeRef<T> + ComputedRef<T> + () => T23 */24export type MaybeRefOrGetter<T = any> = MaybeRef<T> | ComputedRef<T> | (() => T);25```2627### Policy and Rules2829- Read-only, computed-friendly input: use `MaybeRefOrGetter`30- Needs to be writable / two-way input: use `MaybeRef`31- Parameter might be a function value (callback/predicate/comparator): do not use `MaybeRefOrGetter`, or you may accidentally invoke it as a getter.32- DOM/Element targets: if you want computed/derived targets, use `MaybeRefOrGetter`.3334When `MaybeRefOrGetter` or `MaybeRef` is used:35- resolve reactive value using `toRef()` (e.g. watcher source)36- resolve non-reactive value using `toValue()`37…
Excerpt shown under the repository's MIT license.
More skills in skills
Similar skill repositories
An agentic skills framework & software development methodology that works.
Public repository for Agent Skills
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Production-grade engineering skills for AI coding agents.
