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.
curl -O https://raw.githubusercontent.com/aide-family/moon-web/main/.cursor/skills/react-antd-page/SKILL.mdgit clone --depth 1 https://github.com/aide-family/moon-webWrote 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/skills/aide-family/moon-web/react-antd-page)<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.
<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>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.1 | $0.00083 | $0.01939 |
| Opus 5 | $0.00042 | $0.00970 |
| Sonnet 5 | $0.00017 | $0.00388 |
| Haiku 4.5 | $0.00008 | $0.00194 |
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.
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 使用规则(必守)
- 只读不改:页面与组件仅 引用
src/api/下已导出的请求函数与类型,禁止在页面开发过程中直接修改src/api/内任何文件。 - 类型从 API 来:请求参数、响应数据、枚举等一律从对应 API 模块
import type或import,不在页面里重复定义或写死与后端不一致的类型。 - 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 模块导出的方法(如
getXxxList、createXxx),不自行拼fetch/axios。 - 在
useEffect中发请求时,用取消标记或 AbortController 避免卸载后 setState;loading/error 状态完整,列表为空与加载失败要有明确 UI(Empty、Result、Message 等)。 - 列表页:分页、筛选、排序参数与 API 的
types.ts中定义一致,不随意增删字段。
Ant Design v6 使用
- 按需从
antd引入组件(如Table、Form、Button、Space、Modal、Message/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).value,fetchData接受 override 并优先使用其参与请求,同时可同步更新 state/URL。
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.
- 9d ago First seen · 84 lines · 83 tokens per session scan A 24e39936a718
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.
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.
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…
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.
electron-dev
Electron desktop apps with React, TypeScript, and Vite. Use for IPC, window/tray, PTY terminals, WebRTC, and packaging.
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.
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.