agentleFS
ClickHouseClickHouse/clickhouse-js/.claude/skills/review/SKILL.md

review

Skill331 starsChanged 4 days agoApache-2.0View on GitHub

Review a change to `ClickHouse/clickhouse-js` locally: your own branch before a PR, a PR from another person, or uncommitted changes. It applies the repository's review criteria (`review-core.md`), runs the tests (also against the old code), starts independent reviewers, checks each finding against the code, and writes a report. It never posts to GitHub unless the user asks for it and approves the text. Use it when the task is to "review" a PR, a branch, a diff or a fix in this repository. Args: a PR number, a branch, a range (`<base>..<head>`), or nothing (the current changes).

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use close-spec, design-with-images and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • dzhngSkill

    close-spec

    When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).

    Also in 5 projects that use this

  • dzhngSkill

    design-with-images

    Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.

    Also in 5 projects that use this

  • LambenthanSkill

    daily-arxiv

    每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新

    Also in 5 projects that use this

  • LambenthanSkill

    exp-eval

    实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges

    Also in 5 projects that use this

  • +3 more from dzhng
  • +5 more from Lambenthan

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 4 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 154 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write the intent in one or two sentences: what the change promises, and what must stay true.

    line 30
  2. Distinctive:

    Read the root AGENTS.md and the AGENTS.md nearest to each changed file.

    line 32
  3. Very specific:

    If node_modules is missing, use the setup skill, but install with npm ci (step 2).

    line 49
  4. Very specific:

    Do not change the files of the review checkout: make a second worktree at the base (git worktree add --detach .local/base-<n> <base>, with …

    line 60
  5. Very specific:

    When the change has no test, write a small probe test.

    line 67
  6. Very specific:

    Docs: when the change touches user docs or contributor docs (README, CONTRIBUTING, AGENTS.md, harness docs) or what they describe, the …

    line 100
  7. Distinctive:

    If a reviewer is not available, do that pass yourself and say in the report that it was not independent.

    line 111
  8. Very specific:

    Check each finding against the code before you report it.

    line 116
  9. Very specific:

    Remove duplicates. Apply the severity scale and the "Low-value findings" rule of review-core.md: lower those to one-line nits, do not drop …

    line 119
  10. Distinctive:

    Keep it short. Do not list the checklist items that do not apply.

    line 135
  11. Very specific:

    Write the review as a draft in .local/pr<n>-review.md: a short thank-you, the main points, and the inline comments (file, line, text).

    line 139
  12. Very specific:

    If git status --short -- .claude/skills/review/review-core.md shows a change in that checkout, write <sha>-dirty, as git describe --dirty …

    line 150
  13. Very specific:

    Remove the worktrees under .local/ when the review is done.

    line 156

“Common” is measured: kept by at least 6 in 10 of the 154 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Review a clickhouse-js change

The criteria are in review-core.md. Read it first. This file is the process. Do the steps in order. When you skip a step, say why in the report.

1. Target and intent

  • PR number: gh pr view <n> --comments and gh pr diff <n>, the linked issue, and the reviews that exist. Do not repeat a point that another reviewer made; say that you agree.
  • Range: git diff <base> <head>.
  • Branch: git diff main...<branch>.
  • Nothing: the uncommitted changes: git diff HEAD (staged and unstaged) and the untracked files that git status --short shows (read the new ones). When there are no uncommitted changes, git diff main...HEAD.
  • Write the intent in one or two sentences: what the change promises, and what must stay true. Decide the kind: bug fix, feature, or other.
  • Read the root AGENTS.md and the AGENTS.md nearest to each changed file.

2. A checkout that you can run

  • Your own change: the current checkout.
  • A PR from another person: a separate worktree under .local/ (git-ignored), for example git worktree add .local/pr<n> <pr-head>. Do not push to the author's branch.
  • Install with npm ci, in the root and in each examples/ package that the change touches. npm ci does not change package-lock.json, so no install edits get into the review, and you do not have to restore a lockfile (a restore can delete lockfile edits that are part of the change). When npm ci fails because the lockfile and package.json do not match, that is a finding.

3. Tests

  • If node_modules is missing, use the setup skill, but install with npm ci (step 2). Then choose the tests by what the change touches (commands in review-core.md):
    • client code: the unit tests of the changed packages, then the integration tests;
    • types only: npm run typecheck, and read the types of changed test files (typecheck checks only src/);
    • CI workflows, scripts or the test harness: run the changed script or a dry run of it, and the harness's own tests. Do not run the client integration suites for them.
  • Old code. The tests of the changed behavior must fail on the old code. Do not change the files of the review checkout: make a second worktree at the base (git worktree add --detach .local/base-<n> <base>, with a name of its own), run npm ci and npm run build in it, copy the new test files into it, run them there, and remove it after. Do not link the review checkout's node_modules into it: the workspace links in node_modules/@clickhouse/ would point to the new code. Do not use git stash. When the change has no test, write a small probe test. Vitest runs only the files under packages/<pkg>/__tests__/ (see the package's vitest.config.ts), so put the probe there, with a name such as zz_probe.test.ts, in the base worktree and in the review checkout. Run it by name on both, and delete it before step 4, so that no reviewer sees it as part of the change.
  • A run counts only when the exit code is 0, the summary shows a test count above 0, and the new tests are in the output as run, not skipped. A run that must fail (for example a KNOWN_FAILURES group) counts when it fails for the expected reason.
  • A test that fails on the base commit too, with the same server, is not a finding of this change (for example a server newer than the code). Name it in one line under the test results.
  • Wait in the same turn. While tests or reviewers run in the background, check their results again in the same turn. Do not end your turn to wait for a notification: in some harnesses no notification wakes you.

