vue

vue is a cursor rule for Cursor from un-pany/v3-admin-vite. It costs 816 tokens per session, scanned A, original, MIT.

A set of coding rules for Vue, a JavaScript framework for building web interfaces. It covers component structure, naming, TypeScript usage, reactive data, properties, and routes.

In plain words
What is it for?
It is for guiding Vue development with single-file components, the Composition API, TypeScript, naming patterns, property definitions, and route organisation.
Why use it?
It gives developers consistent conventions for organising Vue code and naming files, components, pages, and reusable functions.

Cursor rule for Cursor

About the project

V3 Admin Vite is a Vue 3 administrative dashboard template built with Vite, TypeScript, Element Plus, Pinia, Vue Router, and Axios. Developers use it as a starting point for creating web-based administration interfaces, and it is designed to support AI-assisted coding tools. The catalogue entries are skills, rules, and instructions for working with the template.

un-pany/v3-admin-vite · 7,053 stars · on GitHub · un-pany.github.io

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.

agentmods
npx agentmods add rules/un-pany/v3-admin-vite/vue
Clone the repo
git clone --depth 1 https://github.com/un-pany/v3-admin-vite

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/un-pany/v3-admin-vite/vue.svg)](https://agentmods.dev/rules/un-pany/v3-admin-vite/vue)
Your own site
<a href="https://agentmods.dev/rules/un-pany/v3-admin-vite/vue"><img src="https://agentmods.dev/badge/rules/un-pany/v3-admin-vite/vue.svg" alt="Measured on agentmods" height="20"></a>
Per session 816 This file is loaded in full into every session.
When invoked 816 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.00816 $0.00816
Opus 5 $0.00408 $0.00408
Sonnet 5 $0.00163 $0.00163
Haiku 4.5 $0.00082 $0.00082

Measured 6d ago against content hash 01f150298a53, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 6d 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/vue.mdc · 67 lines

What it actually says

Vue 开发规范

代码风格

  • 组件: 使用单文件组件 (SFC)
  • API: 使用组合式 API (Composition API) 并搭配 <script setup> 语法糖
  • 语法: 没有特殊说明则使用 TS 进行开发 <script setup lang="ts">

命名

  • 组件 (Component) 命名: 始终采用单词大写开头 (PascalCase) 的命名方式, 并且避免与 HTML 元素冲突
  • 组件 (Component) 命名示例: 以全局的 SearchMenu 组件 @@/components/SearchMenu/index.vue@@/components/SearchMenu/Modal.vue 作为参考,注意 index 是不需要遵循大驼峰格式的
  • 页面 (Page) 命名: 始终采用短横线连接 (kebab-case) 的命名方式
  • 页面 (Page) 命名示例: 以增删改查示例页面作为参考 @/pages/demo/element-plus/index.vue
  • 组合式函数 (Composable) 命名: 始终采用小驼峰 (camelCase) 的命名方式
  • 组合式函数 (Composable) 命名示例: 以水印组合式函数作为参考 @@/composables/useWatermark.ts
  • Props 命名: 在声明 prop 的时候,其命名应该始终采用小驼峰 (camelCase),而在模板和 JSX 中应该始终采用短横线连接 (kebab-case)
  • Props 命名示例: 声明时 const { isActive = false } = defineProps<Props>() 和传递时 <Demo :is-active="true" />
  • TS 或 JS 文件命名: 始终采用短横线连接 (kebab-case) 的命名方式
  • TS 或 JS 文件命名示例: @@/constants/app-key.ts

API

  • 定义响应式变量时优先使用 ref 而非 reactive
  • 复杂的模板表达式则应该重构为计算属性或方法
  • 尽量避免侦听器的循坏触发,防止进入死循环

Props

  • Prop 定义应该尽量详细,包括类型、必传、默认值
  • 如果是使用了 TS 那么应该使用「基于类型的声明」,默认值则使用「响应式 Props 解构」,示例: const { isActive = false } = defineProps<Props>()

路由

  • 对应目录: @/router
  • 路由名称必须与组件名称保持一致
  • 路由守卫逻辑缜密,非必要不修改

状态管理

  • 对应目录: @/pinia
  • 按模块划分 Store
  • 优先使用 Setup Store 语法,而不是 Option Store 语法
  • 避免无脑使用全局状态管理

样式

  • 优先使用 Scoped CSS,示例: <style scoped lang="scss">
  • 尽可能避免使用 !important
  • 如果涉及到多主题,请考虑使用 CSS 变量,示例: @@/assets/styles/variables.css

其他

  • 避免直接操作 DOM
  • 尽可能编写原子化组件
  • 使用 v-for 时必须提供唯一的 key (不要轻易使用数组下标 index 当做 key)
  • 不要在同一元素上同时使用 v-ifv-for

参考示例文件

src/pages/demo/element-plus/index.vue

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. 6d ago First seen · 67 lines · 816 tokens per session scan A 01f150298a53

Subscribe to this mod's changes

vue is a cursor rule published in the GitHub repository un-pany/v3-admin-vite (7,053 stars, last pushed 1mo ago), licensed MIT. It adds 816 tokens to every session, about $0.0041 per session on Opus 5. 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-30.