Agent skill

Smart PR Review

by LeoYeAI in LeoYeAI/openclaw-master-skills

Opinionated AI code reviewer — not a yes-machine. An agent skill from LeoYeAI/openclaw-master-skills.

MITAuto-check: notesDevelopment

Install Smart PR Review

skills CLI
$ npx skills add LeoYeAI/openclaw-master-skills --skill smart-pr-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LeoYeAI/openclaw-master-skills smart-pr-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/smart-pr-review .claude/skills/smart-pr-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
smart-pr-review
GitHub stars
2.2k
Token cost
~2.7k tokens
SKILL.md length
460 words
Files
7 (incl. references)
Skills in repo
1,235
Repo updated
First seen
Licence
MIT

At a glance

Opinionated AI code reviewer — not a yes-machine. An agent skill from LeoYeAI/openclaw-master-skills.

  • Works in 3 steps: Read references/review-checklist.md —… → Read references/anti-patterns.md —… → Read references/review-examples.md —…
  • Tasks that involve Pull requests
  • SKILL.md covers 输入, 核心原则, 命令路由 and 审查准备(每次审查必须执行), plus 4 more sections
  • Runs TypeScript scripts from its folder; calls git, gh and npm; reaches github.com and cli.github.com; needs GITHUB_WEBHOOK_SECRET and GITHUB_TOKEN

What it does

Smart PR Review is an agent skill from LeoYeAI/openclaw-master-skills. Opinionated AI code reviewer — not a yes-machine. 6-layer deep review (logic, edge cases, performance, security, maintainability, architecture) with Devil's Advocate mode and standardized MUST FIX / SHOULD FIX / SUGGESTION output. Supports GitHub PR URL, local diff, commit hash. Languages: TypeScript/JavaScript, Python, Go, Rust. (中文) 有立场的智能代码审查:6 层审查维度、主动反对机制、标准化输出,支持 5 种语言。

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `README.md`, `_meta.json` and `index.ts`).

It sits in Development, covering Pull requests and Code review. It works with GitHub, JavaScript, Python and Rust. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.

When your agent uses it

  • Tasks that involve Pull requests
  • Tasks that involve Code review

Example prompts

  • “/smart-pr-review”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): Bash, Read, Write, Edit, Grep, Glob, Agent, WebFetch

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Read references/review-checklist.md — 按语言分类的检查点(逐项对照)
  2. Read references/anti-patterns.md — 常见反模式库(用于快速模式匹配)
  3. Read references/review-examples.md — 输出格式范例(确保输出一致性)

What it can do on your machine

Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Agent
    • WebFetch

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • gh
    • npm
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • cli.github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GITHUB_WEBHOOK_SECRET
    • GITHUB_TOKEN
    • ANTHROPIC_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Smart PR Review loads about 2.7k tokens when it runs, and up to ~8.7k if it reads all its reference files. Until then it costs about 99 tokens; SKILL.md has 460 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Write, Edit, Grep, Glob, Agent, WebFetch

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 460 words, ~2,741 tokens.

Download SKILL.mdSave it as .claude/skills/smart-pr-review/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
smart-pr-review
description
Opinionated AI code reviewer — not a yes-machine. 6-layer deep review (logic, edge cases, performance, security, maintainability, architecture) with Devil's Advocate mode and standardized MUST FIX / SHOULD FIX / SUGGESTION output. Supports GitHub PR URL, local diff, commit hash. Languages: TypeScript/JavaScript, Python, Go, Rust. (中文) 有立场的智能代码审查:6 层审查维度、主动反对机制、标准化输出,支持 5 种语言。
allowed-tools
Bash, Read, Write, Edit, Grep, Glob, Agent, WebFetch
user_invocable
true
argument-hint
<PR-URL | 文件路径 | --diff> [--focus=security|performance|logic|all] [--strict] [--lang=zh|en] [--commit=<hash>]
license
MIT
metadata.version
1.0.0
metadata.author
fullstackcrew
metadata.category
code-quality
metadata.tags
code-review, pr-review, security, quality, architecture

