Home › All rules › Community › vue3 Composition Api Cursor Rules

vue3 Composition Api Cursor Rules

Cursor rules for Vue 3 development with Composition API integration.

CursorVue / NuxtCommunity (CC0)

How to use

Save this as .cursor/rules/vue3-composition-api-cursorrules-prompt-file.mdc in your project, commit it, and Cursor will load it. Review it first: community files can be opinionated or out of date.

Note: Review and test before use. Provided as is, without warranty. See Terms.

.cursor/rules/vue3-composition-api-cursorrules-prompt-file.mdcDownload  
---
description: "Cursor rules for Vue 3 development with Composition API integration."
globs: **/*
alwaysApply: false
---
// Vue 3 Composition API .cursorrules

// Vue 3 Composition API best practices

const vue3CompositionApiBestPractices = [
  "Use setup() function for component logic",
  "Utilize ref and reactive for reactive state",
  "Implement computed properties with computed()",
  "Use watch and watchEffect for side effects",
  "Implement lifecycle hooks with onMounted, onUpdated, etc.",
  "Utilize provide/inject for dependency injection",
];

// Folder structure

const folderStructure = `
src/
  components/
  composables/
  views/
  router/
  store/
  assets/
  App.vue
  main.js
`;

// Additional instructions

const additionalInstructions = `
1. Use TypeScript for type safety
2. Implement proper props and emits definitions
3. Utilize Vue 3's Teleport component when needed
4. Use Suspense for async components
5. Implement proper error handling
6. Follow Vue 3 style guide and naming conventions
7. Use Vite for fast development and building
`;

More: Vue / Nuxt rules · all community rules

Related rules

Nuxt 4 AGENTS.md

AGENTS.md for Nuxt 4 apps: the app/ directory layout, data fetching keys, server routes with validation, and runtime config.

AGENTS.mdVue / Nuxt

Nuxt 3 + Vue rules

Cursor rules for Nuxt 3 / Vue 3 apps using the Composition API, script setup and Pinia.

CursorVue / Nuxt

Vue 3 + Pinia AGENTS.md

AGENTS.md for Vue 3.5 single-page apps on Vite with the Composition API, Pinia, and Vue Router 4.

AGENTS.mdVue / Nuxt

Vue 3 Nuxt 3 Development Cursor Rules

Cursor rules for Vue 3 development with Nuxt 3 integration.

CursorVue / NuxtCommunity (CC0)

Vue 3 Nuxt 3 TypeScript Cursor Rules

Cursor rules for Vue 3 development with TypeScript integration.

CursorVue / NuxtCommunity (CC0)

Vue Claude Stack Cursor Rules

Complete AI coding setup for Vue 3 & Nuxt 3 — .cursorrules + CLAUDE.md + Copilot instructions + generation skills.

CursorVue / NuxtCommunity (CC0)

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.