vue-3

vue-3 is a cursor rule for Cursor from Renvia-code/best-cursor-rules. It costs 0 tokens per session (1,758 once invoked), scanned A, original, CC0-1.0.

A set of coding guidelines for Vue 3, a JavaScript framework for building web interfaces. It recommends Composition API with script setup, Pinia for shared state, TypeScript, and Vite for building the app.

In plain words
What is it for?
Use it when building or reviewing Vue 3 applications with typed code, reusable components, and shared application state.
Why use it?
It gives the project consistent choices for writing components, managing data, and compiling the application.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when building or reviewing Vue 3 applications with typed code, reusable components, and shared application state.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/renvia-code/best-cursor-rules/vue-3
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Renvia-code/best-cursor-rules

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vue-3

README.md
[![agentmods](https://agentmods.dev/badge/rules/renvia-code/best-cursor-rules/vue-3/github.svg)](https://agentmods.dev/rules/renvia-code/best-cursor-rules/vue-3)
Your own site
<a href="https://agentmods.dev/rules/renvia-code/best-cursor-rules/vue-3"><img src="https://agentmods.dev/badge/rules/renvia-code/best-cursor-rules/vue-3/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vue-3

Your own site · 80×15
<a href="https://agentmods.dev/rules/renvia-code/best-cursor-rules/vue-3"><img src="https://agentmods.dev/badge/rules/renvia-code/best-cursor-rules/vue-3.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,758 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01758
Opus 5.5 $0.00000 $0.00703
Sonnet 5.5 $0.00000 $0.00352
Haiku 4.5 $0.00000 $0.00176

Measured 3mo ago against content hash 8d26fcd311fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

vue-3 scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(url)
rules/frameworks/vue-3.mdc · 365 lines

How it starts

The opening of the file, as written. The whole thing — 365 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Vue 3 Best Practices

Overview

Aspect Recommendation
API Style Composition API with <script setup>
State Management Pinia
Language TypeScript
Build Tool Vite

✅ DO: Use <script setup> syntax

<script setup lang="ts">
import { ref, computed } from 'vue'
import type { User } from '@/types'

// Props
const props = defineProps<{
  user: User
  showEmail?: boolean
}>()

// Emits
const emit = defineEmits<{
  (e: 'update', value: string): void
  (e: 'delete'): void
}>()

// Reactive state
const count = ref(0)
const doubled = computed(() => count.value * 2)

// Methods
function increment() {
  count.value++
}
</script>

<template>
  <div>
    <h2>{{ user.name }}</h2>
    <p v-if="showEmail">{{ user.email }}</p>
    <button @click="increment">Count: {{ count }}</button>
  </div>
</template>

Props and Emits

Props with Defaults

<script setup lang="ts">
interface Props {
  title: string
  count?: number
  items?: string[]
}

const props = withDefaults(defineProps<Props>(), {
  count: 0,
  items: () => []
})
</script>

Typed Emits

<script setup lang="ts">
const emit = defineEmits<{
  (e: 'change', id: number): void
  (e: 'update:modelValue', value: string): void
}>()

function handleChange(id: number) {
  emit('change', id)
}
</script>

Reactivity

ref vs reactive

import { ref, reactive } from 'vue'

// ✅ Use ref for primitives
const count = ref(0)
const name = ref('')

// ✅ Use reactive for objects (optional)
const state = reactive({
  users: [],
  loading: false
})

// ✅ Access ref values with .value in script
count.value++

// Template auto-unwraps refs
// <span>{{ count }}</span>  ← No .value needed

Computed Properties

<script setup lang="ts">
import { ref, computed } from 'vue'

const firstName = ref('John')
const lastName = ref('Doe')

// Read-only computed
const fullName = computed(() => `${firstName.value} ${lastName.value}`)

// Writable computed
const fullNameWritable = computed({
  get: () => `${firstName.value} ${lastName.value}`,
  set: (value: string) => {
    const [first, last] = value.split(' ')
    firstName.value = first
    lastName.value = last
  }
})
</script>

Read the full file on GitHub · 365 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 365 lines · 0 tokens per session scan A 8d26fcd311fe

Subscribe to this mod's changes

vue-3 is a cursor rule published in the GitHub repository Renvia-code/best-cursor-rules (13 stars, last pushed 12mo ago), licensed CC0-1.0. It costs nothing until one of its globs matches a file; then it loads 1,758 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

vue-3 compared with cursor rules from other repositories

vue-3 next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
vue-3Renvia-code/best-cursor-rulesCursor rule1312mo agoCC0-1.0A0Cursor
svelte-5-vs-svelte-4-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A653Cursor
sveltekit-typescript-guide-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A189Cursor
javascript-astro-tailwind-css-cursorrules-prompt-fPatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A929Cursor
sveltekit-tailwindcss-typescript-cursorrules-prompPatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A1,077Cursor
sveltekit-restful-api-tailwind-css-cursorrules-proPatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A793Cursor
sveltePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A438Cursor