moon-web: Skill for Cursor

.cursor/skills/react-antd-page/SKILL.md

react-antd-page is a skill for Cursor from aide-family/moon-web. It costs 83 tokens per session (1,939 once invoked), scanned A, original, MIT.

A set of instructions for building feature pages and modules with React, TypeScript, and Ant Design v6, a user-interface component library. It also defines how pages should use existing API code.

In plain words
What is it for?
Creating or completing React pages, modules, components, forms, and related data loading in an existing project.
Why use it?
It gives page work a consistent structure and prevents UI code from quietly changing backend request definitions. API problems are handled through the separate update-api skill.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is aide-family/moon-web's own configuration. It tells Cursor how to work on moon-web itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything moon-web configures →

Reuse

Borrowing it

Nothing to install: this file belongs to aide-family/moon-web. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/aide-family/moon-web/main/.cursor/skills/react-antd-page/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/aide-family/moon-web

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 react-antd-page

README.md
[![agentmods](https://agentmods.dev/badge/skills/aide-family/moon-web/react-antd-page/github.svg)](https://agentmods.dev/skills/aide-family/moon-web/react-antd-page)
Your own site
<a href="https://agentmods.dev/skills/aide-family/moon-web/react-antd-page"><img src="https://agentmods.dev/badge/skills/aide-family/moon-web/react-antd-page/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 react-antd-page

Your own site · 80×15
<a href="https://agentmods.dev/skills/aide-family/moon-web/react-antd-page"><img src="https://agentmods.dev/badge/skills/aide-family/moon-web/react-antd-page.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,939 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.00083 $0.01939
Opus 5 $0.00042 $0.00970
Sonnet 5 $0.00017 $0.00388
Haiku 4.5 $0.00008 $0.00194

Measured 9d ago against content hash 24e39936a718, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

react-antd-page 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 9d 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/skills/react-antd-page/SKILL.md · 84 lines

How it starts

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

React + Ant Design 页面开发

在 React + TypeScript 项目下,按规范开发功能页/模块/页面。UI 使用 Ant Design v6;禁止使用已弃用的组件或 API;风格统一、美观;接口严格依赖 src/api/ 定义,不直接改 API,若 API 有缺陷先通过 update-api 技能更新再改页面。

技术栈与规范

  • 框架:React 18+,TypeScript 严格模式。
  • UI 库:Ant Design v6。组件与 API 以 官方文档 为准,不得使用文档标注为废弃的组件或属性(如已废弃的 List 等,改用推荐替代方案)。
  • 代码质量:达到高级前端工程师水准——类型完整、结构清晰、可维护、无多余渲染与内存泄漏风险。

API 使用规则(必守)

  1. 只读不改:页面与组件仅 引用 src/api/ 下已导出的请求函数与类型,禁止在页面开发过程中直接修改 src/api/ 内任何文件。
  2. 类型从 API 来:请求参数、响应数据、枚举等一律从对应 API 模块 import typeimport,不在页面里重复定义或写死与后端不一致的类型。
  3. API 与后端不一致时:若发现接口定义错误、缺字段、枚举不符等,必须先使用 update-api 技能从后端 OpenAPI 同步更新 src/api/,再基于新类型调整页面逻辑与展示。不得在页面里用类型断言、any 或本地类型“绕过”错误定义。

页面实现要点

结构与类型

  • 页面/模块放在 src/pages/ 对应业务目录下;可复用 UI 抽到 src/components/
  • 页面内子组件:当单文件内组件/逻辑过多、超过可读阈值时,将子组件与仅本页使用的辅助函数(如筛选构建、mock、常量映射)拆到当前页面模块目录下的 components/(例如 src/pages/foo/bar/components/),由入口 index.tsx 引用;跨页面复用的再提升到 src/components/
  • 组件用 React.FC<Props>function Component(props: Props),Props 用 interface 定义,必填/可选写清楚。
  • 优先 import type 引用类型;状态类型与 API 返回类型一致,避免到处 any

请求与状态

  • 异步请求使用 API 模块导出的方法(如 getXxxListcreateXxx),不自行拼 fetch/axios
  • useEffect 中发请求时,用取消标记或 AbortController 避免卸载后 setState;loading/error 状态完整,列表为空与加载失败要有明确 UI(Empty、Result、Message 等)。
  • 列表页:分页、筛选、排序参数与 API 的 types.ts 中定义一致,不随意增删字段。

Ant Design v6 使用

  • 按需从 antd 引入组件(如 TableFormButtonSpaceModalMessage/App.useApp() 等)。
  • 图标从 @ant-design/icons 按需引入。
  • 表格列用 ColumnsType<YourRowType>,类型来自 API 的 Item/Row 类型。
  • 主题与国际化若项目已配置 ConfigProvider/App,保持一致;不引入已废弃组件或废弃 props(查 v6 文档确认)。

样式与体验

  • 布局与间距统一(如 Space、Flex、Grid),配色与项目现有风格一致。
  • 加载中:Spin 或 Skeleton;操作反馈:Message/Notification;危险操作:Popconfirm 或 Modal 二次确认。
  • 表单:校验规则与 API 参数对应;提交前可做前端校验,提交用 API 模块的创建/更新方法。

列表模糊查询(必做)

  • 搜索框支持回车触发查询onPressEnter 时须用当前输入框的值发起请求,避免依赖 state 未更新导致查询条件滞后。实现方式:handleSearch 支持可选参数(如 override?: Partial<SearchParams>),回车时传入 (e.target as HTMLInputElement).valuefetchData 接受 override 并优先使用其参与请求,同时可同步更新 state/URL。

Read the full file on GitHub · 84 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. 9d ago First seen · 84 lines · 83 tokens per session scan A 24e39936a718

Subscribe to this mod's changes

react-antd-page is a skill published in the GitHub repository aide-family/moon-web (12 stars, last pushed 2mo ago), licensed MIT. It adds 83 tokens to every session and 1,939 once invoked, about $0.0004 per session on Opus 5. 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

Other skills, from other repositories

frontend-conventions

Coding conventions, architecture patterns, and testing rules for the SkillHub React frontend. Ensures agents follow Feature-Sliced Design and use the generated OpenAPI types.

iflytek/skillhub · 36 tokens

fast-typescript-check

Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…

internet-development/www-sacred · 84 tokens

typescript-react

Apply, review, and explain React conventions from the TypeScript Style Guide. Use automatically for TypeScript and TSX tasks involving prop-derived state, prop typing, component responsibilities, data flow, compound components, or client and server state.

mkosir/typescript-style-guide · 50 tokens

electron-dev

Electron desktop apps with React, TypeScript, and Vite. Use for IPC, window/tray, PTY terminals, WebRTC, and packaging.

jamditis/claude-skills-journalism · 34 tokens

coding-standards

A set of general coding standards and practical patterns for TypeScript, JavaScript, React, and Node.js. It covers readable naming, simple designs, avoiding repetition, and delaying unnecessary features.

loulanyue/awesome-claude-notes · 41 tokens

typescript-rules

React/TypeScript frontend development rules including type safety, component design, state management, and error handling. Use when implementing React components, TypeScript code, or frontend features.

shinpr/claude-code-workflows · 39 tokens