Rule
0 installs · 0 said it worked
Vue 3 and Nuxt 3 coding assistant rules for TypeScript components
Cursor rules that make an AI assistant write Vue 3 and Nuxt 3 code with the Composition API, typed props and emits, Pinia setup stores, composables, Nuxt routing and data fetching, and Vitest testing.
People use this for
- vue 3 cursor rules
- nuxt 3 typescript coding rules
- vue composition api code generation
- pinia setup store prompt
- nuxt 3 ai assistant instructions
- Name
vue-3-and-nuxt-3-coding-assistant-rules-for-typescript-component- Works with
- Cursor
- License
- CC0(as observed at the source)
- Version
- v1 · updated Nov 29, 2026
Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.
Are you the author?Claim this profileRequest removal
Use this rule
$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/vue-3-and-nuxt-3-coding-assistant-rules-for-typescript-components-t9uu/export/mdc" -o .cursor/rules/vue-3-and-nuxt-3-coding-assistant-rules-for-typescript-component.mdcThen open a new session; Cursor picks it up from .cursor/rules/.
Manual install
Save vue-3-and-nuxt-3-coding-assistant-rules-for-typescript-component.mdc as .cursor/rules/vue-3-and-nuxt-3-coding-assistant-rules-for-typescript-component.mdc for this project or ~/.cursor/rules/vue-3-and-nuxt-3-coding-assistant-rules-for-typescript-component.mdc for every project, then start a new session.
Rule
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
thiskeyword 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/useAsyncDatafor 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
typeoverinterfaceunless extending - Use
satisfiesoperator 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()overshallowMount()
Tailwind CSS
- Use utility classes directly in templates
- Extract repeated patterns to components, not CSS classes
- Use
@applysparingly — only in base styles - Dark mode: use
dark:variant
Do NOT
- Generate Options API code
- Use
anytype — useunknownand narrow - Put business logic in components
- Skip TypeScript on any file
- Use
v-htmlwith user input - Mutate props
- Use
var— alwaysconstorlet
No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.
Tried it
Reports from people who added this rule to their editor. They roll up into the badges above.
No one has filed a report yet. Try the prompt and be the first.
Related rules
- Agent role that turns TypeScript typing work into a tracked TODO plan
A senior TypeScript type-expert role prompt covering type design, generics, narrowing, and migration, with a required output of TODO_ts-type-expert.md containing checkable task items.
Coding · @wkaandemir
- Generate RAG-ready lifecycle phase documentation in Markdown
A meta-prompt that has the model write a production-grade, RAG-optimized Markdown artifact for a chosen enterprise lifecycle phase (01–16), with YAML frontmatter, phase-specific deliverables, and cross-cutting governance controls.
Data & Finance · @clicklynx2dspy
- Semiotic chart-building assistant rules for AI coding tools
Cursor rules guiding an AI assistant to build data visualizations with the Semiotic React library, covering chart choice, props, push API, geo, realtime, and common pitfalls.
Coding · @patrickjs
- Vue 3 and Pinia state management rules for coding assistants
Cursor rules that guide an assistant to write Vue 3 and TypeScript code using Pinia setup stores, correct state ownership, SSR-safe patterns, safe persistence, and store testing.
Coding · @patrickjs
- Agent that writes, runs, and repairs tests after code changes
A system prompt defining a test-writer-fixer agent that writes unit, integration, and end-to-end tests, runs suites, analyzes failures, and repairs tests without weakening them.
Coding · @ersinyilmaz
License: CC0v1 · published Nov 29, 2026
Comments
No comments yet. If you tried this prompt, say how it went.