home/dot_agents/skills/vue-best-practices/SKILL.md
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.
npx skillsauth add hayatosc/dotfiles vue-best-practicesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill as an instruction set. Follow the workflow in order unless the user explicitly asks for a different order.
<script setup lang="ts">.vue-options-api-best-practices skill if available.vue-jsx-best-practices skill if available.references/reactivity.mdreferences/sfc.mdreferences/component-data-flow.mdreferences/composables.mdCreate a brief component map before implementation for any non-trivial feature.
components/<feature>/..., composables/use<Feature>.ts) when adding more than one component.These are essential, must-know foundations. Apply all of them in every Vue task using the core references already loaded in section 1.1.
1.1: reactivityref/reactive), derive everything possible with computed.1.1: sfc<script> → <template> → <style>.v-html, list rendering, conditional rendering choices).Split a component when it has more than one clear responsibility (e.g. data orchestration + UI, or multiple independent UI sections).
useXxx()).Apply objective split triggers. Split the component if any condition is true:
Entry/root and route view rule:
1.1: component-data-flowv-model only for true two-way component contracts.defineProps, defineEmits, and InjectionKey as needed.1.1: composablesDo not add these by default. Load the matching reference only when the requirement exists.
<KeepAlive> for stateful view caching -> component-keep-alive<Teleport> for overlays/portals -> component-teleport<Suspense> for async subtree fallback boundaries -> component-suspense<Transition> for enter/leave effects -> transition<TransitionGroup> for animated list mutations -> transition-groupUse these only when there is explicit product or technical need.
Performance work is a post-functionality pass. Do not optimize before core behavior is implemented and verified.
tools
Recommend a modern TypeScript toolchain. Use when choosing or updating a TypeScript stack for Node or CLI projects, libraries or packages, and web apps or APIs; selecting tsgo as the primary typechecker with tsc as compatibility fallback; recommending Hono, tsx, tsdown, Vite, Vitest, oxlint, oxlint-tsgolint, oxfmt, or deciding between bun and pnpm.
development
Implement, review, and refactor TypeScript code with a strong bias toward type safety. Use to fix TypeScript errors, remove `any` or unsafe `as`, review type safety, tighten TypeScript or lint settings, and ship ESM-first code that passes the repository's typecheck without weakening types.
development
Self-review, improve, commit, and push code that Claude has just written. Use this skill when the user asks Claude to "self-ship", "review and ship", "review then commit and push", or wants Claude to autonomously review its own output, apply improvements, and publish the changes to the remote repository. Triggered by: "self-ship", "ship it", "review and push", "review my changes and commit", or similar requests to complete the full write → review → commit → push cycle.
development
Analyze and execute behavior-preserving refactors in small, verified steps. Use when the user asks to refactor, clean up code structure, extract functions or modules, reduce duplication, improve maintainability, or modernize code without changing external behavior.