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/zhangdszq/teamclaw/ui-cross-platformgit clone --depth 1 https://github.com/zhangdszq/teamclawWrote 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/zhangdszq/teamclaw/ui-cross-platform)<a href="https://agentmods.dev/rules/zhangdszq/teamclaw/ui-cross-platform"><img src="https://agentmods.dev/badge/rules/zhangdszq/teamclaw/ui-cross-platform.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.00494 |
| Opus 5 | $0.00000 | $0.00247 |
| Sonnet 5 | $0.00000 | $0.00099 |
| Haiku 4.5 | $0.00000 | $0.00049 |
Grade A, and why
ui-cross-platform 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 5d 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
UI 跨平台兼容(Windows & macOS)
修改任何 UI 界面时,必须同时考虑 Windows 和 macOS 的差异。
字体
/* ❌ BAD */
font-family: -apple-system, BlinkMacSystemFont;
/* ✅ GOOD */
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
滚动条
/* macOS 默认隐藏,Windows 始终显示,需统一样式 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }
窗口标题栏 / 拖拽区域
- macOS 交通灯按钮在左,Windows 关闭按钮在右
- 使用
-webkit-app-region: drag时,确保 Windows 下点击区域不遮挡交互元素 - Electron 中通过
process.platform判断平台,分别渲染自定义标题栏
const isMac = process.platform === 'darwin';
// macOS 不需要自定义最小化/最大化/关闭按钮
{!isMac && <WindowControls />}
间距与字号
- Windows 系统 DPI 缩放(125%、150%)可能导致布局错位,避免使用奇数像素值
- 关键布局使用
rem或flex,而非固定px
快捷键文案
/* ❌ BAD */
<span>⌘K</span>
/* ✅ GOOD */
const isMac = process.platform === 'darwin';
<span>{isMac ? '⌘K' : 'Ctrl+K'}</span>
检查清单
- 字体 fallback 包含 Segoe UI(Windows)
- 滚动条样式在两个平台均可见
- 标题栏/拖拽区域在 Windows 和 macOS 下布局正确
- 快捷键文案根据平台动态显示
- 在 125%/150% DPI 下验证布局不错位
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.
- 5d ago First seen · 64 lines · 494 tokens per session scan A d3245e66e3d6
ui-cross-platform is a cursor rule published in the GitHub repository zhangdszq/teamclaw (113 stars, last pushed 5mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 494 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-08-30.
Other cursor rules, from other repositories
prototype-previewer
Build interactive prototype reviewers with synced review notes and Figma capture pages.
figma-performance
Handling large documents efficiently in the Plugin API.
ant-design
本规范为在 React 应用程序中使用 Ant Design (antd) UI 库的项目制定最佳实践和编码标准。涵盖代码组织、性能、安全、测试和常见陷阱,确保应用程序的可维护性和高效性。.
7-day-nextjs-web-design-cursor
A seven-day design workflow for web products that will be built in Next.js.
clone-ai
Site Clone AI — website klonlama pipeline kuralları.
mermaid
Diagram Creator. Load when the user requests "Create a diagram".