Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

vue

БесплатноБез исполняемых скриптовНе проверен

Vue.js is a progressive JavaScript framework for building web interfaces with single-file components, the Composition API and fine-grained reactivity. Use…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

Vue

Overview

Vue 3 builds interfaces from single-file components (.vue) that hold a template, a script setup block and styles. State is reactive (ref, computed, watch), shared state lives in Pinia, navigation in Vue Router, and reusable logic in composables. Versions checked in October 2026: vue 3.5.44 (3.6 with Vapor Mode is still a release candidate, so do not use it unless asked), vue-router 5.4, pinia 4.1, vite 8, create-vue 3.24. Router 5 and Pinia 4 keep the Router 4 and Pinia 2 style APIs used below.

Instructions

Create a project

npm create vue@latest -- --ts --router --pinia --vitest --eslint taskboard
cd taskboard && npm install && npm run dev

The flags skip the interactive prompts; run npm create vue@latest -- --help for the list (--bare omits the example code). create-vue itself needs Node 22.18+ or 24.12+. npm run build runs vue-tsc type-checking before the Vite build, so type errors fail the build.

Project layout

src/
  main.ts             entry: createApp, plugins
  App.vue             root component with <RouterView />
  router/index.ts     routes and guards
  stores/             Pinia stores (articles.ts, auth.ts)
  composables/        use* functions (useApi.ts)
  components/         shared components
  views/              route-level components
  types/article.ts    shared TypeScript types
// src/types/article.ts
export interface Article {
  id: number
  slug: string
  title: string
  excerpt: string
  published: boolean
}

Components: props, emits, v-model

Use script setup. Since Vue 3.5 props can be destructured and stay reactive; defineEmits takes named tuples; defineModel (3.4+) replaces the modelValue prop plus update:modelValue emit.

<!-- src/components/ArticleCard.vue -->
<script setup lang="ts">
import type { Article } from '@/types/article'

const { article, showDelete = false } = defineProps<{
  article: Article
  showDelete?: boolean
}>()
const emit = defineEmits<{ delete: [id: number] }>()
</script>

<template>
  <article class="card">
    <RouterLink :to="`/articles/${article.slug}`">
      <h2>{{ article.title }}</h2>
    </RouterLink>
    <p>{{ article.excerpt }}</p>
    <button v-if="showDelete" @click="emit('delete', article.id)">Delete</button>
  </article>
</template>
<!-- src/components/SearchBox.vue -->
<script setup lang="ts">
const query = defineModel<string>({ default: '' })
</script>

<template>
  <input v-model="query" type="search" placeholder="Search articles" />
</template>

Reactivity

const count = ref(0)                              // read and write count.value in script
const doubled = computed(() => count.value * 2)   // cached, recomputed when count changes
watch(count, (newVal, oldVal) => console.log(`Count changed from ${oldVal} to ${newVal}`))

Pinia store (setup syntax)

// src/stores/articles.ts
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
import type { Article } from '@/types/article'

export const useArticlesStore = defineStore('articles', () => {
  const articles = ref<Article[]>([])
  const loading = ref(false)
  const error = ref<string | null>(null)

  const published = computed(() => articles.value.filter((a) => a.published))

  async function fetchAll() {
    loading.value = true
    error.value = null
    try {
      const res = await fetch('/api/articles')
      if (!res.ok) throw new Error(`HTTP ${res.status}`)
      articles.value = await res.json()
    } catch (e) {
      error.value = e instanceof Error ? e.message : String(e)
    } finally {
      loading.value = false
    }
  }

  async function create(data: Pick<Article, 'title' | 'excerpt'>) {
    const res = await fetch('/api/articles', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(data),
    })
    if (!res.ok) throw new Error(`HTTP ${res.status}`)
    articles.value.unshift(await res.json())
  }

  return { articles, loading, error, published, fetchAll, create }
})

In a component, destructure state and getters with storeToRefs(store); take actions straight from the store. Destructuring state directly loses reactivity.

<!-- src/views/ArticlesView.vue -->
<script setup lang="ts">
import { computed, onMounted, ref } from 'vue'
import { storeToRefs } from 'pinia'
import ArticleCard from '@/components/ArticleCard.vue'
import SearchBox from '@/components/SearchBox.vue'
import { useArticlesStore } from '@/stores/articles'

const store = useArticlesStore()
const { published, loading, error } = storeToRefs(store)
const query = ref('')

const visible = computed(() =>
  published.value.filter((a) => a.title.toLowerCase().includes(query.value.toLowerCase())),
)

onMounted(store.fetchAll)
</script>

<template>
  <div>
    <h1>Articles</h1>
    <SearchBox v-model="query" />
    <p v-if="loading">Loading...</p>
    <p v-else-if="error">Could not loa
Полный SKILL.md на GitHub

Установить vue в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл vue?

Vue.js is a progressive JavaScript framework for building web interfaces with single-file components, the Composition API and fine-grained reactivity. Use when a user asks to create a Vue 3 app, write a `script setup` component, use ref/computed/watch, props and emits, defineModel, Pinia stores, Vue Router guards, composables, or provide/inject, or to set up a project with Vite and TypeScript.

Как установить скилл vue?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл vue запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить vue с