Brian Colinger

pr-reviewer

開發程式設計v1.0.1
作者:Brian Colinger更新於 2026-05-18共 2 個版本 · 最新版本釋出於 2026-02-19@clawhub_briancolinger/pr-reviewer
程式碼審查Git 輔助#Code Review#Javascript#Typescript#GitHub

據 AlphaMoat 統計,截至 2026-10,pr-reviewer 累計下載 15,142 次、獲 0 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 1,842 位,在「開發程式設計」分類(1,069 個)中排名第 129 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
1.5萬
星標
-
全站下載量排名
#1,842
全站前 17% · 「開發程式設計」前 13%
平台累計下載星標評論
ClawHub ↗8191-2
SkillHub ↗1.5萬-—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

Automated code review for GitHub pull requests. Analyzes diffs for security issues, error handling gaps, style problems, and test coverage. 透過 scripts/github/pr-reviewer.sh 的 check/review/post/status/list-unreviewed 子命令工作,需要已認證的 gh CLI 與倉庫訪問許可權,可選 golangci-lint(Go)與 ruff(Python)。檢查類別:| Security | 🔴 | Hardcoded credentials, AWS keys, secrets in code |、錯誤處理(Go _ := 丟棄錯誤、裸 except)、風險(panic/process.exit)、風格、TODO 標記與測試覆蓋。智慧複審:Tracks HEAD SHA per PR. Only re-reviews when new commits are pushed. 報告為 Markdown 並給出 🔴 SECURITY / 🟡 NEEDS ATTENTION / 🔵 MINOR NOTES / ✅ LOOKS GOOD 結論;狀態與報告預設寫入 ./data/。card 安全提醒:特製的 PR 檔名可在審查時觸發本地 Python 執行——不可信 PR 不要審查,在檔名注入問題修復前避免 cron/無人值守自動化;建議使用低許可權 GitHub 令牌。

資料釋出於 2026-10-27

可以用來做什麼

  • 批次檢查當前倉庫所有開啟的 PR
  • 審查指定 PR 並生成結構化報告
  • 把審查報告發布為 GitHub 評論
  • 配合心跳/cron 列出未審查的 PR

什麼時候用

  • 需要自動化初審 Go/Python/JS-TS 的 PR
  • 想在合併前攔截硬編碼憑據等安全問題
  • 需要可擴充套件規則的自定義審查模式

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

審查 PR 42 並把報告發為評論
列出當前倉庫所有未審查的 PR
給審查指令碼加一條新的 Go 風險模式

月度資料趨勢

累計下載1.5萬
72811.2萬1.6萬2026-05 · 累計下載 78632026-06 · 累計下載 86632026-07 · 累計下載 96912026-08 · 累計下載 1萬2026-09 · 累計下載 1.2萬2026-10 · 累計下載 1.5萬26-0526-0926-10
星標-
0112026-05 · 星標 -2026-06 · 星標 -2026-07 · 星標 -2026-08 · 星標 -2026-09 · 星標 -2026-10 · 星標 -26-0526-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-101.5萬—-
2026-091.2萬—-
2026-081萬+7.5%-
2026-079691+11.9%-
2026-068663+10.2%-
2026-057863—-

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

3.5 KB · ClawHub v1.0.1
---
name: pr-reviewer
version: 1.0.1
description: Automated GitHub PR code review with diff analysis, lint integration, and structured reports. Use when reviewing pull requests, checking for security issues, error handling gaps, test coverage, or code style problems. Supports Go, Python, and JavaScript/TypeScript. Requires `gh` CLI authenticated with repo access.
metadata:
  openclaw:
    requires:
      bins: ["gh", "python3"]
      anyBins: ["golangci-lint", "ruff"]
---
展開全部(共 101 行)

# PR Reviewer

Automated code review for GitHub pull requests. Analyzes diffs for security issues, error handling gaps, style problems, and test coverage.

## Prerequisites

- `gh` CLI installed and authenticated (`gh auth status`)
- Repository access (read at minimum, write for posting comments)
- Optional: `golangci-lint` for Go linting, `ruff` for Python linting

## Quick Start

```bash
# Review all open PRs in current repo
scripts/github/pr-reviewer.sh check

# Review a specific PR
scripts/github/pr-reviewer.sh review 42

# Post review as GitHub comment
scripts/github/pr-reviewer.sh post 42

# Check status of all open PRs
scripts/github/pr-reviewer.sh status

# List unreviewed PRs (useful for heartbeat/cron integration)
scripts/github/pr-reviewer.sh list-unreviewed
```

