Community程式設計與開發github.com

antfu/vueuse-functions

在適當的時機使用 VueUse composables 來建構簡潔且可維護的 Vue.js / Nuxt 功能。

vueuse-functions 是什麼?

此技能旨在指導 AI 開發者或代理在 Vue.js 和 Nuxt 專案中,善用 VueUse 這個廣受歡迎的 composables 工具庫。它會分析目前正在開發的功能,並建議如何導入如 useLocalStorage、useDraggable 或 useIntersectionObserver 等 composables,以取代重複或自訂的邏輯,讓程式碼更為簡潔且易於維護。該技能支援 Vue 3 和 Nuxt 3 環境,並確保導入的 composable 與專案的依賴版本相容。其運作方式是根據 SKILL.md 中的指示,在編輯器或終端機上下文中主動提出重構建議,並產生可直接使用的程式碼片段。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/antfu/skills/tree/main/skills/vueuse-functions

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

vueuse-functions 是做什麼的?

在適當的時機使用 VueUse composables 來建構簡潔且可維護的 Vue.js / Nuxt 功能。

簡介

此技能旨在協助你在 Vue.js 或 Nuxt 專案中,自動發掘並導入 VueUse 函式庫的 composables,以最佳化程式碼品質。

使用方式

  • 當你正在撰寫 Vue 元件或 Nuxt 頁面時,AI 會自動分析需求,並建議合適的 VueUse composable。
  • 例如,若你正在管理表單輸入的狀態,AI 可能會建議使用 useLocalStorage 或 useStorage 來取代手動的 watch 和 localStorage.setItem。
  • 建議會包含完整的導入語句與使用範例。

支援的環境

  • Vue 3(Composition API)
  • Nuxt 3(自動導入 / 手動導入)

注意事項

  • 請確保你的專案已安裝 @vueuse/core 或是 @vueuse/nuxt。
  • 對於 Nuxt 3 專案,建議使用 @vueuse/nuxt 模組以獲得自動導入支援。
  • 此技能不會修改你的 package.json,請自行執行安裝。

Individual skills in this repo

This repo contains 16 individual skills — each has its own dedicated page.

antfu/antfu

Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects. Use when setting up new projects, configuring ESLint/Prettier alternatives, monorepos, library publishing, or when the user mentions Anthony Fu's preferences.

antfu/nuxt

Nuxt full-stack Vue framework with SSR, auto-imports, and file-based routing. Use when working with Nuxt apps, server routes, useFetch, middleware, or hybrid rendering.

antfu/pinia

Pinia official Vue state management library, type-safe and extensible. Use when defining stores, working with state/getters/actions, or implementing store patterns in Vue apps.

antfu/pnpm

Node.js package manager with strict dependency resolution. Use when running pnpm specific commands, configuring workspaces, or managing dependencies with catalogs, patches, or overrides.

antfu/slidev

Create and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, code walkthroughs, teaching materials, or developer decks.

antfu/tsdown

Bundle TypeScript and JavaScript libraries with blazing-fast speed powered by Rolldown. Use when building libraries, generating type declarations, bundling for multiple formats, or migrating from tsup.

antfu/turborepo

Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.

antfu/unocss

UnoCSS instant atomic CSS engine, superset of Tailwind CSS. Use when configuring UnoCSS, writing utility rules, shortcuts, or working with presets like Wind, Icons, Attributify.

antfu/vite

Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plugins, or building libraries/SSR apps with Vite.

antfu/vitepress

VitePress static site generator powered by Vite and Vue. Use when building documentation sites, configuring themes, or writing Markdown with Vue components.

antfu/vitest

Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.

antfu/vue

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.

antfu/vue-best-practices

MUST be used for Vue.js tasks. Strongly recommends Composition API with `<script setup>` and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.

antfu/vue-router-best-practices

Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.

antfu/vue-testing-best-practices

Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.

antfu/web-design-guidelines

Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

相關技能