teek-design-vue3: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from Kele-Bingtang/teek-design-vue3. It costs 977 tokens per session, scanned A, original, MIT.

A set of coding rules for a Vue 3 project written in TypeScript. It covers component structure, type definitions, imports, reusable logic, file locations, and naming.

In plain words
What is it for?
Use it when adding or reviewing Vue components, TypeScript types, styles, imports, and reusable composable functions.
Why use it?
It gives contributors one shared way to organise and write code, reducing inconsistent components, misplaced files, and unclear imports.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is Kele-Bingtang/teek-design-vue3's own configuration. It tells Cursor how to work on teek-design-vue3 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything teek-design-vue3 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Kele-Bingtang/teek-design-vue3. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Kele-Bingtang/teek-design-vue3/main/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/Kele-Bingtang/teek-design-vue3

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 cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/kele-bingtang/teek-design-vue3/cursorrules.svg)](https://agentmods.dev/rules/kele-bingtang/teek-design-vue3/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/kele-bingtang/teek-design-vue3/cursorrules"><img src="https://agentmods.dev/badge/rules/kele-bingtang/teek-design-vue3/cursorrules.svg" alt="Measured on agentmods" height="20"></a>
Per session 977 This file is loaded in full into every session.
When invoked 977 The same file — it is already loaded in full.
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.00977 $0.00977
Opus 5 $0.00489 $0.00489
Sonnet 5 $0.00195 $0.00195
Haiku 4.5 $0.00098 $0.00098

Measured yesterday against content hash 8a0368c3e2bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

cursorrules 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 yesterday.

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.

.cursorrules · 57 lines

What it actually says

代码编写规范

组件格式

  • 使用 <script setup lang="ts"> 语法
  • 使用 defineOptions({ name: "Xxx" }) 定义组件名
  • 使用 const ns = useNamespace("xx-xx") 创建命名空间
  • 样式文件使用 @use "./index" 引入
  • 使用 import { useNamespace } from "@/composables" 创建命名空间

类型定义规范

  • Props 和 Emits 使用 TypeScript interface 定义
  • 所有函数参数都要加类型注解
  • 类型文件放在组件同级目录的 types.ts

导入规范

  1. 先引入所有 type 类型(按照导入规范顺序引入,不允许类型和函数的引入混杂在一起)
  2. 引入第三方依赖(Vue 相关生态优先,如 vue、vue-router、vuex、vue-i18n、vue-use,然后是组件库如 Element Plus,@element-plus/icons-vue,最后是第三方插件)
  3. 引入项目目录的其他依赖(@/路径,路径按照 src 目录结构顺序引入)
  4. 引入项目目录的其他组件(@/路径,路径按照 src 目录结构顺序引入)
  5. 引入相对路径的依赖(@/路径,路径按照 src 目录结构顺序引入)
  6. 引入相对路径的组件(@/路径,路径按照 src 目录结构顺序引入)
  7. 直接引入第三方库(如 import "vue-cropper/dist/index.css")
  8. 直接引入绝对路径(如 import "@/common/styles/common/var.scss")
  9. 直接引入相对路径(如 import "./index.scss")

组件内 Composables 使用

  • 不推荐直接在组件中写响应式变量、computed、watch、function、生命周期
  • 将关联性高的代码放到 function useXx 里然后暴露出来使用
  • 使用 defineModel 代替 props.modelValue

文件组织

  • 通用组件放在 src/components/ 目录下,按功能分子文件夹
  • 通用可复用逻辑放在 src/composables/
  • 通用样式放在 src/common/styles/
  • 通用 API 请求相关文件放在 src/common/api/
  • 通用工具函数放在 src/common/utils/

命名规范

  • 所有文件使用 kebab-case 风格
  • 引入组件的命名为 Camel-Case,如 import ProTable from "pro-table.vue"
  • TypeScript 接口和类型用 PascalCase
  • 每个组件目录下用 index.ts 统一导出

UI 设计规范

  • 使用 light.scssdark.scss 的 CSS 变量来统一颜色风格
  • 使用 varCssvarCssEl 函数引用 CSS 变量(cssVar 引入 --tk- 开头,cssVarEl 引入 --el- 开头)
  • 遵循 BEM 规范,优先使用 useNamespace 函数(如 ns.b()ns.e()ns.em()ns.is()ns.has()
  • 组件的样式优先创建并使用 .scss 文件,且在同级 .vue 文件下创建同名的 .scss 文件
  • 使用 bem.scss 的混合宏(如 @include b(xx) { @include e(xx) { @include m(xx) { @include is(xx) { @include has(xx) { } } } } }),如果 @include e(xx){} 里使用 @include e{} 则第二个参数加上 true,即 @include e(xx, true){},否则 @include e(xx){} 建议同级写
  • 优先使用项目定义的原子类,在 atomic.scss 中定义
  • 请适配移动端,部分移动端宽度变量在 var.scss 中定义

代码结构

  • props、emits、composables 写在 script 顶部
  • 适当换行,如变量与函数之间,script、template、style 标签之间必须换行
  • 使用 ESLint 和 Prettier 保证代码风格统一
  • composable 和函数用 JSDoc 或 TypeScript 注释说明用途
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. yesterday First seen · 57 lines · 977 tokens per session scan A 8a0368c3e2bd

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository Kele-Bingtang/teek-design-vue3 (276 stars, last pushed 8d ago), licensed MIT. It adds 977 tokens to every session, about $0.0049 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-09-04.