ui_standards_rules

A frontend coding standard that sets Ant Design as the main component library and Tailwind CSS as a limited styling aid. It also defines common page layouts and responsive grid practices.

In plain words
What is it for?
Use it when building forms, tables, dialogs, headers, sidebars, footers, content areas, and responsive layouts in a frontend application.
Why use it?
It keeps screens consistent and reduces decisions about which UI components and layout patterns to use.

Cursor rule for 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/modelengine-group/nexent/ui_standards_rules
Clone the repo
git clone --depth 1 https://github.com/ModelEngine-Group/nexent

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 865 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 $0.00000 $0.00865
Opus 5 $0.00000 $0.00432
Sonnet 5 $0.00000 $0.00173
Haiku 4.5 $0.00000 $0.00086

Measured 2d ago against content hash 033077bff4d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ui_standards_rules 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.

.cursor/rules/frontend/ui_standards_rules.mdc · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Frontend UI Standards Rules

Principle

Use Ant Design as primary UI library with minimal Tailwind CSS. Prioritize mature Ant Design solutions for responsive layouts. Avoid secondary encapsulation unless necessary.

Technology Usage Guidelines

  • Ant Design: Forms, data display, complex interactions (<Button>, <Modal>, <Form>)
  • Tailwind CSS: Spacing, layout, simple styling (className="flex items-center gap-2 text-sm")
  • Inline Styles: Special cases (style={{ fontSize: "48px" }})
  • Override AntD: Use <style jsx global> when necessary

Layout Standards

Global Layout

Use Header, Sider, Footer, Content structure. Reference: https://ant.design/components/layout-cn

const { Header, Footer, Sider, Content } = Layout;

<Layout>
  <Header>Header</Header>
  <Layout>
    <Sider width="25%">Sider</Sider>
    <Content>Content</Content>
  </Layout>
  <Footer>Footer</Footer>
</Layout>

Responsive Grid

Use AntD Grid for responsive layouts. Reference: https://ant.design/components/grid-cn

<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}>
  <Col span={6}>col-6</Col>
  <Col span={6}>col-6</Col>
  <Col span={6}>col-6</Col>
  <Col span={6}>col-6</Col>
</Row>

Flex Layout

Use AntD Flex for component alignment. Reference: https://ant.design/components/flex-cn

<Flex vertical className="h-full overflow-hidden">
  <Row><Col>Content 1</Col></Row>
  <Row><Col>Content 2</Col></Row>
  <Row className="flex:1 min-h-0">
    <Col><Flex className="h-full overflow-hidden">...</Flex></Col>
  </Row>
</Flex>

Component Standards

Modals

  1. Complex Modal: For reusable modals with custom content
  2. Simple Modal: Use useConfirmModal for one-time confirmations
Modal Standards
  • Use centered for positioning
  • Confirm buttons: type="primary" danger={true}
  • i18n keys: common.cancel, common.confirm
  • Icon: <ExclamationCircleFilled /> aligned with title
// Complex modal
<Modal
  open={isOpen}
  centered
  okButtonProps={{ type: "primary", danger: true }}
  okText={t("common.confirm")}
>
  <div className="flex items-start gap-4">
    <ExclamationCircleFilled style={{ color: token.colorWarning, fontSize: '22px' }} />
    <div>
      <div className="font-medium">{t("title")}</div>
      <div className="text-sm">{t("content")}</div>
    </div>
  </div>
</Modal>

// Simple modal
const { confirm } = useConfirmModal();
confirm({
  title: t("delete.confirmTitle"),
  content: t("delete.confirmContent"),
  onOk: () => { /* ... */ }
});

Read the full file on GitHub · 124 lines

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. 2d ago First seen · 124 lines · 0 tokens per session scan A 033077bff4d0

Subscribe to this mod's changes

ui_standards_rules is a cursor rule published in the GitHub repository ModelEngine-Group/nexent (5,841 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 865 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.