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.
npx agentmods add rules/dcloudio/uni-app-x-ai-rules/ucssgit clone --depth 1 https://github.com/dcloudio/uni-app-x-ai-rulesWrote 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/dcloudio/uni-app-x-ai-rules/ucss)<a href="https://agentmods.dev/rules/dcloudio/uni-app-x-ai-rules/ucss"><img src="https://agentmods.dev/badge/rules/dcloudio/uni-app-x-ai-rules/ucss.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 | $0.00000 | $0.00544 |
| Opus 5 | $0.00000 | $0.00272 |
| Sonnet 5 | $0.00000 | $0.00109 |
| Haiku 4.5 | $0.00000 | $0.00054 |
Grade A, and why
ucss 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 2d 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
description: Uni-App X implements a subset of Web CSS on the App platform globs: .css,.ucss,.uvue,.scss,.less,. sass alwaysApply: false
css rules
ucss是css的子集,但可以跨平台使用。除了浏览器之外,还支持App原生平台。
布局规范
- 禁用浮动、网格等布局,仅使用flex布局或绝对定位。
- flex布局默认方向为垂直(通过 flex-direction:column 实现)。
选择器规则
- 仅支持基本的类选择器 (.class),禁止使用其他选择器。
- 类名必须符合 [A-Za-z0-9_-]+ 规范,禁止使用特殊字符(例如 @class)。
文字样式规则
- 文字内容需放置在组件 或 中。文字类样式(color、font-size)只能设置在 或 组件上。 其他组件(如)禁止设置文本相关样式。
- 文字样式不继承。
- 禁用继承相关关键字,例如 inherit 和 unset。
层级控制
- z-index 仅对同级兄弟节点生效。
- absolute 固定位与文档流分离,不支持分层覆盖。
长度单位
- 仅支持px、rpx、百分比。字体的line-height支持em。不能使用其他单位,如vh。
- 除非width需要根据屏幕宽度而变化才使用rpx单位。其他场景不使用rpx单位。
- 除非长度单位需要根据父容器大小而变化才使用百分比单位。其他场景不使用rpx单位。
at-rules
- 仅支持
@font-face、@import,不使用其他at-rules。 - 如需使用
@media适配不同屏幕,改用 uts 代码实现,先通过APIuni.getWindowInfo获取屏幕宽度, 再通过代码进行适配。 - 如需使用
@media适配暗黑模式, 改用 uts 代码 和 css变量 实现。 - 如需使用
@keyframes,改为通过UniElement对象的animate方法实现相同逻辑。
css function
- 仅支持 url()、rgb()、rgba()、var()、env(),不使用其他css方法。
样式作用范围规则
- 不使用css scoped。
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.
- 2d ago First seen · 43 lines · 544 tokens per session scan A b6e6d557eca8
ucss is a cursor rule published in the GitHub repository dcloudio/uni-app-x-ai-rules (30 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 544 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
css-styling
CSS architecture, tokens, and styling rules for this Docusaurus site. Apply when creating or modifying components, styles, layouts, or any UI-facing code.
general
Wonder Blocks design system conventions, component patterns, and coding standards.
frontend
Demo Shop frontend guidance.
clean-dom
HTML semantic elements, DOM structure, responsive images, forms, CSS, and Tailwind best practices with accessibility a11y.
ui-components
USE WHEN: Building UI components, structuring layouts, and applying styles using Tailwind CSS.
ui-components
USE WHEN: Building UI components, structuring layouts, and applying styles using Tailwind CSS.