Vue Best Practices
Use this skill as a rulebook for fixing common Vue 3 anti-patterns in production apps.
Workflow
- Open
AGENTS.md. - Select only the relevant rule files from
rules/. - Apply the smallest safe change that resolves the issue.
- Re-check behavior and run the project's lint, test, and build checks.
Repository Guardrails
- Use Vue 3 Composition API with
<script setup lang="ts">. - Follow the existing state-management pattern already used by the project (Vuex, Pinia, etc.).
- Do not create new global components.
- Do not add comments unless the user explicitly asks for them.
- Do not import Vue compiler macros (
defineProps,defineEmits,defineExpose,withDefaults) fromvue. - Match ESLint style defaults in this repo: semicolons, single quotes, trailing commas for multiline, 2-space indent.
Output Expectations
- Explain which rules were applied and why.
- Prefer composables and pure utilities over ad-hoc component logic.
- Keep changes incremental; avoid broad rewrites unless asked.