frontend-ui-components

frontend-ui-components is a cursor rule for Cursor from OpenBMB/StaffDeck. It costs 0 tokens per session (595 once invoked), scanned A, original, Apache-2.0.

A set of rules for building user-interface components in the frontend-enterprise project, including a preference for shadcn/ui, a collection of reusable interface components.

In plain words
What is it for?
Use it when creating or reviewing frontend components, layouts, and other parts of an application's user interface.
Why use it?
It keeps new interface code consistent with the project's existing component conventions.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when creating or reviewing frontend components, layouts, and other parts of an application's user interface.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/openbmb/staffdeck/frontend-ui-components
About the project

StaffDeck is an enterprise platform for creating and managing digital employees that represent professional knowledge, business processes, and decision rules. Organizations use it to automate repetitive work and preserve expertise as reusable digital workers. The catalogue includes skills, agents, rules, and instructions for the platform.

OpenBMB/StaffDeck · 2,376 stars · on GitHub · staffdeck.openbmb.cn

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.

Clone the repo
git clone --depth 1 https://github.com/OpenBMB/StaffDeck

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 frontend-ui-components

README.md
[![agentmods](https://agentmods.dev/badge/rules/openbmb/staffdeck/frontend-ui-components/github.svg)](https://agentmods.dev/rules/openbmb/staffdeck/frontend-ui-components)
Your own site
<a href="https://agentmods.dev/rules/openbmb/staffdeck/frontend-ui-components"><img src="https://agentmods.dev/badge/rules/openbmb/staffdeck/frontend-ui-components/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.

agentmods 80×15 button for frontend-ui-components

Your own site · 80×15
<a href="https://agentmods.dev/rules/openbmb/staffdeck/frontend-ui-components"><img src="https://agentmods.dev/badge/rules/openbmb/staffdeck/frontend-ui-components.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 595 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00595
Opus 5.5 $0.00000 $0.00238
Sonnet 5.5 $0.00000 $0.00119
Haiku 4.5 $0.00000 $0.00060

Measured 3mo ago against content hash 5109f02cfac7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

frontend-ui-components 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 3mo 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.

.cursor/rules/frontend-ui-components.mdc · 66 lines

What it actually says

前端组件规范(frontend-enterprise)

新页面或重构时,优先使用 shadcn/ui 组件,而非新增 Ant Design 组件。

  • shadcn/ui 组件位于 @/components/ui,通过 @/components/ui 桶文件统一导入。
  • 类名合并使用 cn()(来自 @/lib/utils)。
  • 通知使用 sonner 的 toast,而非 antd 的 message。
  • 现有页面中的 Ant Design 组件保持不变,除非本次任务明确要求重构;不要为了替换而替换。
// ✅ GOOD — 新页面使用 shadcn/ui
import { Button, Card, CardContent, CardHeader, CardTitle, Input } from '@/components/ui';
import { toast } from 'sonner';
import { cn } from '@/lib/utils';

// ❌ AVOID — 新页面不再新增 Ant Design 组件
import { Button, Card, Input, message } from 'antd';

新增尚未安装的 shadcn 组件:

cd frontend-enterprise && npx shadcn@latest add <component> -y

图标规范

页面中使用的各种 icon,先在 src/assets/ 下生成 SVG 图标文件,再引入页面中使用,不要在 JSX 里内联手写 SVG 路径。

// ✅ GOOD — 先落到 assets,再作为组件/资源引入
import ArrowIcon from '@/assets/icons/arrow.svg?react';
// 或统一封装后按名引用
import { StaffdeckIcon } from '@/components/StaffdeckIcon';

<ArrowIcon className="size-4" />;

// ❌ AVOID — 在页面里内联手写 SVG
<svg viewBox="0 0 24 24"><path d="M..." /></svg>;

枚举规范

考虑后续维护,状态、类型等有限取值的字段应先在 enums 中定义枚举/常量,再引用,避免在业务代码里散落魔法字符串。

// ✅ GOOD — 先在 enums 中集中定义
// src/enums/agentStatus.ts
export enum AgentStatus {
  Active = 'active',
  Onboarding = 'onboarding',
  Archived = 'archived',
}

if (agent.status === AgentStatus.Active) { /* ... */ }

// ❌ AVOID — 业务代码里散落魔法字符串
if (agent.status === 'active') { /* ... */ }
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. 3mo ago First seen · 66 lines · 0 tokens per session scan A 5109f02cfac7

Subscribe to this mod's changes

frontend-ui-components is a cursor rule published in the GitHub repository OpenBMB/StaffDeck (2,376 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 595 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.

Related

frontend-ui-components compared with cursor rules from other repositories

frontend-ui-components next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
frontend-ui-componentsOpenBMB/StaffDeckCursor rule2.4kyesterdayApache-2.0A0Cursor
explorer-interface-briefmohitagw15856/pm-claude-skillsCursor rule1.6kyesterdayMITA91Cursor
prototype-previewerchocpink123/prototype-previewer-skillCursor rule327mo agoMITA14Cursor
figma-performancehoshikitsunoda/figma-plugins-vibe-coding-templateCursor rule2111mo agoMITA0Cursor
ant-designTideTree/awesome-cursor-rules-mdc-zhCursor rule148mo agononeA0Cursor
7-day-nextjs-web-design-cursormattcsnyder/7-day-mobile-and-web-design-skillCursor rule26mo agononeA16Cursor
clone-aiOmerfaruk-aydn/siteclonerCursor rule26mo agononeA374Cursor