moon-web: Skill for Cursor

.cursor/skills/code-review/SKILL.md

code-review is a skill for Cursor from aide-family/moon-web. It costs 64 tokens per session (1,548 once invoked), scanned A, original, MIT.

A code-review procedure for inspecting uncommitted Git changes for bugs, maintainability problems, and React or Ant Design v6 rule violations. Git changes are edits that have not yet been committed to the project history.

In plain words
What is it for?
Reviewing the current staged and unstaged changes in a React project and proposing or applying fixes for the issues it finds.
Why use it?
It catches problems such as missing loading or error handling, unstable list keys, incorrect hook dependencies, unnecessary duplication, and use of deprecated UI APIs.

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/code-review/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 code-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/aide-family/moon-web/code-review.svg)](https://agentmods.dev/skills/aide-family/moon-web/code-review)
Your own site
<a href="https://agentmods.dev/skills/aide-family/moon-web/code-review"><img src="https://agentmods.dev/badge/skills/aide-family/moon-web/code-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,548 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.00064 $0.01548
Opus 5 $0.00032 $0.00774
Sonnet 5 $0.00013 $0.00310
Haiku 4.5 $0.00006 $0.00155

Measured 7d ago against content hash 54ff6c81c585, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

code-review 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 7d 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/code-review/SKILL.md · 69 lines

How it starts

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

代码审核

对当前 Git 变更 进行审核:排查潜在 bug、评估代码质量,并严格按 React 规范与 Ant Design v6 检查风格与实现。发现问题必须给出修正方案或直接修正。

触发场景

  • 用户说「帮我审核当前变更」
  • 用户说「帮我审核代码」

审核范围:仅针对 当前未提交的变更(git diff / staged 文件)。先获取变更内容再开始审核。

审核维度

1. 正确性与 Bug

  • 逻辑是否正确,边界与空值是否处理。
  • 异步请求:是否有卸载后 setState、是否缺少 loading/error 处理。
  • 类型:是否滥用 any、类型断言是否合理、与 API 类型是否一致。枚举一致性:若 API 已改为枚举类型(如 GlobalStatusDatasourceTypeSampleModeConditionMetric),则:(1)所有调用处、回调参数、setState/表单状态 均使用该枚举类型,不得遗留 string/numbermodeRaw/conditionRaw 等原始值落库到状态;(2)提交请求参数 直接传枚举值,不得对枚举字段使用 String()/Number() 转换(例如 mode: editingLevelData.mode 而非 String(editingLevelData.mode));(3)表单收集枚举字段 时用 Select + 枚举 options,勿用 Input type="number" 或裸字符串再转 Number。
  • 依赖数组与副作用:useEffect/useMemo/useCallback 依赖是否完整、是否造成多余渲染或闭包陈旧。

2. React 规范(必须严格遵守)

  • 组件:使用 React.FC<Props>function Component(props: Props),Props 用 interface 明确定义。
  • 类型:优先 import type,状态与 API 返回类型一致。
  • Hooks:只在顶层调用,条件/循环中不调用;自定义 Hook 命名以 use 开头。
  • 列表 key:使用稳定、唯一标识,禁止用 index 作为 key(列表会增删重排时)。
  • 受控/非受控:表单与可编辑 UI 的受控方式一致,无受控/非受控混用导致的警告或 bug。
  • 参考项目内 react-antd-page 中的结构与类型、请求与状态等约定。

3. 复用与冗余(硬性要求)

  • 能复用的必须复用:若变更中有与 src/components/ 或同项目其他模块可复用的逻辑/组件,必须改为复用,不得重复实现。
  • 禁止额外创造不必要的东西:不新增重复工具函数、不新增与现有组件功能重叠的组件;若现有 API 模块(src/api/)已有对应接口与类型,必须使用,不得在页面内重复定义请求或类型。

4. Ant Design v6 与 UI 风格(必须严格遵守)

  • 仅使用 Ant Design v6 当前推荐的组件与 API,以 官方文档 为准。
  • 禁止使用已弃用的组件、属性或变量(如文档标注废弃的 List 等,需改用推荐替代方案)。遇控制台弃用警告须按提示替换,例如:DividerorientationMargin 已废弃,须用 styles.content逻辑外边距替代——titlePlacement='left' 时用 styles={{ content: { marginInlineStart: 0 } }}titlePlacement='right' 时用 marginInlineEnd: 0(与 antd 源码中 innerStyle 一致),勿仅写 margin: 0
  • TablerowKey 若为函数,不得使用第二个参数 index(v6 已废弃且行为不保证);须用行的稳定字段(如 record.uidrecord.id 或组合字段)生成唯一 key。
  • 按需从 antd 引入组件,图标从 @ant-design/icons 按需引入。
  • 表格列使用 ColumnsType<YourRowType>,类型与 API 的 Item/Row 一致。
  • 若项目已配置 ConfigProvider/App,主题与国际化保持一致。

Read the full file on GitHub · 69 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. 7d ago First seen · 69 lines · 64 tokens per session scan A 54ff6c81c585

Subscribe to this mod's changes

code-review is a skill published in the GitHub repository aide-family/moon-web (12 stars, last pushed 2mo ago), licensed MIT. It adds 64 tokens to every session and 1,548 once invoked, about $0.0003 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.