Not in the top 1,000 by GitHub stars

kyy-logs/code-review-skill

Auditable code review skill for Claude Code and Codex: four independent probes, evidence-backed findings, and a JSON-derived merge gate.

History

Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.

View weekly changes

skills/code-review/SKILL.md

Week of Nov 2, 2026 · +128 / −111 lines

Before Local scripts → After Local scripts

ffef7db766ca → 4965a94b5f8c

- 3 description: 写完代码、提交前或合并 PR 时使用;用户说“帮我 review”“提交前检查一下”“看看这次改动”“PR review”,或要求严格审查/合入门禁时也使用。
+ 3 description: Use when code has been written, before committing, or when merging a PR; also when the user says "review my code", "check before commit", "take a look at this change", "PR review", or asks for a strict review/merge gate.
- 6 # 代码审查
+ 6 # Code Review
- 8 > 检查代码缺陷、测试质量和变更影响,并确认已发现的问题是否闭环。
+ 8 > Check for code defects, test quality, and change impact, and confirm that the issues found are closed.
- 10 ## 资源与执行位置
+ 10 ## Resources and Execution Location
- 12 - `references/`、`scripts/`、`assets/` 均相对本次读取的 `SKILL.md` 所在目录。
- 13 - shell 命令从**被审项目根目录**执行;`docs/work/`、代码路径与项目规则均属于被审项目。
- 14 - 下文的 `CODE_REVIEW_SKILL_DIR` 指 skill 安装目录的绝对路径。每次 shell 调用都设置它,
- 15   或直接用实际绝对路径替换;不要假定不同 shell 调用会保留变量。
- 16 - 脚本需要 Bash、Git、awk、grep、sed 等基础命令。通过 `bash` 调用,无需依赖可执行位。
- 17 - 报告解析需要 Python 3.9+ 和 PyYAML;默认调用 `python`,可用 `CODE_REVIEW_PYTHON` 指定解释器绝对路径。
- 18   安装方式见发布仓库 README;仓库内入口为 `scripts/install.py`。
+ 12 - `references/`, `scripts/`, and `assets/` are relative to the directory containing the `SKILL.md` read for this run.
+ 13 - Run shell commands from the **reviewed project root**; `docs/work/`, code paths, and project rules all belong to the reviewed project.
+ 14 - `CODE_REVIEW_SKILL_DIR` below is the absolute path of the skill installation directory. Set it on every shell invocation, or replace it directly with the actual absolute path; do not assume variables persist across different shell invocations.
+ 15 - Scripts require basic commands such as Bash 3.2+, Git, awk, grep, and sed. Invoke them via `bash`; no executable bit is needed.
+ 16 - Report parsing requires Python 3.9+ and PyYAML; `python` is invoked by default, and `CODE_REVIEW_PYTHON` can specify the interpreter's absolute path.
+ 17   For installation, see the release repository README; the in-repo entry point is `scripts/install.py`.
- 20 ## 适用范围
+ 19 ## Scope
- 22 - 审查影响代码行为的功能、bug 修复、重构或配置变更。
- 23 - 不影响代码行为的纯文档、格式或错别字改动可跳过。
- 24 - 测试失败或尚未运行时仍可静态审查;报告须注明测试状态,不得宣称已满足合入条件。
+ 21 - Review functional, bug-fix, refactoring, or configuration changes that affect code behavior.
+ 22 - Pure documentation, formatting, or typo changes that do not affect code behavior may be skipped.
+ 23 - Static review is still possible when tests fail or have not been run; the report must state the test status and must not claim that merge conditions are met.
- 26 ## 输入
+ 25 ## Inputs
- 28 | 输入 | 必需 | 说明 |
+ 27 | Input | Required | Description |
- 30 | git 仓库 + 可 diff 的改动 | 是 | 明确审查未提交改动,还是已提交的 base/head 区间 |
- 31 | 验收标准 | 否 | 提供时按“可选收尾”逐条勾验 |
- 32 | 覆盖率数据 / 命令 | 否 | 提供时用于 `test-coverage` 的可选测量;未提供时仍执行相关测试代码的静态质量检查 |
- 33 | 规则包 | 否 | 默认 skill 内置 `references/rules/`;可用 `CODE_REVIEW_RULES_DIR` 覆盖 |
- 34 | 审查标识 | 否 | `{slug}`,默认 `<日期>-<主题>` |
+ 29 | git repository + diffable changes | Yes | Specify whether to review uncommitted changes or a committed base/head range |
+ 30 | Acceptance criteria | No | When provided, check them off one by one under "Optional Wrap-up" |
+ 31 | Coverage data / command | No | When provided, used for the optional measurement in `test-coverage`; without it, static quality checks on the relevant test code still run |
+ 32 | Rule pack | No | Defaults to the skill's built-in `references/rules/`; can be overridden with `CODE_REVIEW_RULES_DIR` |
+ 33 | Review identifier | No | `{slug}`, defaults to `<date>-<topic>` |
- 36 产物根目录为 `docs/work`,本次产物写入 `docs/work/active/{slug}/`。
+ 35 The artifact root `{output_root}` defaults to `docs/work`; override it with project `.code-review/config.json` `output_dir` or `CODE_REVIEW_OUTPUT_DIR`. This run's artifacts are written to `{output_root}/active/{slug}/`.
- 38 ## 审查流程
+ 37 ## Review Process
- 40 > 检查项不写死在本文件里,由 `references/probes.yaml` 注册表驱动。
- 41 > 探针的实现细节在 `references/probes/<探针名>.md`;本文件只管**编排**。
+ 39 > Check items are not hardcoded in this file; they are driven by the `references/probes.yaml` registry.
+ 40 > Probe implementation details are in `references/probes/<probe-name>.md`; this file covers **main workflow orchestration and shared probe execution boundaries**.
- 43 > **执行边界:默认进行静态审查。** 覆盖率检查优先复用已有报告;
- 44 > 需要测量时,可在本轮任务允许的范围内执行覆盖率命令。其他检查仍只读证据。
- 45 > 审查过程中不得修改被审源代码。测试与 CI 输出作为审查证据,
- 46 > **测试全绿不等于行为正确**。
+ 42 > **Execution boundary: static review by default.** For coverage checks, prefer reusing an existing report;
+ 43 > when measurement is needed, coverage commands may be run within what this round's task allows. Other checks remain read-only evidence.
+ 44 > Do not modify the reviewed source code during review. Test and CI output are review evidence;
+ 45 > **all tests green does not mean the behavior is correct**.
- 48 1. **确定审查范围**:
+ 47 1. **Determine the review scope**:
- 50    **选择模式**,未指定时默认审查未提交改动。下文的 base/head 均记录为具体 commit ID。
+ 49    **Choose a mode**; when unspecified, review uncommitted changes by default. The base/head below are recorded as concrete commit IDs.
- 52    - **未提交改动(worktree)**:base 为当前 HEAD。
- 53      用 `git diff <base> --` 收集暂存与未暂存改动;
- 54      用 `git ls-files --others --exclude-standard -z` 收集未跟踪文件,
- 55      并将其完整内容作为新增代码审查。
- 56    - **已提交区间(commits)**:按用户指定的 base/head,
- 57      用 `git diff <base> <head> --` 收集差异。
- 58      省略 head 时使用当前 HEAD,只审查该提交区间。
+ 51    - **Uncommitted changes (worktree)**: base is the current HEAD.
+ 52      Use `git diff <base> --` to collect staged and unstaged changes;
+ 53      use `git ls-files --others --exclude-standard -z` to collect untracked files,
+ 54      and review their full contents as newly added code.
+ 55    - **Committed range (commits)**: use the user-specified base/head,
+ 56      and collect the diff with `git diff <base> <head> --`.
+ 57      When head is omitted, use the current HEAD and review only that commit range.
- 60    **读取对应源码**:
- 61    - worktree 模式读取工作区文件。
- 62    - commits 模式用 `git show <head>:<路径>` 读取目标版本,
- 63      需要旧版本时读取 base。文件扫描仅使用与目标版本一致的磁盘文件。
+ 59    **Read the corresponding source**:
+ 60    - In worktree mode, read the working tree files.
+ 61    - In commits mode, use `git show <head>:<path>` to read the target version,
+ 62      and read base when an older version is needed. File scans use only on-disk files consistent with the target version.
- 65    **记录并交接**:保存模式、base、目标(工作区或 head)、变更文件清单及差异,
- 66    供所有探针使用。程序处理文件清单时使用 NUL 分隔,并逐路径引用传参。
+ 64    **Record and hand off**: save the mode, base, target (working tree or head), changed-file list, and diff,
+ 65    for use by all probes. Use NUL separators when processing the file list programmatically, and pass each path as a quoted argument.
- 68    收集完成后,再创建报告目录 `docs/work/active/{slug}/probes/`,
- 69    避免将新生成的报告纳入待审查文件。
+ 67    After collecting scope, initialize a new run before dispatching:
+ 68    ```bash
+ 69    bash "$CODE_REVIEW_SKILL_DIR/scripts/collect-metrics" init {slug}
+ 70    ```
+ 71    The returned JSON gives `review_dir`, `output_dir`, `line_target`, and `branch_target`.
+ 72    Existing active directories, archived runs, or event history with the same slug are rejected.
+ 73    Use a unique slug for a new review; explicitly continuing the same run reuses its directory without init.
+ 74    Never dispatch two runs writing the same directory. Pass the actual directory and effective targets to all probes,
+ 75    overriding the registry's coverage defaults. Init creates the report template.
+ 76    Source inspection is read-only; the workflow writes reports, probe JSON, policy.json, events, and archive metrics.
- 71 2. **读注册表,确定探针清单**:Read `references/probes.yaml`,按 `requires` 判断:
- 72    - 指定了但缺失 / 不可读 → `error`
- 73    - 未提供可选输入 → `skipped`,写明缺什么
- 74    - 可用 → 执行
+ 78 2. **Read the registry and determine the probe list**: Read `references/probes.yaml` and decide by `requires`:
+ 79    - Specified but missing / unreadable → `error`
+ 80    - Optional input not provided → `skipped`, stating what is missing
+ 81    - Available → execute
- 76 3. **并行执行探针**:
+ 83 3. **Run probes in parallel**:
- 78    **派发**:主执行器按注册表为每个探针派发独立代理,提供审查范围、diff、项目根、skill 路径及该探针的输入和 `params`,并在派发提示中包含上文“执行边界”和本步骤“执行”段的公共约束。
- 79    代理读取注册项 `file` 指向的说明和 `references/output-schema.md`,按参数执行。
- 80    并发槽位不足时分批执行;没有独立代理能力时串行执行并记录限制。
+ 85    **Dispatch**: the main executor dispatches an independent agent per probe according to the registry, providing the review scope, diff, project root, skill path, and that probe's inputs and `params`, and including in the dispatch prompt "Execution boundary" above and "Shared probe constraints" in this step.
+ 86    Also pass any provided requirements, acceptance criteria, and change context as text or file paths, and ask each probe to read relevant material. Note missing inputs without inventing them.
+ 87    If dependency source or contract material is already available, pass its path, version, and origin for on-demand reuse; do not pre-download all dependencies.
- 82    **执行**:代理只检查自己的探针,不重跑完整流程或再派发代理;源码版本遵循步骤 1。
- 83    finding 须说明本次改动如何引入或触发该问题;无关的存量问题单独说明,不纳入本轮 finding 清单及计数。
- 84    复用已读上下文,仅按需补读;独立只读查询尽量合并,有依赖的查询逐步执行,首次读取源码时保留准确行号和必要上下文。

