vue

vue is a cursor rule for Cursor from mywand/cusrsor-do-it. It costs 0 tokens per session (2,474 once invoked), scanned A, original, Apache-2.0.

Coding rules for Vue 3, a JavaScript framework for building web interfaces, including component names, file structure, TypeScript usage, state, and API handling.

In plain words
What is it for?
They are for writing Vue 3 components, defining inputs and events, loading data, managing state, and keeping component code testable.
Why use it?
They give Vue developers a consistent way to organise components and manage data, loading states, and errors.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit They are for writing Vue 3 components, defining inputs and events, loading data, managing state, and keeping component code testable.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mywand/cusrsor-do-it/vue
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/mywand/cusrsor-do-it

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/mywand/cusrsor-do-it/vue/github.svg)](https://agentmods.dev/rules/mywand/cusrsor-do-it/vue)
Your own site
<a href="https://agentmods.dev/rules/mywand/cusrsor-do-it/vue"><img src="https://agentmods.dev/badge/rules/mywand/cusrsor-do-it/vue/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

Your own site · 80×15
<a href="https://agentmods.dev/rules/mywand/cusrsor-do-it/vue"><img src="https://agentmods.dev/badge/rules/mywand/cusrsor-do-it/vue.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 2,474 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.02474
Opus 5.5 $0.00000 $0.00990
Sonnet 5.5 $0.00000 $0.00495
Haiku 4.5 $0.00000 $0.00247

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

Security

Grade A, and why

vue scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/frameworks/vue.mdc · 469 lines

How it starts

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

最近更新: 2025-10-10

Vue 3 专属实践规范

1. 组件规范

1.1 组件命名

<!-- 使用 PascalCase 命名组件文件 -->
<!-- UserProfile.vue -->
<template>
  <div class="user-profile">
    <!-- 内容 -->
  </div>
</template>

<script setup lang="ts">
// 组件逻辑
</script>

1.2 组件结构

<template>
  <!-- 模板内容 -->
</template>

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

// 2. Props 定义
interface Props {
  userId: number
  showDetails?: boolean
}
const props = withDefaults(defineProps<Props>(), {
  showDetails: false
})

// 3. Emits 定义
interface Emits {
  update: [user: User]
  delete: [id: number]
}
const emit = defineEmits<Emits>()

// 4. 响应式数据
const user = ref<User | null>(null)
const loading = ref(false)

// 5. 计算属性
const displayName = computed(() => 
  user.value ? `${user.value.firstName} ${user.value.lastName}` : ''
)

// 6. 方法
const loadUser = async () => {
  loading.value = true
  try {
    // 加载用户数据
  } finally {
    loading.value = false
  }
}

// 7. 生命周期
onMounted(() => {
  loadUser()
})
</script>

<style scoped>
/* 样式 */
</style>

2. Composition API

2.1 响应式数据

import { ref, reactive, computed } from 'vue'

// 使用 ref 处理基本类型
const count = ref(0)
const message = ref('')

// 使用 reactive 处理对象
const state = reactive({
  user: null as User | null,
  loading: false,
  error: ''
})

// 计算属性
const doubleCount = computed(() => count.value * 2)

// 只读计算属性
const userDisplayName = computed(() => 
  state.user ? `${state.user.name} (${state.user.email})` : '未登录'
)

2.2 组合式函数 (Composables)

// composables/useUser.ts
import { ref, computed } from 'vue'
import type { User } from '@/types'

export function useUser() {
  const user = ref<User | null>(null)
  const loading = ref(false)
  const error = ref('')

  const isLoggedIn = computed(() => user.value !== null)

  const login = async (credentials: LoginCredentials) => {
    loading.value = true
    error.value = ''
    
    try {
      const response = await authApi.login(credentials)
      user.value = response.user
    } catch (err) {
      error.value = err instanceof Error ? err.message : '登录失败'
    } finally {
      loading.value = false
    }
  }

  const logout = () => {
    user.value = null
    // 清理相关状态
  }

  return {
    user: readonly(user),
    loading: readonly(loading),
    error: readonly(error),
    isLoggedIn,
    login,
    logout
  }
}

Read the full file on GitHub · 469 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 · 469 lines · 0 tokens per session scan A 802b42cc1e18

Subscribe to this mod's changes

vue is a cursor rule published in the GitHub repository mywand/cusrsor-do-it (2 stars, last pushed 10mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,474 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

vue compared with cursor rules from other repositories

vue next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
vuemywand/cusrsor-do-itCursor rule210mo agoApache-2.0A0Cursor
vue-typescript-patternssoaring-xiongkulu/easyaiotCursor rule769todayMITA381Cursor
svelte-mcp-toolssveltejs/ai-toolsCursor rule349yesterdayMITA297Cursor
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
componentsbebiksior/httpworkbenchCursor rule503d agoMITA474Cursor
frontendgabrielmoreira/agent-skills-mirrorCursor rule24todayMITA0Cursor