ui

ui is a cursor rule for Cursor from leaperone/MultiPost-Extension. It costs 0 tokens per session (706 once invoked), scanned A, original, Apache-2.0.

A set of interface and styling rules for React applications using HeroUI, Tailwind, and icon libraries. It also covers responsive layouts, accessibility, component structure, and loading or error states.

In plain words
What is it for?
Use it when implementing React components, Tailwind layouts, icons, accessible controls, responsive behavior, and typed component properties.
Why use it?
It gives developers consistent choices for building interfaces that adapt to screen size and support keyboard and screen-reader users.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

About the project

MultiPost-Extension is a browser extension that publishes text, images, videos, and other content to multiple social media platforms from one operation. Content creators use it to distribute a single piece of content across supported platforms, and web applications or scripts can call its extension or REST APIs.

leaperone/MultiPost-Extension · 3,278 stars · on GitHub · multipost.app

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/leaperone/multipost-extension/ui
Clone the repo
git clone --depth 1 https://github.com/leaperone/MultiPost-Extension

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/leaperone/multipost-extension/ui.svg)](https://agentmods.dev/rules/leaperone/multipost-extension/ui)
Your own site
<a href="https://agentmods.dev/rules/leaperone/multipost-extension/ui"><img src="https://agentmods.dev/badge/rules/leaperone/multipost-extension/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 706 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.00706
Opus 5 $0.00000 $0.00353
Sonnet 5 $0.00000 $0.00141
Haiku 4.5 $0.00000 $0.00071

Measured yesterday against content hash a4d0b524a071, 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 · 113 lines

What it actually says

UI and Styling Guidelines:

Component Library:

  • Use HeroUI and Tailwind for components and styling
  • Use lucide-react for icon. Sometime @iconify/react in code base, ignore it.
  • Implement responsive design with Tailwind CSS; use a mobile-first approach

Tailwind CSS 使用规范:

  • 采用移动优先的响应式设计
// ✅ 正确示例
<div className="w-full md:w-1/2 lg:w-1/3">

布局规范:

  • 使用 Flexbox 和 Grid 进行布局
  • 使用 gap 替代 margin 处理元素间距
// ✅ 正确示例
<div className="flex gap-4">
// ❌ 错误示例
<div className="flex [&>*]:mr-4">

响应式设计断点:

  • sm: 640px
  • md: 768px
  • lg: 1024px
  • xl: 1280px
  • 2xl: 1536px

可访问性规范:

  • 实现 ARIA 标签
  • 确保充足的颜色对比度
  • 支持屏幕阅读器
  • 添加键盘快捷键
// ✅ 正确示例
<button
  aria-label="关闭对话框"
  className="text-gray-500 hover:text-gray-700"
  onClick={onClose}
>

组件最佳实践:

  • 组件使用函数式声明
  • Props 使用 TypeScript 接口定义
  • 实现合适的加载和错误状态
interface ButtonProps {
  isLoading?: boolean;
  variant?: 'primary' | 'secondary';
  children: React.ReactNode;
}

function Button({ isLoading, variant = 'primary', children }: ButtonProps) {
  return (
    <button
      className={cn(
        'px-4 py-2 rounded-md',
        variant === 'primary' ? 'bg-primary-600' : 'bg-secondary-600',
        isLoading && 'opacity-50 cursor-not-allowed'
      )}
      disabled={isLoading}
    >
      {isLoading ? <LoadingSpinner /> : children}
    </button>
  );
}

性能优化:

  • 使用 React.memo() 优化渲染
  • 实现组件懒加载
  • 优化图片加载
// 组件懒加载
const HeavyComponent = dynamic(() => import('./HeavyComponent'), {
  loading: () => <LoadingSpinner />
});

// 图片优化
<Image
  src="/hero.jpg"
  alt="Hero image"
  width={1200}
  height={600}
  placeholder="blur"
  priority
/>

主题和暗色模式:

  • use bg-background and text-foreground
  • 使用 Tailwind 的暗色模式, 实现一致的颜色系统
// ✅ 正确示例
<div className="bg-background">
  <p className="text-foreground">
  • 使用语义化的颜色变量
// ✅ 正确示例
<button className="bg-primary-600 hover:bg-primary-700">
// ❌ 错误示例
<button className="bg-blue-600 hover:bg-blue-700">
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 · 113 lines · 706 tokens per session scan A a4d0b524a071

Subscribe to this mod's changes

ui is a cursor rule published in the GitHub repository leaperone/MultiPost-Extension (3,278 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 706 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.