본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)6.0k · #14448

vue

하는 일

이 스킬은 최신 Composition API와 TypeScript로 Vue 3 사용자 인터페이스를 만드는 방법을 설명합니다. Vue로 웹 페이지와 앱을 만드는 개발자를 위한 것입니다.

사용하는 경우

  • ✓Vue 단일 파일 컴포넌트를 작성하거나 편집할 때.
  • ✓컴포넌트의 props, emits 또는 양방향 model을 정의해야 할 때.
  • ✓Transition, Teleport 같은 내장 컴포넌트나 watcher를 사용하고 싶을 때.

스킬 링크

https://github.com/antfu/skills/blob/main/skills/vue/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/antfu/skills/blob/main/skills/vue/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“입력한 텍스트를 내보내고 지우기 버튼을 보여 주는 검색창 Vue 컴포넌트를 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 script setup과 TypeScript를 사용하는 Vue 3 Composition API 스타일을 따릅니다. 현재의 반응성 도구와 간단하고 효율적인 데이터 처리를 사용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Vue

Based on Vue 3.5, generated at 2026-09-25. Always use Composition API with <script setup lang="ts">.

Preferences

  • Prefer TypeScript over JavaScript
  • Prefer <script setup lang="ts"> over <script>
  • For performance, prefer shallowRef over ref if deep reactivity is not needed
  • Always use Composition API over Options API
  • Discourage using Reactive Props Destructure

Core

Topic Description Reference
Script Setup & Macros <script setup>, defineProps, defineEmits, defineModel, defineExpose, defineOptions, defineSlots, generics script-setup-macros
Reactivity & Lifecycle ref, shallowRef, computed, watch, watchEffect, effectScope, lifecycle hooks, composables core-new-apis

Features

Topic Description Reference
Built-in Components & Directives Transition, Teleport, Suspense, KeepAlive, v-memo, custom directives advanced-patterns

Quick Reference

Component Template

<script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue'

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

const emit = defineEmits<{
  update: [value: string]
}>()

const model = defineModel<string>()

const doubled = computed(() => (props.count ?? 0) * 2)

watch(() => props.title, (newVal) => {
  console.log('Title changed:', newVal)
})

onMounted(() => {
  console.log('Component mounted')
})
</script>

<template>
  <div>{{ title }} - {{ doubled }}</div>
</template>

Key Imports

// Reactivity
import { ref, shallowRef, computed, reactive, readonly, toRef, toRefs, toValue } from 'vue'

// Watchers
import { watch, watchEffect, watchPostEffect, onWatcherCleanup } from 'vue'

// Lifecycle
import { onMounted, onUpdated, onUnmounted, onBeforeMount, onBeforeUpdate, onBeforeUnmount } from 'vue'

// Utilities
import { nextTick, defineComponent, defineAsyncComponent } from 'vue'
자주 묻는 질문

Options API를 쓰나요?

아니요. Options API 대신 Composition API를 권장합니다.

어떤 스크립트 방식을 선호하나요?

lang ts를 붙인 script setup을 선호하며, 컴포넌트를 짧고 타입이 지정된 상태로 유지합니다.

내장 컴포넌트도 다루나요?

네. Transition, Teleport, Suspense, KeepAlive를 다룹니다.

상세 정보

작성자의 원본 설명

Vue 3 Composition API, script setup macros, reactivity system, and built-in components. Use when writing Vue SFCs, defineProps/defineEmits/defineModel, watchers, or using Transition/Teleport/Suspense/KeepAlive.

repo: antfu/skills

인기도

GitHub 스타
6.0k
순위
#14448
라이선스
MIT
업데이트
2026. 10. 30.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