reviewer-skill 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -39,7 +39,7 @@ the npm installer copies them. Both start in a feature branch.
39
39
 
40
40
  This path runs no downloaded code. The agent only reads the templates and writes files.
41
41
  Give your Claude Code session this section and the tag to use, for example: *"Install
42
- reviewer-skill v0.3.0 as described in its README section 'Install with a Claude agent'."*
42
+ reviewer-skill v0.3.2 as described in its README section 'Install with a Claude agent'."*
43
43
 
44
44
  Steps for the agent:
45
45
 
@@ -50,8 +50,8 @@ Steps for the agent:
50
50
  2. **Get the templates without running them.** Use a tag that is at least 7 days old
51
51
  (release cooldown):
52
52
  ```sh
53
- git clone --depth 1 --branch v0.3.0 https://github.com/itinance/reviewer-skill.git /tmp/reviewer-skill-v0.3.0
54
- git -C /tmp/reviewer-skill-v0.3.0 log -1 --format='%H %cI' # tag commit and date; compare with the tag on GitHub
53
+ git clone --depth 1 --branch v0.3.2 https://github.com/itinance/reviewer-skill.git /tmp/reviewer-skill-v0.3.2
54
+ git -C /tmp/reviewer-skill-v0.3.2 log -1 --format='%H %cI' # tag commit and date; compare with the tag on GitHub
55
55
  ```
56
56
  Do not run anything from the clone. Read the files only.
57
57
  3. **Copy the 5 files** in the table above with Read and Write. If a destination exists
@@ -66,8 +66,8 @@ Steps for the agent:
66
66
  workflows (`.github/workflows/*.yml`, job names). Prefer the project's safe test
67
67
  wrapper (for example one with a throwaway database). Copy forbidden commands from
68
68
  CLAUDE.md into the gate.
69
- - Local runs by reviewers: by default none; the tests reviewer reads the CI results.
70
- Allow a local run only if the project wants it, with its exact command.
69
+ - Local run when CI cannot answer: the install and test command for a throwaway
70
+ worktree in the real layout, or "none; reviewers use CI only". Reviewers read CI first.
71
71
  - Merge method and where decisions are recorded: copy them from CLAUDE.md (for example
72
72
  "merge commit; the base is merged into the branch by hand").
