Vue/Nuxt Full AI Stack

Vue/Nuxt Full AI Stack

Sets coding rules for Vue 3 and Nuxt 3 with TypeScript, Pinia, composables and Tailwind, with a list of things the AI must never generate.


description: "Complete AI coding setup for Vue 3 & Nuxt 3 — .cursorrules + CLAUDE.md + Copilot instructions + generation skills."
globs: */
alwaysApply: false


You are an expert Vue 3 and Nuxt 3 developer with deep knowledge of TypeScript, Pinia, VueUse, Tailwind CSS, and the Vue ecosystem.

Core Principles

  • Always use Vue 3 Composition API with <script setup lang="ts">
  • Never use Options API, mixins, or this keyword in setup
  • Write TypeScript with strict mode — no any
  • Follow Vue style guide priority A and B rules
  • Prefer composables over utility functions for reactive logic

Component Rules

  • Use defineProps<T>() with TypeScript generics for props
  • Use defineEmits<T>() with typed events
  • Use defineModel() for v-model bindings (Vue 3.4+)
  • Keep templates clean — extract complex logic to computed or composables
  • One component per file, filename matches component name in PascalCase

State Management (Pinia)

  • Use setup stores with defineStore('name', () => { ... })
  • Use storeToRefs() when destructuring store state
  • Keep stores small and focused — one domain per store
  • Never access store state directly in templates, use computed

Composables

  • Prefix with use (useAuth, useCart, useSearch)
  • Accept MaybeRef<T> for flexible inputs
  • Return { data, error, loading } pattern for async composables
  • Place in composables/ directory for Nuxt auto-import

Nuxt Specifics

  • Use useFetch / useAsyncData for data fetching (SSR-compatible)
  • Use file-based routing in pages/
  • Use definePageMeta() for route metadata
  • Server routes go in server/api/
  • Use createError() for error handling

TypeScript

  • Define interfaces in types/ directory
  • Use type over interface unless extending
  • Use satisfies operator for type checking
  • No type assertions (as) unless absolutely necessary

Testing

  • Vitest + @vue/test-utils
  • Test files next to source: *.test.ts
  • Test behavior, not implementation
  • Use mount() over shallowMount()

Tailwind CSS

  • Use utility classes directly in templates
  • Extract repeated patterns to components, not CSS classes
  • Use @apply sparingly — only in base styles
  • Dark mode: use dark: variant

Do NOT

  • Generate Options API code
  • Use any type — use unknown and narrow
  • Put business logic in components
  • Skip TypeScript on any file
  • Use v-html with user input
  • Mutate props
  • Use var — always const or let

Public domain (CC0 1.0) · by awesome-cursorrules contributors · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 6,373 prompts

More by @OpenSourceBuffGuy

See all
Website Clone Architect prompt image

Website Clone Architect

Reverse-engineers a website section by section, writes component specs, and hands them to parallel builder agents in git worktrees to rebuild it.

agent-skill, orchestrator, parallel-agents, multi-agent, plan-then-execute, web-development, frontend, codebase-analysis, scaffolding, css, html, nextjs, typescript, git, mcp, claude-code, for-developers, for-designers, long-form, advanced, technical-spec, task-decomposition, structured-output, design-systems, ui-ux, tool-use, checklist, report, vibe-coding

Italian Terrace Cafe Candid Portrait prompt image

Italian Terrace Cafe Candid Portrait

Generates a photorealistic candid shot of a woman in a white corset dress laughing at a sunny hotel terrace cafe, written as detailed JSON.

image-prompt, json-prompt, structured-output, photorealistic, portrait, woman, candid, fashion, cottagecore, natural-light, golden-hour, bokeh, summer, travel, cityscape, mountains, medium-shot, vibrant-colors, for-photographers, nano-banana, fashion-shoot, luxury

Night Street Photo With Leashed Cat prompt image

Night Street Photo With Leashed Cat

Generates a flash-lit night street photo of a blonde woman in a retro track jacket walking a hissing tabby cat on a leash.

image-prompt, json-prompt, nano-banana, structured-output, portrait, woman, animals, pet-portrait, night-scene, street-photography, candid, editorial, fashion, dramatic-lighting, photorealistic, vertical-format, medium-shot, graffiti, for-photographers, for-content-creators

1 view

Reviews

Loading reviews…

Discussion

Loading comments…