skills/vue3-component-decomposition/SKILL.md
Decompose large Vue 3 components into focused SFCs and composables with explicit contracts, simple templates, and SSR-safe side effects.
npx skillsauth add noartem/laravel-vue-skills vue3-component-decompositionInstall 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.
Break large Vue 3 components into smaller, testable units without losing readability.
setup() or <script setup> grows hard to scanview (markup/presentational)state (refs/reactive/computed)effects (watch/watchEffect/lifecycle)io (API calls)props, emits, slots).:key with v-for and do not combine v-if with v-for on the same element.slots for variable UI regions over boolean prop explosion.use prefix (useOrdersTable, useUserFilters).toValue().toValue() in watchEffect() (or watch refs/getters directly).onMounted() and always clean up in onUnmounted().src/
components/
feature/
OrdersPage.vue # orchestrator
OrdersToolbar.vue # presentational controls
OrdersTable.vue # table rendering
OrdersTableRow.vue # row rendering
composables/
useOrdersQuery.ts # fetch/pagination/sort
useOrdersFilters.ts # filter state and derived query
useOrdersSelection.ts # row selection logic
tools
shadcn-vue for Vue/Nuxt with Reka UI components and Tailwind. Use for accessible UI, Auto Form, data tables, charts, dark mode, MCP server setup, or encountering component imports, Reka UI errors.
documentation
Wrap multi-write operations in transactions; use dispatchAfterCommit and idempotency patterns to ensure consistency
tools
Stabilize workflows with Template Method or Strategy; extend by adding new classes instead of editing core logic
tools
Schedule tasks with safety; use withoutOverlapping, onOneServer, and visibility settings for reliable cron execution