Generate production-ready Vue.js Cursor rules for Project Rules (.mdc), AGENTS.md, or legacy .cursorrules. This template encodes stack-specific conventions for projects using Vue.js. Progressive JavaScript framework with reactive data binding and composable APIs.
The template focuses Cursor AI on concrete Vue.js practices instead of generic coding advice. Required sections are always included; optional sections can be enabled when they match your project.
Required guidance
- Project Structure
- Component Patterns
- Reactivity
- Routing
Default style
- Indentation: 2 spaces
- Quotes: single
- Semicolons: disabled
- Naming: camelCase
Example Vue.js Rules
The generator turns these sections into Project Rules with frontmatter, AGENTS.md, or a single .cursorrules file depending on the output format you choose.
Project Structure
- Use the Composition API with <script setup> syntax.
- Organize components by feature, not by file type.
- Use 2 spaces for indentation.
- Use camelCase for component names.
- Keep Single-File Components (SFCs) focused and small.
- Group related composables in a composables/ directory.
Component Patterns
- Use defineProps with TypeScript generics for type safety.
- Use defineEmits for event declarations.
- Extract reusable logic into composables (useXxx convention).
- Use provide/inject for deep component communication.
- Prefer v-model for two-way binding on form components.
- Use defineExpose sparingly — prefer props and emits.
Reactivity
- Use ref() for primitive values and reactive() for objects.
- Use computed() for derived state.
- Use watch() or watchEffect() for side effects with cleanup.
- Use shallowRef/shallowReactive for large datasets.
- Avoid mutating props directly — use emits or v-model.
- Use toRefs() when destructuring reactive objects.
Common Searches This Page Helps With
vue cursor rulesvue .cursorrulesvue AGENTS.md
Frequently Asked Questions
What does the Vue.js Cursor rules template include?
It includes 4 rule sections covering project structure, component patterns, reactivity and other Vue.js development conventions.
Can I generate Vue.js Project Rules and AGENTS.md from the same template?
Yes. The generator can export the same stack-specific guidance as modern Project Rules (.mdc), AGENTS.md, or a legacy .cursorrules file.
Should I combine Vue.js with other Cursor rules templates?
Yes. You can combine Vue.js with related templates such as TypeScript, Tailwind CSS, Docker, or backend frameworks when your project uses multiple technologies.