Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
Skills/Frontend Development
vuejs-ai avatar

Create Adaptable Composable

vuejs-ai/skills

The create-adaptable-composable skill guides developers in building reusable Vue composables that accept both reactive and non-reactive inputs (values, refs, or getters) through MaybeRef and MaybeRefOrGetter type utilities. It's designed for Vue 3+ developers who need to create library-grade composables that work flexibly across different contexts by normalizing inputs with toValue() and toRef() inside reactive effects. This skill solves the problem of creating composables with inconsistent APIs by establishing clear patterns for handling inputs that may or may not be reactive.

installs
13.9K
GitHub stars
3.2K
last updated
Aug 21, 2026
View on GitHubSave

Install

$ npx -y skills add vuejs-ai/skills --skill create-adaptable-composable --agent claude-code

Installs into .claude/skills of the current project.

Files

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

/**
 * 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 }
}
SKILL.md on GitHub

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

Details

Repository
github.com/vuejs-ai/skills
Category
Frontend Development

More from vuejs-ai/skills

All 9
  • Vue Testing Best Practices13.8K
  • Vue Options Api Best Practices11.7K
  • Vue Jsx Best Practices11.1K
  • Vue Development Guides2K
  • Vue Best Practices43K
  • Vue Debug Guides26.8K
  • Vue Pinia Best Practices16.9K
  • Vue Router Best Practices15.1K

Recommended

More Frontend Development
1antfu avatarslidevantfu/skillsCreate and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. Use 13.8Kinstalls
2benjitaylor avataragentationbenjitaylor/agentationAdd Agentation visual feedback toolbar to a Next.js project13.7Kinstalls
3fastapi avatarfastapifastapi/fastapiFastAPI best practices and conventions. Use when working with FastAPI APIs, Pydantic models, dependencies, streaming responses including Server-Sent Events (SSE13.6Kinstalls
4tavily-ai avatartavily-dynamic-searchtavily-ai/skillsProgrammatic web search with context isolation. Use this skill for any research task where you need to search the web, filter results, and extract specific info13.6Kinstalls
5shopify avatarshopify-storefront-graphqlshopify/shopify-ai-toolkitUse for custom storefronts requiring direct GraphQL queries/mutations for data fetching and cart operations. Choose this when you need full control over data fe13.5Kinstalls
6openai avatarpdfopenai/skillsUse when tasks involve reading, creating, or reviewing PDF files where rendering and layout matter; prefer visual checks by rendering pages (Poppler) and use Py13.4Kinstalls