Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Rules Vue?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adityaaatiwari-rules-vue)
---
name: rules-vue
description: "ANVIL coding rules for vue code (**/*.vue, **/*.test.ts, **/*.spec.ts, tests/**/*.spec.ts): Vue, Vue Testing."
---
<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->
# ANVIL rules: vue
Follow these rules for vue code (**/*.vue, **/*.test.ts, **/*.spec.ts, tests/**/*.spec.ts).
## Vue
# Vue
- `<script setup lang="ts">` with typed props and emits; never mutate props.
- `computed` for derived state; do not destructure reactive objects without `toRefs`.
- Reusable logic in composables; shared state in Pinia.
- No browser globals during SSR setup.
## Vue Testing
# Vue Testing
- Mount components with `@vue/test-utils` testing emitted events, slots, and visible DOM output via roles/labels rather than internal instance state.
- Provide fresh Pinia instances (`createTestingPinia` or isolated `setActivePinia(createPinia())`) per test so store state never leaks.
- Flush async DOM updates explicitly (`await nextTick()` / `flushPromises()`) and mock API boundaries cleanly instead of sleeping or making network requests.
- Verify prop contracts, loading/error states, and keyboard interactions for interactive components.