Skip to content
Cursor Rules Generator
Fullstack4 sections

Nuxt Cursor Rules Template

Generate production-ready Nuxt Cursor rules for Project Rules (.mdc), AGENTS.md, or legacy .cursorrules. This template encodes stack-specific conventions for projects using Nuxt. Vue meta-framework with auto-imports, file-based routing, and server routes.

What This Template Covers

The template focuses Cursor AI on concrete Nuxt practices instead of generic coding advice. Required sections are always included; optional sections can be enabled when they match your project.

Required guidance

  • - Auto-Imports & Conventions
  • - Pages & Routing
  • - Server & API Routes
  • - SSR & Rendering Modes

Default style

  • - Indentation: 2 spaces
  • - Quotes: single
  • - Semicolons: disabled
  • - Naming: camelCase

Example Nuxt 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.

Auto-Imports & Conventions

- Leverage Nuxt auto-imports: no manual imports for composables/components.
- Use useAsyncData() and useFetch() for data fetching.
- Use 2 spaces for indentation.
- Use camelCase for composable and function names.
- Place composables in composables/ directory for auto-import.
- Use auto-imported ref(), computed(), watch() from Vue.

Pages & Routing

- Use file-based routing under pages/ directory.
- Use [param].vue for dynamic routes.
- Use [...slug].vue for catch-all routes.
- Use definePageMeta() for per-page configuration (layout, middleware, auth).
- Use navigateTo() for programmatic navigation.
- Use middleware/ directory for route-level middleware with named exports.

Server & API Routes

- Use server/api/ for API endpoints with defineEventHandler().
- Use server/middleware/ for server-level middleware.
- Use useRuntimeConfig() for environment variables and public config.
- Use server routes with proper HTTP method handling (getMethod(), readBody()).
- Use server/utils/ for shared server utilities.
- Prefer Nitro storage (useStorage()) for KV and file storage.

Common Searches This Page Helps With

nuxt cursor rulesnuxt project rulesnuxt .cursorrules

Frequently Asked Questions

What does the Nuxt Cursor rules template include?
It includes 4 rule sections covering auto-imports & conventions, pages & routing, server & api routes and other Nuxt development conventions.
Can I generate Nuxt 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 Nuxt with other Cursor rules templates?
Yes. You can combine Nuxt with related templates such as TypeScript, Tailwind CSS, Docker, or backend frameworks when your project uses multiple technologies.

Related Cursor Rules Templates