code

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

A set of coding rules for Vue 3 components written with TypeScript. It covers component structure, typed properties and events, reusable composables, and stylesheet conventions.

In plain words
What is it for?
Use it when writing or reviewing Vue 3 components that use TypeScript, properties, events, composables, and scoped Sass styles.
Why use it?
It gives a team a consistent way to organise Vue components and their shared logic.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

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/kele-bingtang/teek-design-vue3/code
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 code

README.md
[![agentmods](https://agentmods.dev/badge/rules/kele-bingtang/teek-design-vue3/code.svg)](https://agentmods.dev/rules/kele-bingtang/teek-design-vue3/code)
Your own site
<a href="https://agentmods.dev/rules/kele-bingtang/teek-design-vue3/code"><img src="https://agentmods.dev/badge/rules/kele-bingtang/teek-design-vue3/code.svg" alt="Measured on agentmods" height="20"></a>
Per session 902 This file is loaded in full into every session.
When invoked 902 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.00902 $0.00902
Opus 5 $0.00451 $0.00451
Sonnet 5 $0.00180 $0.00180
Haiku 4.5 $0.00090 $0.00090

Measured today against content hash 18b4fc350418, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

code 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 today.

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/code.mdc · 150 lines

How it starts

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

组件格式

<script setup lang="ts">
import xxx from "xx";

defineOptions({ name: "Xxx" });

const ns = useNamespace("xx-xx");
</script>

<template>
  <div :class="ns.b()"></div>
</template>

<style scoped lang="scss">
@use "./index";
</style>
@use "@styles/mixins/bem" as *;

@include b(xx-xx) {
}

带有 props、emits 的写法

<script setup lang="ts">
defineOptions({ name: "Demo" });

// 按照这种写法
interface DemoProps {
  modelValue: string;
}

// 按照这种写法
interface DemoEmits {
  submit: [value: string];
}

const props = defineProps<DemoProps>();
const emit = defineEmits<DemoEmits>();

const ns = useNamespace("login");
</script>

<template>
  <div></div>
</template>

<style scoped lang="scss">
@use "./index";
</style>

组件里使用 composables

不推荐 propsemits响应式变量computedwatchfunction生命周期 的结构写法。

请使用可复用逻辑(composables)写法,即将关联性高的代码放到 function useXx 里然后暴露出来使用。

<script setup lang="ts">
import http from "xx";

defineOptions({ name: "Demo" });

interface DemoProps {
  params: string;
}

interface DemoEmits {
  submit: [value: string];
}

const props = defineProps<DemoProps>();
const emit = defineEmits<DemoEmits>();

const ns = useNamespace("login");

const username = ref("");
const password = ref("");

const { data } = useInitData();

// 核心请看这个 composables
function useInitData() {
  const data = ref<Recore<string, any>[]>([]);

  const request = async () => {
    // 请求数据复制给 data
    const result = await http.get(url, props.params);
    data.value = result.data;
  };

  return { data };
}
</script>

<template>
  <div :class="ns.b()">
    <input v-model="username" />
    <input v-model="password" />
  </div>
</template>

<style scoped lang="scss">
@use "./index";
</style>

类型引入规范

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

Read the full file on GitHub · 150 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. today First seen · 150 lines · 902 tokens per session scan A 18b4fc350418

Subscribe to this mod's changes

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