Find and fix code issues before publishing a PR. Single-pass review with auto-fix. Use when reviewing code changes before submission or auditing existing cod...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install pr-review或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install pr-review⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/pr-review/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: pr-review description: Find and fix code issues before publishing a PR. Single-pass review with auto-fix. Use when reviewing code changes before submission or auditing existing code for bugs/security. Don't use when running a coding agent to write code (use coding-agent) or checking GitHub CI status (use github). metadata: {"openclaw": {"requires": {"bins": ["git"]}}} ---
Find and fix issues before publishing your PR — not after.
Single-pass review using one capable model. No orchestration overhead, no agent swarm. Fast, cheap, thorough.
coding-agentgithubfork-manager/pr-review # Review changes on current branch vs main/master
/pr-review src/api/ src/auth/ # Audit specific directories
/pr-review **/*.ts # Audit files matching a pattern
/pr-review --audit # Audit entire codebase with smart prioritization
Two modes:
| Mode | Trigger | Scope | Fix threshold | |------|---------|-------|---------------| | Diff | No args, on branch with changes | Changed files only | >= 70 | | Audit | Paths, patterns, or --audit | Specified files or full codebase | >= 80 |
No arguments provided:
git diff main...HEAD --name-only 2>/dev/null || git diff master...HEAD --name-only
Paths/patterns provided or --audit:
Read project guidelines (quick scan, don't overthink):
# Check for project conventions
cat CLAUDE.md .claude/settings.json CONTRIBUTING.md 2>/dev/null | head -100
cat .eslintrc* .prettierrc* biome.json tsconfig.json 2>/dev/null | head -50
cat package.json 2>/dev/null | head -20 # tech stack
Get the diff or file contents:
# Diff mode
git diff main...HEAD # or master
# Audit mode
cat <files> # read target files
Analyze all code in one pass. Cover these areas in priority order:
1. Correctness (highest priority)
2. Security
3. Reliability
4. Performance
5. Quality (lowest priority — skip if trivial)
For each issue found, assign:
| Score | Meaning | Action | |-------|---------|--------| | 90-100 | Critical bug or vulnerability | Must fix | | 70-89 | Real issue, will cause problems | Should fix | | 50-69 | Code smell, needs human judgment | Report only | | < 50 | Minor, likely false positive | Discard |
Discard thresholds:
Classify each issue:
blocker — security, data corruption, crash riskimportant — likely bug, perf regression, missing validationminor — edge case, maintainability, styleApply fixes directly for issues meeting the threshold:
For each fix: read file → apply edit → verify surrounding code preserved.
Never auto-fix:
After fixing, if any files were modified:
git diff --stat # show what changed
Format:
## Pre-Review Complete
**Risk:** Low / Medium / High
**Verdict:** ✅ Clean | ⚠️ Issues found | 🔴 Blockers
### 🔴 Blockers (must fix)
1. **file:line** — Description
- Impact: what goes wrong
- Fix: applied ✅ | manual required (reason)
### ⚠️ Important (should fix)
1. **file:line** — Description (score: XX)
- Fix: applied ✅ | suggestion
### 💡 Minor
1. **file:line** — Description
### Tests to Add
- description of test
### Files Modified: N
- path/to/file.ts
If zero issues found: ## Pre-Review Complete — ✅ Clean. No issues found.
DO:
DON'T:
安装 pr-review 后,可以对 AI 说这些话来触发它
Help me get started with pr-review
Explains what pr-review does, walks through the setup, and runs a quick demo based on your current project
Use pr-review to find and fix code issues before publishing a PR
Invokes pr-review with the right parameters and returns the result directly in the conversation
What can I do with pr-review in my developer & devops workflow?
Lists the top use cases for pr-review, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/pr-review/ 目录(个人级,所有项目可用),或 .claude/skills/pr-review/(项目级)。重启 AI 客户端后,用 /pr-review 主动调用,或让 AI 根据上下文自动发现并使用。
pr-review 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
pr-review 可免费安装使用。请查阅仓库了解许可证信息。
Find and fix code issues before publishing a PR. Single-pass review with auto-fix. Use when reviewing code changes before submission or auditing existing cod...
pr-review 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using pr-review
Identifies repetitive steps in your workflow and sets up pr-review to handle them automatically