nuxt-ui-conventions

nuxt-ui-conventions is a cursor rule for Cursor from YuDefine/nuxt-supabase-starter. It costs 0 tokens per session (1,317 once invoked), scanned A, original, MIT.

A project rule for keeping Nuxt UI components consistent with existing usage in the same codebase. Before adding a component, it requires checking similar components and following the most common prop combination.

In plain words
What is it for?
It helps developers choose consistent colors, variants, sizes, and other props for buttons, badges, inputs, tables, and similar Nuxt UI components.
Why use it?
Nuxt UI can be used correctly in several different ways, which can still make screens look inconsistent. This catches those differences while code is being written instead of during review.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit It helps developers choose consistent colors, variants, sizes, and other props for buttons, badges, inputs, tables, and similar Nuxt UI components.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/yudefine/nuxt-supabase-starter/nuxt-ui-conventions
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/YuDefine/nuxt-supabase-starter

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 nuxt-ui-conventions

README.md
[![agentmods](https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/nuxt-ui-conventions.svg)](https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/nuxt-ui-conventions)
Your own site
<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/nuxt-ui-conventions"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/nuxt-ui-conventions.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,317 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.01317
Opus 5 $0.00000 $0.00659
Sonnet 5 $0.00000 $0.00263
Haiku 4.5 $0.00000 $0.00132

Measured 3d ago against content hash f0ba6f58f946, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

nuxt-ui-conventions 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 3d 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.

template/.cursor/rules/nuxt-ui-conventions.mdc · 59 lines

How it starts

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

Nuxt UI 專案慣例一致性(實作階段強制)

核心命題:[[nuxt-ui-mcp]] 保證 API 正確性(prop / slot / theming key 存在、未過時),但不保證專案內慣例一致性(同語義角色用同 props 組合)。同一個 <UButton> 主動作在 A 頁面寫 color="primary" variant="solid"、B 頁面寫 color="green",兩者 API 都對但視覺漂移。本規約補上後者:讓慣例在實作當下對齊,不等 /commit review 或人工抓。

為何 impl-time:API 錯誤 typecheck / MCP 會擋,但慣例不一致 typecheck 抓不到、只有人 review 時肉眼比對才發現 —— 而 review 是最貴、最晚的關卡。把「寫前 grep 既有用法」做成 path-scoped impl-time 規約,讓一致性在最接近犯錯時點就對齊。這跟 [[nuxt-ui-native-picker-ban]](同樣 review-time → impl-time 提前)是同一個 spirit。

Hard rule

寫任何 Nuxt UI component(<UButton> / <UBadge> / <UInput> / <USelect> / <USwitch> / <UTable> / <UAlert> 等)之前MUST

  1. 判定語義角色:這個 component 在此處扮演什麼角色?(主動作 / 次要動作 / 破壞性動作 / 狀態標籤 / 表單欄位 / 表格行內操作 …)
  2. grep 既有用法grep -rn '<U<Component>' app/ --include='*.vue' | head -10,找同語義角色的既有 props 組合
  3. 複製多數寫法:用既有最多頁面採用的 props 組合,NEVER 憑直覺自己配 color / variant / size

不一致時

  • 既有頁面之間本身不一致 → 以最多頁面採用的寫法為準
  • 新增一種既有沒有的語義角色 → 採用該專案 design system 文件(若有,如 .impeccable.md Component Conventions 段)決定,並在 commit message / PR 留言說明新增的角色

禁止事項

  • NEVER 不 grep 就直接寫 Nuxt UI component 的 color / variant / size
  • NEVER 依賴預設值(「不寫 size 就是 md 吧」)— 顯式寫出,跟既有多數一致
  • NEVER 新增元件用法時跳過語義角色判定(「只是一個小 badge」)
  • NEVER 自行發明既有沒有的 props 組合而不 grep 驗證

雙生規約

  • API 正確性(props 存在 / 未過時):[[nuxt-ui-mcp]]
  • 原生 picker ban(同 impl-time enforcement spirit):[[nuxt-ui-native-picker-ban]]

靜默失效偵測(mechanical)

兩個靜默失效:UDashboardPanel 混用 named slot 與 stray default child 會讓 named slots 整組不 render;UTable cell slot 漏掉 -cell 後綴則不會成為 cell renderer,該欄靜默回退成預設渲染。兩者 typecheck、lint、console 都全綠。

兩條都由 clade 散播的 git hook gate 承載,consumer 端不需要做任何接線:

偵測器 pre-commit(staged) pre-push(全 repo)
scripts/checks/nuxt-ui-mixed-slot-detect.ts scripts/pre-commit/checks/nuxt-ui-mixed-slot.sh scripts/pre-push/checks/nuxt-ui-mixed-slot.sh
scripts/checks/utable-slot-detect.ts scripts/pre-commit/checks/utable-slots.sh scripts/pre-push/checks/utable-slots.sh

Read the full file on GitHub · 59 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. 3d ago First seen · 59 lines · 0 tokens per session scan A f0ba6f58f946

Subscribe to this mod's changes

nuxt-ui-conventions is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,317 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-09-03.