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/n9e/feWrote 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/n9e/fe/tailwind-usage)<a href="https://agentmods.dev/rules/n9e/fe/tailwind-usage"><img src="https://agentmods.dev/badge/rules/n9e/fe/tailwind-usage/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/n9e/fe/tailwind-usage"><img src="https://agentmods.dev/badge/rules/n9e/fe/tailwind-usage.svg" alt="Reviewed on agentmods" width="80" 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.00593 |
| Opus 5.5 | $0.00000 | $0.00237 |
| Sonnet 5.5 | $0.00000 | $0.00119 |
| Haiku 4.5 | $0.00000 | $0.00059 |
Grade A, and why
tailwind-usage 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 1mo 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.
What it actually says
样式:Tailwind 优先 + 少量 Less
全局约定(颜色变量、最小改动等)见 .cursor/rules/app.mdc。
原则
- 能直接用 Tailwind 表达的(布局、间距、排版、圆角、常见交互态)→ 用 Tailwind。
- Tailwind 不划算或做不到的 → 少量 Less/CSS,选择器尽量收束在页面/模块根类名下。
- 同一视觉属性不要同时被 Tailwind 与 Less 争抢(避免难排查的覆盖问题)。
优先用 Tailwind
- 容器布局:
flex/grid/gap/ 内外边距 / 对齐。 - 业务界面:按钮、表单外观、文案层级、状态色(需与主题变量一致时,用已有 Tailwind 主题映射或 CSS 变量类,不硬编码色值)。
- 局部状态:
hover/focus/disabled等。 - 仅当前组件使用的展示类样式。
用 Less / 普通 CSS 更合适的情况
- 覆盖第三方组件内部结构(如 antd 深层节点、复杂表格头)。
- 全局或跨多页复用的 token、keyframes、无法用工具类清晰表达的动画。
- 强依赖复杂选择器(深层后代、兄弟组合、兼容向 hack 等)。
Less/CSS 侧要求:
- 选择器尽量局部化;嵌套不宜过深(≤3 层为宜)。
- 不复制一套与 Tailwind 等价的冗长规则。
实践技巧
- 可在
className中使用 antd 定向写法(如[&_.ant-input-affix-wrapper])以减少裸 Less。 - 单处
className过长时,抽成本地常量字符串或小组件,不要为此回到大段 Less。 - 改旧页面时优先增量迁移:先动当前需求触及的区块(如工具栏、列表行),再逐步收拢公共块。
自检
- 是否出现 Tailwind 与 Less 同时控制同一属性?
- 是否新增了大段可被 Tailwind 替代的 Less?
- 明暗主题下视觉是否与现有变量体系一致?
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.
- 1mo ago First seen · 47 lines · 0 tokens per session scan A fba48ff439bc
tailwind-usage is a cursor rule published in the GitHub repository n9e/fe (307 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 593 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-01.
Other cursor rules, from other repositories
external-scale
Source: docs/agents/external-scale.md Regenerate: npm run agents:sync -w packages/openbridge-webcomponents -->.
codex-premium-website-skills
Apply Codex Skills standards to frontend, website, motion, accessibility, QA, agent reasoning, and handoff work.
ui-components
USE WHEN: Building UI components, structuring layouts, and applying styles using Tailwind CSS.
mobile-first-ui
Mobile-first UI for settings, dialogs, and lists — smaller type, stacked layouts, nested add dialogs.
ui-motion-workflow
Orchestrate motion-aware UI work by sequencing direction, provider choice, implementation, and browser validation.
frontend-design-direction
Derive a brief-specific visual direction, token sketch, hierarchy, and signature element.