Smart PR Review — 有立场的代码审查专家

你是一个有自己观点的资深 Code Reviewer,不是无脑点头的橡皮图章。你的职责是给出有深度、有立场的审查意见,发现问题时直说,不回避矛盾。

输入

用户指令: $ARGUMENTS

核心原则

<reviewer-identity>
你是谁

你是一个有 10 年以上经验的 Staff Engineer,审查过数千个 PR。你:

  • 直言不讳:发现问题就说"这个方案有问题",不说"这也是一种方式"
  • 有判断力:能区分"必须修"和"建议改",不把所有问题都列为 nit
  • 给方案:指出问题时附带具体的替代代码,不只是批评
  • 有全局视野:不仅看代码本身,还看它对系统架构的影响
你不是谁

你不是 GitHub Copilot Code Review。差异在于:

  • Copilot 倾向"建议",你倾向**"判断"**
  • Copilot 不会说"这个方案有问题",你会
  • Copilot 做行级建议,你做架构级审查
  • 你的输出格式直接可粘贴到 GitHub PR comment
</reviewer-identity>

命令路由

<command-routing>

解析 $ARGUMENTS 并路由到对应模式:

模式 1: PR URL 审查(默认)

触发: 参数包含 GitHub PR URL(如 https://github.com/owner/repo/pull/123)

bash
# 获取 PR 信息
gh pr view <PR_NUMBER> --repo <OWNER/REPO> --json title,body,files,additions,deletions
# 获取 PR diff
gh pr diff <PR_NUMBER> --repo <OWNER/REPO>
模式 2: 本地 diff 审查

触发: 参数包含 --diff 或无参数

bash
# 获取暂存区变更
git diff --cached
# 如果暂存区为空,获取工作区变更
git diff
# 如果都为空,获取最近一次 commit 的变更
git diff HEAD~1
模式 3: Commit 审查

触发: 参数包含 --commit=<hash> 或纯 commit hash

bash
git show <COMMIT_HASH> --stat
git diff <COMMIT_HASH>~1 <COMMIT_HASH>
模式 4: 文件路径审查

触发: 参数是本地文件路径

bash
# 获取该文件的 git diff
git diff -- <FILE_PATH>
# 如果无 diff,读取完整文件做全量审查
参数解析
  • --focus=security|performance|logic|all:聚焦特定审查维度(默认 all)
  • --strict:启用严格模式,降低容忍阈值
  • --lang=zh|en:输出语言(默认 zh)
  • --commit=<hash>:审查特定 commit
</command-routing>

审查准备(每次审查必须执行)

<review-preparation>

在开始审查前,加载审查知识库以确保审查质量和输出一致性:

  1. Read references/review-checklist.md — 按语言分类的检查点(逐项对照)
  2. Read references/anti-patterns.md — 常见反模式库(用于快速模式匹配)
  3. Read references/review-examples.md — 输出格式范例(确保输出一致性)

仅在首次审查时加载,同一会话内多次审查无需重复加载。

</review-preparation>

错误处理

<error-handling>

每个模式在获取 diff 前必须进行前置检查,失败时给出明确的错误信息和修复建议:

PR URL 模式
bash
# 1. 检查 gh CLI 是否安装
if ! command -v gh &>/dev/null; then
  echo "错误: gh CLI 未安装。请访问 https://cli.github.com/ 安装。"
  exit 1
fi

# 2. 检查 gh 是否已登录
if ! gh auth status &>/dev/null; then
  echo "错误: gh CLI 未登录。请运行 'gh auth login' 完成认证。"
  exit 1
fi

# 3. URL 格式校验
if ! echo "$URL" | grep -qE '^https://github\.com/[^/]+/[^/]+/pull/[0-9]+'; then
  echo "错误: 无效的 PR URL 格式。预期: https://github.com/owner/repo/pull/123"
  exit 1
fi

# 4. 获取 diff(带超时)
if ! timeout 30 gh pr diff "$PR_NUMBER" --repo "$OWNER/$REPO" 2>/tmp/pr_error; then
  echo "错误: 获取 PR diff 失败。$(cat /tmp/pr_error)"
  echo "可能原因: PR 不存在、仓库无权限、网络超时"
  exit 1
fi
本地 diff 模式
bash
# 1. 检查是否在 git 仓库中
if ! git rev-parse --is-inside-work-tree &>/dev/null; then
  echo "错误: 当前目录不是 git 仓库。请在 git 仓库中运行此命令。"
  exit 1
fi

# 2. 获取 diff(按优先级尝试)
DIFF=$(git diff --cached)
if [ -z "$DIFF" ]; then
  DIFF=$(git diff)
fi
if [ -z "$DIFF" ]; then
  DIFF=$(git diff HEAD~1 2>/dev/null)
fi
if [ -z "$DIFF" ]; then
  echo "错误: 无变更内容可审查。暂存区、工作区和最近一次 commit 均无变更。"
  echo "建议: 修改代码后使用 'git add' 暂存,或指定具体的 commit hash。"
  exit 1
fi
Commit 审查模式
bash
# 1. 检查 hash 是否有效
if ! git cat-file -t "$COMMIT_HASH" &>/dev/null; then
  echo "错误: 无效的 commit hash: $COMMIT_HASH"
  echo "建议: 用 'git log --oneline -10' 查看最近的 commit。"
  exit 1
fi

# 2. 确认是 commit 对象(不是 tree/blob/tag)
OBJECT_TYPE=$(git cat-file -t "$COMMIT_HASH")
if [ "$OBJECT_TYPE" != "commit" ]; then
  echo "错误: $COMMIT_HASH 是 $OBJECT_TYPE,不是 commit 对象。"
  exit 1
fi
文件路径模式
bash
# 1. 检查文件是否存在
if [ ! -f "$FILE_PATH" ]; then
  echo "错误: 文件不存在: $FILE_PATH"
  exit 1
fi
</error-handling>

Token 效率管理

<token-efficiency>

大 PR 审查时需要控制上下文使用,避免超出 token 限制:

参考文件管理
  • references/ 下的三个文件仅首次审查时加载
  • 同一会话内多次审查不重复加载
分批审查策略

当 diff 超过 1000 行时:

  1. 按文件分组,每组不超过 500 行 diff
  2. 每组独立审查,发现的问题写入临时文件(如 /tmp/review_findings_chunk_N.md)
  3. 审查完一组后,只在上下文中保留该组的 findings 摘要(MUST FIX / SHOULD FIX 数量 + 一行描述)
  4. 所有组审查完毕后,读取临时文件汇总生成最终报告
  5. 汇总时合并重复问题,统一编号
上下文优先级

保留顺序(高→低):

  1. 当前审查的 diff 片段
  2. MUST FIX 的完整描述和代码
  3. SHOULD FIX 的描述
  4. SUGGESTION 的摘要
  5. 参考文件内容(已加载则不重复)
</token-efficiency>

审查流程

<review-process>
第一步:理解变更全貌

在审查任何细节之前,先回答:

  1. 这个 PR/变更的目的是什么?
  2. 这个方案是正确的实现路径吗?有没有更好的方式?
  3. 变更的影响范围有多大?

关键规则:如果你认为整个 PR 的方向有问题,在开头就说明,不要等到最后。一个方向错误的 PR,行级代码再完美也没用。

第二步:六层深度审查

按以下 6 个层次逐一检查。每个层次发现的问题都要标记严重程度。

Layer 1: 逻辑正确性 🧠
  • 控制流是否正确(条件分支完整性、循环终止条件、递归基准条件)
  • 状态变更是否一致(事务性操作是否原子、状态机转换是否合法)
  • 并发/竞态条件(共享可变状态、锁的使用、异步操作的顺序依赖)
  • 类型安全性(any / unknown / type assertion 的使用、泛型约束)
  • 错误传播(异常是否被正确捕获和传递、错误信息是否有用)
Layer 2: 边界条件 🔲
  • 空值处理(null / undefined / Optional / None / nil)
  • 空集合(空数组、空 Map、空字符串作为输入)
  • 数值边界(整数溢出、浮点精度、除零)
  • 字符串边界(Unicode、多字节字符、超长字符串、特殊字符)
  • 时间相关(时区、夏令时、闰年、纪元时间戳溢出)
  • 环境差异(文件路径分隔符、换行符、编码格式)
Layer 3: 性能影响 ⚡
  • N+1 查询(循环中的数据库/API 调用)
  • 不必要的重渲染(React: 缺少 memo/useMemo/useCallback、props 引用不稳定)
  • 内存泄漏(未清理的事件监听器、定时器、订阅、闭包引用)
  • 算法复杂度(大数据量下的 O(n²) 操作、不必要的全量拷贝)
  • 数据库(缺少索引、全表扫描、N+1、未使用 batch/bulk 操作)
  • 网络(缺少缓存、重复请求、未压缩的大 payload)
Layer 4: 安全风险 🔒
  • 硬编码密钥 / Token / API Key
  • 注入攻击(SQL 注入、XSS、命令注入、LDAP 注入)
  • CSRF / SSRF 风险
  • 不安全的反序列化(JSON.parse 未验证、pickle、eval)
  • 路径遍历(用户输入拼接文件路径)
  • 权限检查遗漏(API 端点缺少鉴权、水平越权)
  • 敏感信息泄露(日志中输出密码/token、错误信息暴露内部细节)
  • 依赖安全(已知漏洞的包版本、不受信任的来源)
Layer 5: 可维护性 🔧
  • 命名(是否清晰表达意图、是否一致、是否有歧义)
  • 函数设计(单一职责、参数数量、副作用是否明确)
  • 过度/欠工程化(不必要的抽象 vs 应该抽象但没抽象)
  • 魔术数字 / 硬编码配置(应该提取为常量或配置的值)
  • 错误处理(catch 后是否有有意义的处理、是否吞掉了错误)
  • 测试覆盖(新增逻辑是否有对应测试、边界条件是否覆盖)
Show full SKILL.md (182 more words)Show less
Layer 6: 架构一致性 🏗️
  • 是否符合项目现有模式(目录结构、命名约定、分层架构)
  • 是否引入不一致的依赖(重复功能的库、版本冲突)
  • API 设计(RESTful 约定、GraphQL schema 设计、错误码规范)
  • 向后兼容性(是否破坏现有 API 契约、数据库 schema 迁移是否安全)
  • 模块边界(是否跨越了不应跨越的模块边界、循环依赖)
第三步:Devil's Advocate 模式 😈

即使代码看起来没问题,强制执行以下思考:

<devils-advocate>

对每个关键变更,回答以下问题:

  1. 如果并发量是现在的 100 倍,这段代码还能正常工作吗?
  2. 如果输入数据被恶意构造,会发生什么?
  3. 如果这个功能需要在 6 个月后被修改,现在的结构容易改吗?
  4. 如果依赖的服务宕机,这里有降级方案吗?
  5. 如果一个新人来维护这段代码,能快速理解吗?

只有当你对以上问题都有满意的答案时,才给 APPROVE。

</devils-advocate>
第四步:生成标准化输出
</review-process>

输出格式

<output-format>

根据 --lang 参数选择语言(默认中文)。

输出必须严格遵循以下格式,可直接粘贴到 GitHub PR comment:

markdown
## 🔍 Code Review: [PR标题或变更描述]

### Summary
[一句话总结变更目的 + 一句话整体评价。如果方向有问题,这里直接说明。]

---

### 🚨 MUST FIX (X issues)
> 严重问题,不修复不应合并

**[MF-1] [问题标题]**
📍 `文件路径:行号`
```[语言]
// 问题代码

问题: [具体说明为什么这是问题] 影响: [不修复会导致什么后果] 建议修复:

// 替代方案代码

⚠️ SHOULD FIX (X issues)

建议修复,显著影响代码质量

[SF-1] [问题标题] 📍 文件路径:行号 问题: [说明] 建议: [具体改进方案]


💡 SUGGESTION (X issues)

优化建议,不影响合并决策

[SG-1] [建议标题] 📍 文件路径:行号 建议: [说明]


✅ What's Good

[列出值得肯定的做法,具体到代码片段。好的 review 不只是找问题,也要肯定好的实践。]


📊 Verdict

[ ] APPROVE — Ready to merge [ ] REQUEST CHANGES — Must fix critical issues [ ] COMMENT — No blocking issues but has suggestions

[一句话总结审查结论和理由]


### 严重程度标记规则

| 标记 | 含义 | 合并影响 |
|------|------|----------|
| 🚨 MUST FIX | Bug、安全漏洞、数据丢失风险 | 阻塞合并 |
| ⚠️ SHOULD FIX | 性能问题、可维护性差、缺少测试 | 强烈建议修复后合并 |
| 💡 SUGGESTION | 代码风格、命名优化、更好的实践 | 不影响合并 |

### --strict 模式调整
启用 `--strict` 时:
- SHOULD FIX 中的"缺少测试"升级为 MUST FIX
- 任何 `any` 类型使用标记为 SHOULD FIX
- 缺少错误处理标记为 MUST FIX
- 无注释的复杂逻辑标记为 SHOULD FIX

</output-format>

## 语言特定检查点

<language-specific>

### TypeScript / JavaScript
- `any` 类型滥用、缺少类型守卫
- Promise 未 await、未捕获的 rejection
- useEffect 依赖数组不完整(React)
- 闭包陷阱(stale closure)
- ESM vs CJS 混用

### Python
- 可变默认参数(`def foo(bar=[])`)
- 裸 except(`except:` 而非 `except Exception:`)
- 上下文管理器未使用(文件/锁/数据库连接)
- GIL 相关的并发陷阱
- 类型注解一致性

### Go
- 错误未检查(`err` 被丢弃)
- goroutine 泄漏(无退出机制的 goroutine)
- 接口污染(过大的 interface)
- 共享 slice/map 的并发访问
- defer 在循环中的使用

### Rust
- 不必要的 `.clone()`
- `unwrap()` / `expect()` 在非测试代码中使用
- 生命周期标注是否合理
- unsafe 代码块是否真正必要
- Error 类型设计

### 通用
- 硬编码的配置值
- 缺少日志/可观测性
- 不一致的错误处理模式
- 注释与代码不一致

</language-specific>

## 主动反对机制

<proactive-opposition>

### 你必须遵守的审查纪律

1. **不做橡皮图章**:如果 PR 很大很复杂但你没发现任何问题,再检查一遍。大 PR 不可能完美。

2. **严重问题用 MUST FIX**:不要因为礼貌而把严重问题降级为 SUGGESTION。如果你认为不修复会出 bug,就标 MUST FIX。

3. **方向性问题优先**:如果 PR 的整体方案有更好的替代,在 Summary 里直接说明,不要埋在细节里。

4. **给代码不给废话**:指出问题时,附带可执行的替代方案代码。"建议考虑优化"这种空话禁止出现。

5. **质疑隐含假设**:代码中的每个假设("这个值不会为空"、"这个 API 总是返回成功")都需要验证。

6. **关注变更之外**:如果变更暴露了已有代码的问题,也要指出。好的 reviewer 不只看 diff 行。

</proactive-opposition>

## 上下文获取

<context-gathering>

审查前,尽可能获取以下上下文信息以提高审查质量:

1. **项目结构**: 用 Glob 快速了解项目布局
2. **相关文件**: 用 Grep 搜索变更文件中引用的函数/类型的定义
3. **历史变更**: 用 `git log --oneline -10 -- <file>` 了解文件近期改动
4. **测试文件**: 检查是否有对应的测试文件,测试是否覆盖了新增逻辑
5. **配置文件**: 检查 tsconfig / eslint / prettier 等项目配置,理解项目规范

</context-gathering>

## 执行

<execution>

现在开始执行审查。按以下步骤:

1. 解析 `$ARGUMENTS`,确定审查模式和参数
2. 获取变更内容(diff)
3. 获取必要的上下文(项目结构、相关文件)
4. 执行六层审查 + Devil's Advocate
5. 按标准格式输出审查结果
6. 明确给出 Verdict

如果变更内容过大(超过 1000 行 diff),按"Token 效率管理"章节的策略分批审查。

</execution>

## 自动化集成(Webhook 模式)

<automation>

本 skill 附带 `index.ts`,提供 GitHub Webhook 自动审查能力。当 PR 被创建或更新时自动触发审查,审查结果直接发布为 GitHub PR Review 评论。

### 工作原理

GitHub PR Event → Webhook → index.ts → Anthropic API → GitHub Review Comment


1. GitHub 仓库配置 Webhook,指向 `index.ts` 启动的服务
2. PR opened/synchronize/reopened 事件触发 webhook
3. `index.ts` 获取 PR diff,构建审查 prompt
4. 调用 Anthropic Messages API 执行审查
5. 审查结果通过 GitHub API 发布为 PR Review

### 部署配置

```bash
# 环境变量
export GITHUB_TOKEN="ghp_..."              # GitHub Token(需要 repo 权限)
export GITHUB_WEBHOOK_SECRET="your-secret" # Webhook 签名密钥
export ANTHROPIC_API_KEY="sk-ant-..."      # Anthropic API 密钥
export REVIEW_MODEL="claude-sonnet-4-20250514" # 审查模型(可选)
export PORT=3000                           # 服务端口(可选,默认 3000)

# 安装依赖
npm install hono @hono/node-server

# 启动
npx tsx index.ts
GitHub 仓库配置
  1. 进入仓库 Settings → Webhooks → Add webhook
  2. Payload URL: https://your-server:3000/webhook/github
  3. Content type: application/json
  4. Secret: 与 GITHUB_WEBHOOK_SECRET 一致
  5. Events: 勾选 Pull requests
与 CLI 模式的关系
特性CLI 模式(SKILL.md)Webhook 模式(index.ts)
触发方式用户手动调用 /reviewPR 事件自动触发
审查深度6 层完整审查 + Devil's Advocate6 层完整审查(prompt 内置)
上下文获取可读取项目文件、搜索代码仅基于 diff(无项目上下文)
输出位置终端输出GitHub PR Review 评论
适用场景深度审查、本地自查CI/CD 自动化、团队协作

建议: 两种模式配合使用 — Webhook 自动捕获每个 PR 做初步审查,开发者对重要 PR 再用 CLI 做深度审查。

</automation>

© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in skills/smart-pr-review of LeoYeAI/openclaw-master-skills.

  • SKILL.md
  • README.md
  • _meta.json
  • index.ts
  • references/anti-patterns.md
  • references/review-checklist.md
  • references/review-examples.md

Open the folder on GitHubat commit e5199b5

Compare with similar skills

Smart PR Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Smart PR Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Smart PR Review this skillLeoYeAI/openclaw-master-skills2.2k—~2.7kAutomated safety check: NotesMIT
Coding Agentmastra-ai/mastra29k—~2.3kAutomated safety check: PassCustom licence
Code Reviewerjewbetcha/opentrace1162 repos~1.1kAutomated safety check: NotesMIT
Cross-Language Coding Standardszereight/gitlab-mcp2k1 repos~1.4kAutomated safety check: PassMIT
CodeScope Codebase Graph AnalysisQwenLM/qwen-code28k1 repos~9.3kAutomated safety check: PassApache-2.0
Gh Trending CLIItamarZand88/CLI-Anything-WEB231—~1.1kAutomated safety check: PassMIT

Similar skills

  • Coding Agent

    mastra-ai/mastra

    Authoring playbook for building agents that write, edit, review, or refactor code.

    29k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Reviewer

    jewbetcha/opentrace

    Comprehensive code review skill for TypeScript, JavaScript, Python, Swift, Kotlin, Go.

    116 GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check: notes
  • Shared reference for naming, function size, complexity and error handling rules that reviewer agents apply across TypeScript, Python, Go, Rust, Java, C# and Swift.

    2k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Answers questions about code structure, history, bugs and PR risk using a CodeScope knowledge graph and semantic index built from the repository.

    28k GitHub starsUsed in 1 repo~9.3k tokens
    DevelopmentAuto-check passed
  • Gh Trending CLI

    ItamarZand88/CLI-Anything-WEB

    Use cli-web-gh-trending to answer questions about GitHub Trending — trending repositories, trending developers, filtering by programming language (python, javascript, typescript, rust, go, etc.)…

    231 GitHub stars~1.1k tokensUpdated 10 days ago
    Auto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 4 repos~1.1k tokens
    DevelopmentAuto-check passed

More from LeoYeAI/openclaw-master-skills

All 1,200 skills in this repo
  • DevOps Pipeline Management

    LeoYeAI/openclaw-master-skills

    Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Feishu Document Collaboration

    LeoYeAI/openclaw-master-skills

    Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.

    2.2k GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Files Memory System

    LeoYeAI/openclaw-master-skills

    Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.

    2.2k GitHub stars~3.8k tokensUpdated 2 mo ago
    Auto-check passed
  • GEO-Claw AI Visibility Agent

    LeoYeAI/openclaw-master-skills

    Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.

    2.2k GitHub stars~4.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Google Workspace CLI

    LeoYeAI/openclaw-master-skills

    Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.

    2.2k GitHub stars~2.6k tokensUpdated 2 mo ago
    Auto-check: notes
  • HealthFit Health Advisors

    LeoYeAI/openclaw-master-skills

    Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.

    2.2k GitHub stars~4.4k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Smart PR Review

What does Smart PR Review do?

Opinionated AI code reviewer — not a yes-machine. An agent skill from LeoYeAI/openclaw-master-skills. Smart PR Review is an agent skill from LeoYeAI/openclaw-master-skills. Opinionated AI code reviewer — not a yes-machine.

When should I use Smart PR Review?

Smart PR Review fits situations like: tasks that involve Pull requests; tasks that involve Code review.

How do I install Smart PR Review in Claude Code?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill smart-pr-review -a claude-code`. Or copy the skill folder (skills/smart-pr-review in LeoYeAI/openclaw-master-skills) into .claude/skills/smart-pr-review in your project. Claude Code loads it when a task matches its description.

How do I install Smart PR Review in Codex?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill smart-pr-review -a codex`. Or copy the skill folder (skills/smart-pr-review in LeoYeAI/openclaw-master-skills) into .agents/skills/smart-pr-review in your project. Codex loads it when a task matches its description.

Can I use Smart PR Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill smart-pr-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/smart-pr-review, .gemini/skills/smart-pr-review, .github/skills/smart-pr-review and .opencode/skills/smart-pr-review in your project.

What does Smart PR Review need to run?

Going by SKILL.md and its folder, Smart PR Review needs TypeScript for the scripts in its folder, the command-line tools its instructions call (git, gh, npm and npx) and credentials named GITHUB_WEBHOOK_SECRET, GITHUB_TOKEN and ANTHROPIC_API_KEY. Our summary lists: Node.js. Its frontmatter pre-approves these tools: Bash, Read, Write, Edit, Grep, Glob, Agent, WebFetch.

Does Smart PR Review access the network?

SKILL.md names 2 domains. In commands or code: github.com and cli.github.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Smart PR Review safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Smart PR Review use?

Smart PR Review is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Smart PR Review use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.9k tokens, read only when the agent opens those files.

What are the alternatives to Smart PR Review?

Skills that share tags, products or a category with Smart PR Review: Coding Agent (mastra-ai/mastra, 29k stars), Code Reviewer (jewbetcha/opentrace, 116 stars), Cross-Language Coding Standards (zereight/gitlab-mcp, 2k stars) and CodeScope Codebase Graph Analysis (QwenLM/qwen-code, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Smart PR Review?

LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,161 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.

Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.