This preview is limited. See the complete change on GitHub.

Compare on GitHub

Week of Oct 26, 2026 · Line counts unavailable

Before Not checked yet → After Local scripts

First observation → ffef7db766ca

No earlier version was observed for comparison.

Compare on GitHub

skills/code-review-zh/SKILL.md

Week of Nov 2, 2026 · Line counts unavailable

Before Not checked yet → After Local scripts

First observation → 4965a94b5f8c

No earlier version was observed for comparison.

Compare on GitHub

View on GitHubAdd to my skills

Verified commit 4965a94b5f8c5b94c4f1588bb5f2cd791b17bac1

394GitHub stars
293stars in 7 days
2skills in this repository
76commits in 30 days

Heat

8.3
  • Star growth, last 7 daysNot available
  • Star growth, last 24 hoursNot available
  • Rank movement, last 7 daysNot available
  • Commits, last 30 daysNot available
  • Accounts asking about it through MCP, last 7 daysNot available
  • Hot votes this weekNot available

Heat never changes the order by stars, and sponsorship never touches it. How heat works

Stars over time

Oct 31, 2026Nov 8, 2026394

30-day change not yet available: not enough history.

Individual skills in this repository

How it works

code-review

When your agent uses it

Use when code has been written, before committing, or when merging a PR; also when the user says "review my code", "check before commit", "take a look at this change", "PR review", or asks for a strict review/merge gate.

What it loads into context

Frontmatter

60 tokens

Always available to the agent

SKILL.md

3,457 tokens

When the skill is activated

Reference documents

17,592 tokens

Loaded on request

Token counts are estimates. Scripts run separately; they are not counted as reference context.

The playbook

  1. Resources and Execution Location
  2. Scope
  3. Inputs
  4. Review Process
  5. <HARD-GATE>
  6. Output Contract
  7. Optional Wrap-up

Scripts executed separately

  • ../../scripts/install.py
  • scripts/collect-metrics
  • scripts/lib-metrics
  • scripts/rule-grep
  • scripts/sync-results.py

Files

  • ../../scripts/install.pyruns8,114 bytes
  • SKILL.mdcore16,307 bytes
  • SKILL.mdcore16,307 bytes
  • SKILL.mdcore16,307 bytes
  • SKILL.mdcore16,307 bytes
  • SKILL.mdcore16,307 bytes
  • SKILL.mdcore16,307 bytes
  • SKILL.mdcore16,307 bytes
  • SKILL.mdcore16,307 bytes
  • SKILL.mdcore16,307 bytes
  • SKILL.mdcore16,307 bytes
  • SKILL.mdcore16,307 bytes
  • assets/code-review.mddoc2,382 bytes
  • assets/report-labels.jsonasset2,194 bytes
  • references/concurrency-examples.mddoc3,599 bytes
  • references/output-schema.mddoc9,741 bytes
  • references/probes.yamlasset1,318 bytes
  • references/probes/behavior-review.mddoc10,002 bytes
  • references/probes/impact-analysis.mddoc4,518 bytes
  • references/probes/repo-guard.mddoc2,908 bytes
  • references/probes/test-coverage.mddoc6,005 bytes
  • references/rules/baseline-java.mddoc2,515 bytes
  • references/rules/concurrency.mddoc4,466 bytes
  • references/rules/exception-logging.mddoc5,060 bytes
  • references/rules/index.mddoc2,053 bytes
  • references/rules/naming-format.mddoc5,525 bytes
  • references/rules/oop-collection.mddoc7,153 bytes
  • references/rules/security.mddoc3,514 bytes
  • references/rules/spring-performance.mddoc3,551 bytes
  • references/rules/testing-engineering.mddoc5,666 bytes
  • scripts/collect-metricsruns15,036 bytes
  • scripts/lib-metricsruns37,776 bytes
  • scripts/rule-grepruns10,380 bytes
  • scripts/sync-results.pyruns20,542 bytes
