vue-3-nuxt-3-typescript-cursorrules-prompt-file — Cursor rule: Vue
A Cursor rule that tells the agent how to write Vue 3 and Nuxt 3 code: Composition API, TypeScript interfaces, Nuxt conventions. Useful when the project already runs this stack.
.cursor/rules/vue-3-nuxt-3-typescript-cursorrules-prompt-file.mdcWhat vue-3-nuxt-3-typescript-cursorrules-prompt-file does
The file spells out how code should look in a Vue 3 and Nuxt 3 project. Components use the Composition API with <script setup> and clear boundaries. Object shapes go through TypeScript interfaces, and shared types stay next to the feature that owns them.
Nuxt conventions get their own section: routing, layouts, composables, plugins, server routes and runtime config. For styling the rule asks for responsive, accessible Tailwind CSS that matches the project design system. VueUse utilities are fine where they simplify reactivity without hiding state transitions.
Vite and Nuxt builds should be optimised with lazy loading, dynamic imports, image optimisation and a look at the bundle. Installing it means dropping one file into the Cursor rules directory — there are no dependencies to pull. The catch is scope: globs is set to **/*, so the text is mixed into context for every file in the repository. If your repo holds non-Vue code, that is noise, and narrowing globs yourself is the fix.
What it helps with
- keep the agent on one component style with the Composition API
- describe object shapes with TypeScript interfaces instead of
any - follow Nuxt conventions for layouts, composables and server routes
- keep Tailwind CSS inside the project design system
- point the agent at VueUse where it actually helps
Example prompts for the agent
- add a new composable that loads the user profile, following Nuxt conventions
- refactor this component to
<script setup>and move prop types into an interface - review the build for places where dynamic imports and lazy loading fit
How to install vue-3-nuxt-3-typescript-cursorrules-prompt-file
Manually: put the files in place
.cursor/rules/vue-3-nuxt-3-typescript-cursorrules-prompt-file.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/vue-3-nuxt-3-typescript-cursorrules-prompt-file.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/vue-3-nuxt-3-typescript-cursorrules-prompt-file.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/vue-3-nuxt-3-typescript-cursorrules-prompt-file.mdManually: put the files in place
.clinerules/vue-3-nuxt-3-typescript-cursorrules-prompt-file.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about vue-3-nuxt-3-typescript-cursorrules-prompt-file
How do I install vue-3-nuxt-3-typescript-cursorrules-prompt-file in Cursor?
Create .cursor/rules/vue-3-nuxt-3-typescript-cursorrules-prompt-file.mdc in your project root and paste the rule contents into it.
What does this rule do?
It tells Cursor how to write Vue 3 and Nuxt 3 code: Composition API, TypeScript interfaces, Nuxt conventions, Tailwind CSS, VueUse and build optimisation.
Does the rule apply to every file in the project?
Yes, it sets globs: **/*, so the text is added to context across the whole repository. If your Vue code lives in specific folders, narrow globs to those.
Source text
vue-3-nuxt-3-typescript-cursorrules-prompt-file.mdc · CC0-1.0
--- description: "Cursor rules for Vue 3 development with TypeScript integration." globs: **/* alwaysApply: false --- Vue 3 Nuxt 3 TypeScript Guidelines - Use Vue 3 Composition API patterns with `<script setup>` and clear component boundaries. - Prefer TypeScript interfaces for object shapes and keep shared types close to the feature that owns them. - Use Nuxt conventions for routing, layouts, composables, plugins, server routes, and runtime config. - Keep Tailwind CSS usage responsive, accessible, and consistent with the project design system. - Use VueUse utilities where they simplify reactivity without hiding important state transitions. - Optimize Vite/Nuxt builds with lazy loading, dynamic imports, image optimization, and bundle review.
© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules