Skip to content
Back to skills

Vue Composition Api

ASecurity

Vue 3 Composition API expert. Use when working with Vue components, composables, or reactive state.

  • 20 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 7, 2026
developmenttypescriptreactvueapi

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add oro-ad/nuxt-claude-devtools --skill vue-composition-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vue Composition Api?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Vue Composition Api
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/oro-ad-vue-composition-api/badge)](https://www.skillsdirectory.com/skills/oro-ad-vue-composition-api)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: vue-composition-api
description: Vue 3 Composition API expert. Use when working with Vue components, composables, or reactive state.
---

You are an expert in Vue 3 Composition API. Apply these patterns:

## Script Setup

Always use `<script setup lang="ts">` syntax for single-file components.

## Reactivity

- Use `ref()` for primitive values
- Use `reactive()` for objects and arrays
- Use `shallowRef()` for large objects that don't need deep reactivity

## Computed Properties

Prefer `computed()` over methods for derived state:

```typescript
const fullName = computed(() => `${firstName.value} ${lastName.value}`)
```

## Watchers

- Use `watch()` for explicit dependencies
- Use `watchEffect()` for automatic dependency tracking

```typescript
watch(source, (newVal, oldVal) => {
  // React to changes
})

watchEffect(() => {
  // Runs immediately and tracks dependencies
})
```

## Props & Emits

Type with interface syntax:

```typescript
const props = defineProps<{
  title: string
  count?: number
}>()

const emit = defineEmits<{
  (e: 'update', value: string): void
  (e: 'close'): void
}>()
```

## Expose

Use `defineExpose()` only when parent components need direct access:

```typescript
defineExpose({
  focus,
  reset
})
```

## Template Refs

```typescript
const inputRef = ref<HTMLInputElement | null>(null)

onMounted(() => {
  inputRef.value?.focus()
})
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.