Read SKILL.md

# Code Review

> Check for code defects, test quality, and change impact, and confirm that the issues found are closed.

## Resources and Execution Location

- `references/`, `scripts/`, and `assets/` are relative to the directory containing the `SKILL.md` read for this run.
- Run shell commands from the **reviewed project root**; `docs/work/`, code paths, and project rules all belong to the reviewed project.
- `CODE_REVIEW_SKILL_DIR` below is the absolute path of the skill installation directory. Set it on every shell invocation, or replace it directly with the actual absolute path; do not assume variables persist across different shell invocations.
- Scripts require basic commands such as Bash 3.2+, Git, awk, grep, and sed. Invoke them via `bash`; no executable bit is needed.
- Report parsing requires Python 3.9+ and PyYAML; `python` is invoked by default, and `CODE_REVIEW_PYTHON` can specify the interpreter's absolute path.
  For installation, see the release repository README; the in-repo entry point is `scripts/install.py`.

## Scope
View the complete source on GitHub

Skills included

  • code-review
  • code-review-zh

Repository facts

License
MIT
Created
Oct 29, 2026
Last pushed
Nov 6, 2026
Forks
2
Open issues
1
Project activity
Active

Before you install

Local scripts

Automated signals, not a guarantee

Checked Nov 6, 2026

