ui

ui is a cursor rule for Cursor from AIDotNet/koala-ai. It costs 0 tokens per session (745 once invoked), scanned A, original, Apache-2.0.

A set of instructions for designing and building polished React user interfaces, including layouts, styling, animation, and interaction behavior. React is a JavaScript library for building interfaces from reusable components.

In plain words
What is it for?
It is for creating React components with Ant Design and CSS, matching reference animations, checking file dependencies, and documenting the resulting design and resources.
Why use it?
It gives an agent a structured process for turning a visual example into maintainable, responsive code instead of handling design and implementation separately.

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/aidotnet/koala-ai/ui
Clone the repo
git clone --depth 1 https://github.com/AIDotNet/koala-ai

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 ui

README.md
[![agentmods](https://agentmods.dev/badge/rules/aidotnet/koala-ai/ui.svg)](https://agentmods.dev/rules/aidotnet/koala-ai/ui)
Your own site
<a href="https://agentmods.dev/rules/aidotnet/koala-ai/ui"><img src="https://agentmods.dev/badge/rules/aidotnet/koala-ai/ui.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 745 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00745
Opus 5 $0.00000 $0.00373
Sonnet 5 $0.00000 $0.00149
Haiku 4.5 $0.00000 $0.00075

Measured yesterday against content hash 606fd40f8f04, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ui 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 yesterday.

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/ui.mdc · 90 lines

What it actually says

高质量用户界面设计与实现指南

1. 任务概述

2. 实施流程

  1. 代码实现阶段:

    • 基于UI设计进行React组件化开发
    • 应用Ant Design组件和CSS进行精确样式控制
    • 实现示例图中的动画效果和交互行为
  2. 文件依赖分析与优化:

    • 分析代码文件依赖关系
    • 使用提供的文件操作函数进行必要修改
    • 重构代码提高可维护性和性能
  3. 资源管理:

    • 使用高质量、合规的在线图片资源(如Unsplash、Pexels)

3. 输出要求

<output_requirements>

  1. UI设计文档:

    • 详细布局说明
    • 配色方案
    • 关键组件描述
  2. React代码实现:

    • 符合设计规范的组件结构
    • 必要的CSS样式定义(特别是动画和过渡效果)
    • Ant Design组件使用及自定义配置说明
  3. 资源清单:

    • 外部图片资源列表及来源
  4. 动画实现文档:

    • 详细的动画效果实现方法
    • 关键代码示例 </output_requirements>

4. 动画实现指南

<animation_implementation>

  1. 动画效果分析:

    • 识别所有动画类型(淡入淡出、滑动、缩放等)
    • 选择最佳实现方法(CSS动画、React Transition Group、Ant Motion)
  2. 实现要求:

    • 确保动画流畅性和用户体验
    • 考虑跨设备和浏览器兼容性
    • 提供可配置参数(持续时间、缓动函数等)
  3. 优化建议:

    • 使用硬件加速技术(如transform)提高性能
    • 实现动画的启用/禁用选项,考虑用户偏好 </animation_implementation>

5. 附加说明

<additional_instructions>

  1. 设计与开发原则:

    • 始终考虑响应式布局和跨设备兼容性
    • 注重代码可维护性、可扩展性和性能优化
    • 严格遵循React和Ant Design的最佳实践和设计模式
  2. 实现重点:

    • 精确还原示例图中的动画细节
    • 每个开发阶段后进行自我评估,确保与设计目标一致
  3. 样式规范:

    • 优先使用Ant Design提供的样式系统
    • 自定义样式时,遵循Ant Design的设计语言 </additional_instructions>
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. yesterday First seen · 90 lines · 745 tokens per session scan A 606fd40f8f04

Subscribe to this mod's changes

ui is a cursor rule published in the GitHub repository AIDotNet/koala-ai (480 stars, last pushed 1y ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 745 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-04.