## Configuration

Set these environment variables or the script auto-detects from the current git repo:

- `PR_REVIEW_REPO` — GitHub repo in `owner/repo` format (default: detected from `gh repo view`)
- `PR_REVIEW_DIR` — Local checkout path for lint (default: git root of cwd)
- `PR_REVIEW_STATE` — State file path (default: `./data/pr-reviews.json`)
- `PR_REVIEW_OUTDIR` — Report output directory (default: `./data/pr-reviews/`)

## Directories Written

- **`PR_REVIEW_STATE`** (default: `./data/pr-reviews.json`) — Tracks reviewed PRs and their HEAD SHAs
- **`PR_REVIEW_OUTDIR`** (default: `./data/pr-reviews/`) — Markdown review reports

## What It Checks

| Category | Icon | Examples |
|----------|------|----------|
| Security | 🔴 | Hardcoded credentials, AWS keys, secrets in code |
| Error Handling | 🟡 | Discarded errors (Go `_ :=`), bare `except:` (Python), unchecked `Close()` |
| Risk | 🟠 | `panic()` calls, `process.exit()` |
| Style | 🔵 | `fmt.Print`/`print()`/`console.log` in prod, very long lines |
| TODOs | 📝 | TODO, FIXME, HACK, XXX markers |
| Test Coverage | 📊 | Source files changed without corresponding test changes |

## Smart Re-Review

Tracks HEAD SHA per PR. Only re-reviews when new commits are pushed. Use `review <PR#>` to force re-review.

## Report Format

Reports are saved as markdown files in the output directory. Each report includes:

- PR metadata (author, branch, changes)
- Commit list
- Changed file categorization by language/type
- Automated diff findings with file, line, category, and context
- Test coverage analysis
- Local lint results (when repo is checked out locally)
- Summary verdict: 🔴 SECURITY / 🟡 NEEDS ATTENTION / 🔵 MINOR NOTES / ✅ LOOKS GOOD

## Heartbeat/Cron Integration

Add to a periodic check (heartbeat, cron job, or CI):

```bash
UNREVIEWED=$(scripts/github/pr-reviewer.sh list-unreviewed)
if [ -n "$UNREVIEWED" ]; then
  scripts/github/pr-reviewer.sh check
fi
```

## Extending

The analysis patterns in the script are organized by language. Add new patterns by appending to the relevant pattern list in the `analyze_diff()` function:

```python
# Add a new Go pattern
go_patterns.append((r'^\+.*os\.Exit\(', 'RISK', 'Direct os.Exit() — consider returning error'))
```

「開發程式設計」分類下的熱門技能

程式設計大神.Skill開發程式設計

【全棧能力】程式設計大神.Skill:面向複雜真實專案的高階全棧程式設計助手。不止生成程式碼,而是從一句目標接手陌生程式碼庫,拆解需求、補齊實現、追到根因、完成重構、聯調前後端,並把結果推進到能執行、能驗證、能交付。覆蓋 Web、後端、指令碼、iOS、安卓、鴻蒙 ArkUI、微信小程式及其他技術棧,支援中英文工程、疑難 Bug、跨模組任務和長任務續做;用構建、日誌、真實入口、裝置或介面證據說明結果。僅問概念時直接回答,要求落地時持續推進到驗收或明確阻塞。

↓ 1125.9萬★ 82u_42bbb65f
程式設計專家Pro.Skill開發程式設計

程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。

↓ 626.9萬★ 32user_47d655f0
程式設計專家.Skill開發程式設計

程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。

↓ 600.7萬★ 378user_741dc82b
dev-expert開發程式設計

程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。

↓ 528.1萬★ 32user_814dbe54
dev-expert-pro開發程式設計

程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。

↓ 104.7萬★ -user_814dbe54
程式設計專家 Pro開發程式設計

程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。

↓ 98.2萬★ 1user_28275a78
程式設計專家.Skill開發程式設計

程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。

↓ 70.1萬★ 6user_613b33ea
Github開發程式設計

用 gh 命令列工具檢視 GitHub 上的 PR 檢查、工作流執行與 API 查詢的技能。

↓ 48萬★ 714Peter Steinberger

Brian Colinger 的其他技能

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。