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.
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starterWrote 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.
[](https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/code-style)<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/code-style"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/code-style.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.06156 |
| Opus 5 | $0.00000 | $0.03078 |
| Sonnet 5 | $0.00000 | $0.01231 |
| Haiku 4.5 | $0.00000 | $0.00616 |
Grade A, and why
code-style 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.
How it starts
The opening of the file, as written. The whole thing — 315 lines — stays where its author put it; the contents beside it link to each section on GitHub.
工具鏈治理已拆到 [[code-style.toolchain]](動
vite.config.*/package.json/tsconfig*.json/.github/workflows/**/.husky/**/ 任何rc或 ignore 檔時適用): preset 是唯一設定入口、eslint / prettier 全面禁令、vite.config.ts必備欄位、CI 與 pre-commit 的命令邊界、ignore patterns 雙軌制。要改工具鏈設定卻沒看到那份規約時 MUST 先開它——本檔不重複那些條文,看不到不等於沒有。
Code Style — 寫 code 當下
風格本身(single quote / no semicolons / printWidth 等)由 vp fmt 機械保證,不需要記;
本檔只收機器擋不住、要寫的人自己遵守的部分。
適用範圍含 .vue SFC 的 <script setup lang="ts"> 區塊——下面三條語法限制在 SFC 內
一樣成立,Node 的 type stripping 與 erasableSyntaxOnly 對它們一視同仁。
新增腳本一律 TypeScript
每一個新增的 Node 腳本都 MUST 用 TypeScript 寫,不是只有「看起來比較複雜的那幾支」。既有 .mjs / .js 不強制回頭改寫——動到它的時候順手遷移,不動就留著。
副檔名一律用 .ts,不要用 .mts。
.mts 看起來更安全(它永遠是 ESM,而 .ts 的模組系統由最近的 package.json type 決定),但實測下來那個保證換不到東西、還會壞掉:Vite 的 config loader 無法 resolve .mts。consumer 的 vite.config.ts 一 import 散播進去的 .mts,vp check / build 就整個掛掉(UNRESOLVED_IMPORT,檔案明明存在)。2026-07-31 全 fleet 實測,10 個 consumer 同時中。
.ts 的前提是散播落點所在目錄的最近 package.json 必須是 "type": "module"。這個前提由 scripts/audit-governance-drift.ts 的 consumer-module-type check 機械驗,不是靠「現在剛好都是」。
三條語法限制
Node 的 type stripping 只抹除型別,不做語法轉換:
- NEVER 用
enum、namespace、constructor parameter properties、legacy decorators - type-only import MUST 寫成
import type { X } from '...' - import specifier MUST 帶真實副檔名(
import './foo.ts')。stripping 不做副檔名改寫,寫.mjs指向.ts檔會在 runtime 炸ERR_MODULE_NOT_FOUND- 例外:
nuxt.config.ts的相對 import 一律 extensionless(from './vendor/doctor-shared/preset')。判準是誰載這個檔,不是風格偏好:nuxt.config.ts由 Nuxt 的 config loader 載(解析得了 extensionless)且在nuxi typecheck的 program 內,而 TS 只有在allowImportingTsExtensions: true時才允許.ts結尾的 import——那個 flag Nuxt 4.5.x 的生成 tsconfig 有、4.4.x 沒有。帶副檔名在 4.4.x 上就是TS5097,pre-push 的 typecheck gate 直接擋死所有 push vite.config.ts反過來,MUST 保留.ts:vp走 Node 原生 ESM loader 載它,extensionless 會ERR_MODULE_NOT_FOUND;而它不在nuxi typecheck的 program 內,所以不觸發TS5097- 兩個 config 檔寫法不同不是不一致,是各自的載入器決定的。改任何一邊之前先問「誰載它、它在不在 typecheck program 內」,NEVER 為了看起來整齊把兩邊統一
- 例外:
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.
- today Changed · +1 lines 8f29c8b416f2
- 5d ago First seen · 314 lines · 0 tokens per session scan A 74706119a925
code-style is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 6,156 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.
Other cursor rules, from other repositories
astro-typescript-cursorrules-prompt-file
Cursor rules for Astro development with TypeScript integration.
qwik-tailwind-cursorrules-prompt-file
Cursor rules for Qwik development with Tailwind CSS integration.
rules.general
A project rule set for a Next.js application using TypeScript, React, Tailwind CSS, shadcn/ui, Radix UI, and Lucide icons.
00-persona
Senior TypeScript / React front-end persona & base behaviour.
bundling
The project uses a custom type bundling system to provide full TypeScript IntelliSense support in the Monaco editor for @bubblelab/bubble-core and its dependencies. This is necessary because Monaco cannot directly resolve workspace packages or external dependencies.
react-next-ts-cursor-rule
Next.js App Router, TypeScript, TanStack Query, Orval, and RHF+Zod frontend standards.