Not fully analyzed: some files were too long, unreadable or missing. This never lowers the level.

Show 17 notes
  • skills/code-review/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review-zh/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review-zh/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review-zh/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review-zh/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review-zh/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review-zh/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/code-review-zh/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
Show all 14 signals by file

scripts/install.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Executable scriptline 1
    #!/usr/bin/env python3

skills/code-review-zh/references/probes/test-coverage.md

  • Network accessline 66
    这是 [JaCoCo 的行覆盖口径](https://www.jacoco.org/jacoco/trunk/doc/counters.html):

skills/code-review-zh/scripts/collect-metrics

  • Executable scriptline 1
    #!/usr/bin/env bash

skills/code-review-zh/scripts/lib-metrics

  • Executable scriptline 1
    #!/usr/bin/env bash

skills/code-review-zh/scripts/rule-grep

  • Executable scriptline 1
    #!/usr/bin/env bash

skills/code-review-zh/scripts/sync-results.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Access to secretsline 77
    [Credential-related source omitted]

skills/code-review/references/probes/test-coverage.md

  • Network accessline 66
    This is [JaCoCo's line coverage definition](https://www.jacoco.org/jacoco/trunk/doc/counters.html):

skills/code-review/scripts/collect-metrics

  • Executable scriptline 1
    #!/usr/bin/env bash

skills/code-review/scripts/lib-metrics

  • Executable scriptline 1
    #!/usr/bin/env bash

skills/code-review/scripts/rule-grep

  • Executable scriptline 1
    #!/usr/bin/env bash

skills/code-review/scripts/sync-results.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Access to secretsline 77
    [Credential-related source omitted]

How the signals fit together

Facts from a static read of the files at the pinned commit. They describe what the code does, not why.

Signal confidence: 14 facts

Works with

Agent compatibility, from the files in this repository
AgentStatusEvidenceInstall to
Claude CodeCompatibleStandard SKILL.md skills/code-review/SKILL.md.claude/skills/<skill-name>/
CodexCompatibleStandard SKILL.md skills/code-review/SKILL.md.agents/skills/<skill-name>/
CursorCompatibleStandard SKILL.md skills/code-review/SKILL.md.cursor/skills/<skill-name>/
Gemini CLICompatibleStandard SKILL.md skills/code-review/SKILL.md.gemini/skills/<skill-name>/
GitHub CopilotCompatibleStandard SKILL.md skills/code-review/SKILL.md.github/skills/<skill-name>/
OpenCodeCompatibleStandard SKILL.md skills/code-review/SKILL.md.opencode/skills/<skill-name>/
  • Native The repository ships a manifest, folder or frontmatter field for this agent.
  • Compatible A standard SKILL.md that this agent can read.
  • Unknown No evidence either way.

Derived automatically from paths, manifests and frontmatter. Not tested on each agent.