4. Independent reviewers (at the same time)

Give each reviewer the target, the intent and the path of review-core.md, not your own conclusions. Ask it to attack the assumptions of the change.

  1. Checklist: a fresh subagent first picks the sections of review-core.md that the changed files touch, then goes through their items by ID: OK (with file:line) or finding. It does not list the items that do not apply. It reads the code around the diff, the callers, and the twin code in the other client.
  2. Bug review: the built-in code-review skill at high, with the exact range or PR in its arguments, and no --comment and no --fix. It runs as a fork and gets only its arguments, so when it starts, the checkout must hold no files other than the change (no probe test, no install edits). If it is not available, a second fresh subagent that looks only for bugs.
  3. Docs: when the change touches user docs or contributor docs (README, CONTRIBUTING, AGENTS.md, harness docs) or what they describe, the docs-drift-reviewer agent in report-only mode.
  4. Other clients: a fresh subagent checks how the other ClickHouse clients (Go, Java, C#, Python, Rust, C++) solve the same problem, with gh search code --owner ClickHouse <term> or local checkouts of their main. It reports for each client: the same design, a different design (which one), or the same bug, and whether the change goes against a design that the other clients share.
  5. A second model, if you have one (for example Codex), with the same brief.

If a reviewer is not available, do that pass yourself and say in the report that it was not independent.

5. Check each finding

  • Check each finding against the code before you report it. When you can, prove it: a failing test, or a small script in .local/ against the real server. Drop what does not hold, and say that you dropped it.
  • Remove duplicates. Apply the severity scale and the "Low-value findings" rule of review-core.md: lower those to one-line nits, do not drop them. Another case of the bug that the PR fixes is an incomplete fix (should_fix or must_fix), not pre_existing.

6. Report

Result first: can it merge, yes or no, and the one main reason. Then:

  • the findings, most severe first. Each one starts with the ID of the review-core.md item that it applies, for example [A3], or [—] when no item applies. Then: file:line, what is wrong, what goes wrong for a user (a concrete scenario), the evidence, and the fix;
  • the test results: unit, integration, old-code check;
  • the reviewer findings that you rejected, one line each;
  • what you did not check.

Keep it short. Do not list the checklist items that do not apply.

7. GitHub (only when the user asks)

Write the review as a draft in .local/pr<n>-review.md: a short thank-you, the main points, and the inline comments (file, line, text). Each finding starts with its item ID, as in the report. The draft ends with this line. <sha> is the last commit that changed the review-core.md that you read (git log -1 --format=%h -- .claude/skills/review/review-core.md in that checkout):

<sub>Reviewed with the clickhouse-js review skill (review-core.md at <sha>).</sub>

If git status --short -- .claude/skills/review/review-core.md shows a change in that checkout, write <sha>-dirty, as git describe --dirty does.

Show it to the user. Post it only after the user approves the final text, as one review. Add a label only when the user says so.

Remove the worktrees under .local/ when the review is done.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.