reviewer-skill 0.2.0 → 0.3.0
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.
|
|
42
|
+
reviewer-skill v0.3.0 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.
|
|
54
|
-
git -C /tmp/reviewer-skill-v0.
|
|
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
|
|
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,9 +66,10 @@ 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
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
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.
|
|
71
|
+
- Merge method and where decisions are recorded: copy them from CLAUDE.md (for example
|
|
72
|
+
"merge commit; the base is merged into the branch by hand").
|
|
72
73
|
- Supply chain: `.npmrc` (`ignore-scripts`), `pnpm-workspace.yaml` (`minimumReleaseAge`,
|
|
73
74
|
`onlyBuiltDependencies`, `ignoredBuiltDependencies`), `bunfig.toml`, the uv/pip config
|
|
74
75
|
(`exclude-newer`). If no setting enforces a cooldown, write "not enforced by config;
|
|
@@ -91,7 +92,7 @@ Steps for the agent:
|
|
|
91
92
|
types load only after a restart of Claude Code or `/agents`. In the same session, start
|
|
92
93
|
each reviewer with `subagent_type: "general-purpose"` and the full text of its agent file
|
|
93
94
|
in the prompt.
|
|
94
|
-
9. **Clean up:** `rm -rf /tmp/reviewer-skill-v0.
|
|
95
|
+
9. **Clean up:** `rm -rf /tmp/reviewer-skill-v0.3.0`.
|
|
95
96
|
|
|
96
97
|
**If the files were already written on the default branch** (for example by an older
|
|
97
98
|
installer): create the branch or worktree, copy the installed files there, apply the
|
|
@@ -112,7 +113,7 @@ window in which a hijacked account or a bad publish does the most damage.
|
|
|
112
113
|
|
|
113
114
|
```sh
|
|
114
115
|
npm view reviewer-skill time --json # publish date of every version
|
|
115
|
-
npm view reviewer-skill@0.
|
|
116
|
+
npm view reviewer-skill@0.3.0 dist.integrity
|
|
116
117
|
```
|
|
117
118
|
|
|
118
119
|
### 2. Run the installer in a feature branch of your project
|
|
@@ -126,11 +127,11 @@ that date, npx stops with `notarget` before it downloads or runs anything.
|
|
|
126
127
|
|
|
127
128
|
```sh
|
|
128
129
|
# macOS
|
|
129
|
-
npx --ignore-scripts --before "$(date -v-7d +%Y-%m-%d)" reviewer-skill@0.
|
|
130
|
-
npx --ignore-scripts --before "$(date -v-7d +%Y-%m-%d)" reviewer-skill@0.
|
|
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
|
|
131
132
|
|
|
132
133
|
# Linux
|
|
133
|
-
npx --ignore-scripts --before "$(date -d '7 days ago' +%Y-%m-%d)" reviewer-skill@0.
|
|
134
|
+
npx --ignore-scripts --before "$(date -d '7 days ago' +%Y-%m-%d)" reviewer-skill@0.3.0 install
|
|
134
135
|
```
|
|
135
136
|
|
|
136
137
|
`npx` asks "Ok to proceed?" before it downloads the package. Read it and answer it; do not
|
|
@@ -141,7 +142,7 @@ optional `CLAUDE.md` and `.gitignore` edits. Without a terminal (an agent runs i
|
|
|
141
142
|
creates missing files. An agent names the optional edits explicitly:
|
|
142
143
|
|
|
143
144
|
```sh
|
|
144
|
-
npx --ignore-scripts --before "$(date -v-7d +%Y-%m-%d)" reviewer-skill@0.
|
|
145
|
+
npx --ignore-scripts --before "$(date -v-7d +%Y-%m-%d)" reviewer-skill@0.3.0 install --append-claude-md --gitignore-scratch
|
|
145
146
|
```
|
|
146
147
|
|
|
147
148
|
Both edits are idempotent: the `CLAUDE.md` section is added once (marker check), and the
|
|
@@ -151,10 +152,10 @@ question with yes.
|
|
|
151
152
|
With Bun (Bun does not run lifecycle scripts of packages by default):
|
|
152
153
|
|
|
153
154
|
```sh
|
|
154
|
-
bunx reviewer-skill@0.
|
|
155
|
+
bunx reviewer-skill@0.3.0 install
|
|
155
156
|
```
|
|
156
157
|
|
|
157
|
-
Do not install it globally. If you must: `npm install -g --ignore-scripts reviewer-skill@0.
|
|
158
|
+
Do not install it globally. If you must: `npm install -g --ignore-scripts reviewer-skill@0.3.0`.
|
|
158
159
|
|
|
159
160
|
### 3. After the install
|
|
160
161
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reviewer-skill",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
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",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
## Review and merge
|
|
2
2
|
|
|
3
|
-
Every PR round gets 3 separate review agents: `review-correctness`, `review-security`, `review-tests` (`.claude/agents/`). This also applies to small diffs, docs, specs and dependency bumps. Run a round with the `review-round` skill. A re-round after a fix push goes to the same 3 named agents (`SendMessage`), not to new ones. Fix review findings in the same PR, never in a new PR. Merge only when all 3 are clean on the current head, with
|
|
3
|
+
Every PR round gets 3 separate review agents: `review-correctness`, `review-security`, `review-tests` (`.claude/agents/`). This also applies to small diffs, docs, specs and dependency bumps. Run a round with the `review-round` skill. A re-round after a fix push goes to the same 3 named agents (`SendMessage`), not to new ones. Fix review findings in the same PR, never in a new PR. Merge only when all 3 are clean on the current head, with the project's merge method. The full rules and the project gates are in `docs/REVIEW_AND_MERGE.md`.
|
|
@@ -17,10 +17,9 @@ 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
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
its own dependency install from the lockfile, and remove it at the end.
|
|
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`).
|
|
24
23
|
- Never edit a tracked file, commit, push, comment on GitHub, merge, trigger a review bot, or
|
|
25
24
|
call a paid API.
|
|
26
25
|
- Never print sensitive data (customer data, secrets, personal data). Report counts, statuses,
|
|
@@ -14,10 +14,9 @@ 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
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
the end.
|
|
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`).
|
|
21
20
|
- Never edit a tracked file, commit, push, comment on GitHub, merge, or trigger a review bot.
|
|
22
21
|
- Never print sensitive data.
|
|
23
22
|
- "Read only" is enforced by these rules; `Write` is only for your report file.
|
|
@@ -35,8 +34,9 @@ Code PR:
|
|
|
35
34
|
run. Note whether the head is behind the base branch.
|
|
36
35
|
|
|
37
36
|
Spec PR and the spec part of a code PR:
|
|
38
|
-
- The spec describes the current intended state and matches the code;
|
|
39
|
-
|
|
37
|
+
- The spec describes the current intended state and matches the code; every human decision
|
|
38
|
+
is recorded where the project records decisions, with its source and date; no open question
|
|
39
|
+
blocks the build.
|
|
40
40
|
- Each item has a test plan that would catch its bug; acceptance criteria are testable (no
|
|
41
41
|
"about", "nice", "clear").
|
|
42
42
|
- The project's doc conventions are kept.
|
|
@@ -21,9 +21,9 @@ 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
|
|
25
|
-
|
|
26
|
-
(`gh pr view <pr> --json isCrossRepository` is `true`),
|
|
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.
|
|
27
27
|
- Each reviewer writes its full report to `.scratch/reviews/<pr>-<area>[-rN].md`
|
|
28
28
|
(git-ignored) and replies with only: the verdict (CLEAN or FINDINGS), the number of
|
|
29
29
|
findings, and a one-line title for each blocking finding.
|
|
@@ -46,12 +46,10 @@ note, they do not invent one.
|
|
|
46
46
|
|
|
47
47
|
- Merge only when all 3 reviewers are CLEAN on the current head, and every gate in
|
|
48
48
|
section 4 is green.
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- Never merge the base branch into a work branch. When the head is behind, the merge step
|
|
54
|
-
runs `gh pr update-branch <pr>`, and the reviewers check CI again on the new head.
|
|
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.
|
|
52
|
+
- Run each safety check on its own and read its result before you start the merge.
|
|
55
53
|
- After the merge: CI on the base branch is green.
|
|
56
54
|
|
|
57
55
|
## 4. Project gates
|
|
@@ -72,10 +70,8 @@ Read the task runner (Justfile, Makefile, package.json scripts), the CI workflow
|
|
|
72
70
|
- Forbidden commands: TODO(project), for example "plain `pytest` hits the live database"
|
|
73
71
|
(source: CLAUDE.md), or "none".
|
|
74
72
|
- Lint and type check: TODO(project).
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
`pnpm install --frozen-lockfile --ignore-scripts` (add `--ignore-workspace` for a
|
|
78
|
-
standalone app inside a workspace); `uv sync --frozen`.
|
|
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.
|
|
79
75
|
- CI workflow and job set to compare job counts against: TODO(project).
|
|
80
76
|
|
|
81
77
|
### 4.2 Hard rules
|
|
@@ -111,12 +107,15 @@ Read `.npmrc`, `pnpm-workspace.yaml` (`minimumReleaseAge`, `onlyBuiltDependencie
|
|
|
111
107
|
"none". If a bot is used: keep it paused until the 3 reviewers are clean, then trigger it
|
|
112
108
|
once. A pause posted right after `gh pr create` does not stop the first review: open the
|
|
113
109
|
PR as a draft, pause the bot, wait for its confirmation, then mark the PR ready.
|
|
114
|
-
-
|
|
110
|
+
- Merge method, and how a branch takes in changes from the base branch: TODO(project), for
|
|
111
|
+
example "merge commit; the base is merged into the branch by hand" (source: CLAUDE.md).
|
|
112
|
+
- Where human decisions are recorded: TODO(project), for example "the PR body".
|
|
113
|
+
- Checks before a merge: TODO(project) or "none".
|
|
115
114
|
- Paths or PR types that need a human approval: TODO(project) or "none". Use the real
|
|
116
115
|
paths (find them, for example `find . -type d -name versions` for migrations); do not
|
|
117
116
|
assume a framework's default layout.
|
|
118
117
|
|
|
119
118
|
## 5. Decisions
|
|
120
119
|
|
|
121
|
-
-
|
|
122
|
-
|
|
120
|
+
- Record every human decision on a PR, with the source and the date, in the same turn: where
|
|
121
|
+
section 4.5 says, else in the PR body.
|
|
@@ -54,8 +54,8 @@ in the prompt.
|
|
|
54
54
|
review finding.
|
|
55
55
|
- A finding that needs a design decision goes to the human. Do not decide it. Fix and push
|
|
56
56
|
the other findings as usual. The PR does not merge before the human has answered and the
|
|
57
|
-
answer is applied. Record the answer
|
|
58
|
-
it in the next round message.
|
|
57
|
+
answer is applied. Record the answer with source and date where section 4.5 of the docs
|
|
58
|
+
says (else in the PR body), and put it in the next round message.
|
|
59
59
|
- A real bug outside the PR's scope gets its own small PR from the base branch.
|
|
60
60
|
- Push all fixes of the round as one push. Get the new head sha.
|
|
61
61
|
|
|
@@ -89,13 +89,14 @@ Repeat fix → re-round until all 3 are CLEAN on the current head.
|
|
|
89
89
|
Only when all 3 are CLEAN on the current head, in this order (`docs/REVIEW_AND_MERGE.md`
|
|
90
90
|
sections 3 and 4):
|
|
91
91
|
|
|
92
|
-
1.
|
|
93
|
-
3 agents as a new round. Start again at "Wait, then read".
|
|
94
|
-
2. Run each gate of section 4 as its own command and read its result. A gate that still
|
|
92
|
+
1. Run each gate of section 4 as its own command and read its result. A gate that still
|
|
95
93
|
says `TODO(project)` does not exist; say so in your report to the human.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
2. Merge exactly the reviewed head, with the method from section 4.5, in a separate
|
|
95
|
+
command: for example `gh pr merge <pr> --match-head-commit <sha>` plus the method flag.
|
|
96
|
+
3. Check that CI on the base branch is green after the merge.
|
|
97
|
+
|
|
98
|
+
If the head changed after the clean round (a fix, or changes taken in from the base
|
|
99
|
+
branch), that is a new round first: send the new sha to the same 3 agents.
|
|
99
100
|
|
|
100
101
|
## When the human asks to skip a step
|
|
101
102
|
|
|
@@ -112,7 +113,7 @@ PRs"). Do it only after the human confirms, and write the exception in the PR bo
|
|
|
112
113
|
| Small diff, docs or spec PR | Still all 3 reviewers |
|
|
113
114
|
| Reviewer reports a non-blocking finding | Fix it in this PR |
|
|
114
115
|
| Finding needs a design choice | Ask the human |
|
|
115
|
-
|
|
|
116
|
+
| Base branch taken into the PR | New head: a new round to the same 3 agents |
|
|
116
117
|
| PR from a fork | Reviewers only read; nobody runs its code |
|
|
117
118
|
|
|
118
119
|
## Common mistakes
|