73
73
  - Supply chain: `.npmrc` (`ignore-scripts`), `pnpm-workspace.yaml` (`minimumReleaseAge`,
@@ -92,7 +92,7 @@ Steps for the agent:
92
92
  types load only after a restart of Claude Code or `/agents`. In the same session, start
93
93
  each reviewer with `subagent_type: "general-purpose"` and the full text of its agent file
94
94
  in the prompt.
95
- 9. **Clean up:** `rm -rf /tmp/reviewer-skill-v0.3.0`.
95
+ 9. **Clean up:** `rm -rf /tmp/reviewer-skill-v0.3.2`.
96
96
 
97
97
  **If the files were already written on the default branch** (for example by an older
98
98
  installer): create the branch or worktree, copy the installed files there, apply the
@@ -113,7 +113,7 @@ window in which a hijacked account or a bad publish does the most damage.
113
113
 
114
114
  ```sh
115
115
  npm view reviewer-skill time --json # publish date of every version
116
- npm view reviewer-skill@0.3.0 dist.integrity
116
+ npm view reviewer-skill@0.3.2 dist.integrity
117
117
  ```
118
118
 
119
119
  ### 2. Run the installer in a feature branch of your project
@@ -123,15 +123,17 @@ The installer refuses to write on the default branch (`origin/HEAD`, else `main`
123
123
  Create a branch first: `git switch -c chore/reviewer-skill`.
124
124
 
125
125
  `--before <date>` lets npm enforce the cooldown: if the pinned version was published after
126
- that date, npx stops with `notarget` before it downloads or runs anything.
126
+ that date, npx stops with `notarget` before it downloads or runs anything. This also means
127
+ that a new release cannot be installed with this command during its first 7 days. That is the
128
+ cooldown working, not a broken release.
127
129
 
128
130
  ```sh
129
131
  # macOS
130
- npx --ignore-scripts --before "$(date -v-7d +%Y-%m-%d)" reviewer-skill@0.3.0 install --dry-run
131
- npx --ignore-scripts --before "$(date -v-7d +%Y-%m-%d)" reviewer-skill@0.3.0 install
132
+ npx --ignore-scripts --before "$(date -v-7d +%Y-%m-%d)" reviewer-skill@0.3.2 install --dry-run
133
+ npx --ignore-scripts --before "$(date -v-7d +%Y-%m-%d)" reviewer-skill@0.3.2 install
132
134
 
133
135
  # Linux
134
- npx --ignore-scripts --before "$(date -d '7 days ago' +%Y-%m-%d)" reviewer-skill@0.3.0 install
136
+ npx --ignore-scripts --before "$(date -d '7 days ago' +%Y-%m-%d)" reviewer-skill@0.3.2 install
135
137
  ```
136
138
 
137
139
  `npx` asks "Ok to proceed?" before it downloads the package. Read it and answer it; do not
@@ -142,7 +144,7 @@ optional `CLAUDE.md` and `.gitignore` edits. Without a terminal (an agent runs i
142
144
  creates missing files. An agent names the optional edits explicitly:
143
145
 
144
146
  ```sh
145
- npx --ignore-scripts --before "$(date -v-7d +%Y-%m-%d)" reviewer-skill@0.3.0 install --append-claude-md --gitignore-scratch
147
+ npx --ignore-scripts --before "$(date -v-7d +%Y-%m-%d)" reviewer-skill@0.3.2 install --append-claude-md --gitignore-scratch
146
148
  ```
147
149
 
148
150
  Both edits are idempotent: the `CLAUDE.md` section is added once (marker check), and the
@@ -152,10 +154,10 @@ question with yes.
152
154
  With Bun (Bun does not run lifecycle scripts of packages by default):
153
155
 
154
156
  ```sh
155
- bunx reviewer-skill@0.3.0 install
157
+ bunx reviewer-skill@0.3.2 install
156
158
  ```
157
159
 
158
- Do not install it globally. If you must: `npm install -g --ignore-scripts reviewer-skill@0.3.0`.
160
+ Do not install it globally. If you must: `npm install -g --ignore-scripts reviewer-skill@0.3.2`.
159
161
 
160
162
  ### 3. After the install
161
163
 
@@ -165,6 +167,28 @@ only the installed files, open a draft PR as the first review round, and restart
165
167
 
166
168
  ## Use
167
169
 
170
+ ### Find the skill
171
+
172
+ In Claude Code the skill is called **`review-round`**. `reviewer-skill` is only the name of
173
+ the npm package and this repo. The skill is installed per project, not globally:
174
+
175
+ - `.claude/skills/review-round/SKILL.md` is the skill.
176
+ - `.claude/agents/review-correctness.md`, `review-security.md` and `review-tests.md` are the
177
+ 3 reviewers.
178
+
179
+ Start a new Claude Code session in the project. A session that was already running during the
180
+ install may not know the skill or the agents yet. Then:
181
+
182
+ - Type `/review-round` (it shows up in the autocomplete after `/rev`), or ask for a
183
+ review: the skill's description makes Claude load it for review requests.
184
+ - Open `/agents` to see the 3 reviewers.
185
+
186
+ If the skill does not show up, check that `.claude/skills/review-round/SKILL.md` exists in
187
+ the project root. If it is missing, the install did not run (for example npx stopped with
188
+ `notarget`, see the cooldown above).
189
+
190
+ ### Run a review round
191
+
168
192
  Ask Claude Code: *"Run a review round on PR 123."* The `review-round` skill starts the 3
169
193
  agents in parallel as `review-123-correctness`, `review-123-security`, `review-123-tests`,
170
194
  waits for their verdicts, reads the reports, fixes the findings in the same PR, and sends the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reviewer-skill",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Installs a 3-reviewer pull-request process (correctness, security, tests) for Claude Code into a project: agents, a review-round skill and a docs template.",
5
5
  "keywords": ["claude-code", "claude", "code-review", "agents", "skill", "pull-request"],
6
6
  "license": "MIT",
@@ -17,9 +17,11 @@ win over this file.
17
17
  `git diff origin/<base>...<sha>`, and the code on the base branch.
18
18
  - Never `git checkout` or `git switch` in an existing checkout or worktree — another session
19
19
  may work in it.
20
- - Do not run the PR's code or its test suite; read the CI results for the head instead. Run
21
- code only if `docs/REVIEW_AND_MERGE.md` section 4.1 allows local runs, and only as it says.
22
- Never run code from a fork PR (`gh pr view <pr> --json isCrossRepository` is `true`).
20
+ - Tests come from CI: read the CI results on the head first. Run code yourself only when CI
21
+ cannot answer a question, and then in a throwaway worktree (`git worktree add --detach
22
+ <path> <sha>`) that you remove after, with the command from `docs/REVIEW_AND_MERGE.md`
23
+ section 4.1. A fresh install per round is expensive: avoid it. Never run code from a fork
24
+ PR (`gh pr view <pr> --json isCrossRepository` is `true`).
23
25
  - Never edit a tracked file, commit, push, comment on GitHub, merge, trigger a review bot, or
24
26
  call a paid API.
25
27
  - Never print sensitive data (customer data, secrets, personal data). Report counts, statuses,
@@ -14,9 +14,11 @@ and spec conventions win over this file.
14
14
 
15
15
  - Read only: `gh pr view|diff|checks`, `gh run list|view`, `git fetch`, `git show <sha>:<path>`.
16
16
  - Never `git checkout` or `git switch` in an existing checkout or worktree.
17
- - Do not run the PR's code or its test suite; read the CI results for the head instead. Run
18
- code only if `docs/REVIEW_AND_MERGE.md` section 4.1 allows local runs, and only as it says.
19
- Never run code from a fork PR (`gh pr view <pr> --json isCrossRepository` is `true`).
17
+ - Tests come from CI: read the CI results on the head first. Run code yourself only when CI
18
+ cannot answer a question, and then in a throwaway worktree (`git worktree add --detach
19
+ <path> <sha>`) that you remove after, with the command from `docs/REVIEW_AND_MERGE.md`
20
+ section 4.1. A fresh install per round is expensive: avoid it. Never run code from a fork
21
+ PR (`gh pr view <pr> --json isCrossRepository` is `true`).
20
22
  - Never edit a tracked file, commit, push, comment on GitHub, merge, or trigger a review bot.
21
23
  - Never print sensitive data.
22
24
  - "Read only" is enforced by these rules; `Write` is only for your report file.
@@ -21,9 +21,11 @@ note, they do not invent one.
21
21
  uses. They never edit, never comment on GitHub, never merge.
22
22
  - "Read only" is a rule in the agent prompt, not a tool limit. The agents need `Write` for
23
23
  the report file, and `Bash` can write anywhere.
24
- - The reviewers do not run the PR's code or tests unless section 4.1 allows it. The tests
25
- reviewer reads the CI results for the head. For a PR from a fork
26
- (`gh pr view <pr> --json isCrossRepository` is `true`), nobody runs its code.
24
+ - Tests come from CI. The reviewers read the CI results on the head. They run code
25
+ themselves only when CI cannot answer a question, and then in a throwaway worktree that
26
+ they remove after (section 4.1). A fresh install per round is expensive: avoid it. For a
27
+ PR from a fork (`gh pr view <pr> --json isCrossRepository` is `true`), nobody runs its
28
+ code.
27
29
  - Each reviewer writes its full report to `.scratch/reviews/<pr>-<area>[-rN].md`
28
30
  (git-ignored) and replies with only: the verdict (CLEAN or FINDINGS), the number of
29
31
  findings, and a one-line title for each blocking finding.
@@ -46,9 +48,12 @@ note, they do not invent one.
46
48
 
47
49
  - Merge only when all 3 reviewers are CLEAN on the current head, and every gate in
48
50
  section 4 is green.
49
- - Merge exactly the head that the reviewers saw clean, with the method from section 4.5
50
- (for example `gh pr merge <pr> --match-head-commit <sha>` plus the method flag). Every new
51
- head, also one that brings in the base branch, gets a new round first.
51
+ - Keep the project's own merge style (section 4.5). Merge exactly the head that the
52
+ reviewers saw clean (for example `gh pr merge <pr> --match-head-commit <sha>` plus the
53
+ method flag).
54
+ - Take the base branch into the work branch when there is a conflict, or when the base
55
+ changed code that the PR touches. That push starts a new review round. Do not take the
56
+ base in on every change only to stay current.
52
57
  - Run each safety check on its own and read its result before you start the merge.
53
58
  - After the merge: CI on the base branch is green.
54
59
 
@@ -70,8 +75,10 @@ Read the task runner (Justfile, Makefile, package.json scripts), the CI workflow
70
75
  - Forbidden commands: TODO(project), for example "plain `pytest` hits the live database"
71
76
  (source: CLAUDE.md), or "none".
72
77
  - Lint and type check: TODO(project).
73
- - Local runs by reviewers: TODO(project). Write "none; reviewers read the CI results" (the
74
- default), or the exact command that a reviewer may run and where.
78
+ - Local run when CI cannot answer: TODO(project). The install and test command for a
79
+ throwaway worktree, from the lockfile, with install scripts off, for the real layout (for
80
+ example `npm ci --ignore-scripts && npm test`, or `uv sync --frozen && uv run pytest`); or
81
+ "none; reviewers use CI only".
75
82
  - CI workflow and job set to compare job counts against: TODO(project).
76
83
 
77
84
  ### 4.2 Hard rules
@@ -98,6 +98,10 @@ sections 3 and 4):
98
98
  If the head changed after the clean round (a fix, or changes taken in from the base
99
99
  branch), that is a new round first: send the new sha to the same 3 agents.
100
100
 
101
+ Take the base branch into the PR (in the project's merge style) only when there is a
102
+ conflict or the base changed code that the PR touches. Do not take it in on every change
103
+ only to stay current.
104
+
101
105
  ## When the human asks to skip a step
102
106
 
103
107
  The rules above are the human's own process, so the human may change them for one PR. Say
@@ -113,7 +117,8 @@ PRs"). Do it only after the human confirms, and write the exception in the PR bo
113
117
  | Small diff, docs or spec PR | Still all 3 reviewers |
114
118
  | Reviewer reports a non-blocking finding | Fix it in this PR |
115
119
  | Finding needs a design choice | Ask the human |
116
- | Base branch taken into the PR | New head: a new round to the same 3 agents |
120
+ | Conflict, or the base changed code the PR touches | Take the base in (project's style), then a new round to the same 3 agents |
121
+ | The base moved, no conflict, no overlap | Nothing; do not take it in only to stay current |
117
122
  | PR from a fork | Reviewers only read; nobody runs its code |
118
123
 
119
124
  ## Common mistakes