reviewer-skill 0.2.0 → 0.3.1
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.1 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.1 https://github.com/itinance/reviewer-skill.git /tmp/reviewer-skill-v0.3.1
|
|
54
|
+
git -C /tmp/reviewer-skill-v0.3.1 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 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
|
+
- 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.1`.
|
|
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.1 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.1 install --dry-run
|
|
131
|
+
npx --ignore-scripts --before "$(date -v-7d +%Y-%m-%d)" reviewer-skill@0.3.1 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.1 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.1 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.1 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.1`.
|
|
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.1",
|
|
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,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
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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`).
|
|
24
25
|
- Never edit a tracked file, commit, push, comment on GitHub, merge, trigger a review bot, or
|
|
25
26
|
call a paid API.
|
|
26
27
|
- Never print sensitive data (customer data, secrets, personal data). Report counts, statuses,
|
|
@@ -14,10 +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
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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`).
|
|
21
22
|
- Never edit a tracked file, commit, push, comment on GitHub, merge, or trigger a review bot.
|
|
22
23
|
- Never print sensitive data.
|
|
23
24
|
- "Read only" is enforced by these rules; `Write` is only for your report file.
|
|
@@ -35,8 +36,9 @@ Code PR:
|
|
|
35
36
|
run. Note whether the head is behind the base branch.
|
|
36
37
|
|
|
37
38
|
Spec PR and the spec part of a code PR:
|
|
38
|
-
- The spec describes the current intended state and matches the code;
|
|
39
|
-
|
|
39
|
+
- The spec describes the current intended state and matches the code; every human decision
|
|
40
|
+
is recorded where the project records decisions, with its source and date; no open question
|
|
41
|
+
blocks the build.
|
|
40
42
|
- Each item has a test plan that would catch its bug; acceptance criteria are testable (no
|
|
41
43
|
"about", "nice", "clear").
|
|
42
44
|
- The project's doc conventions are kept.
|
|
@@ -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
|
|
25
|
-
only when
|
|
26
|
-
(
|
|
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,12 +48,13 @@ 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
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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.
|
|
57
|
+
- Run each safety check on its own and read its result before you start the merge.
|
|
55
58
|
- After the merge: CI on the base branch is green.
|
|
56
59
|
|
|
57
60
|
## 4. Project gates
|
|
@@ -72,10 +75,10 @@ Read the task runner (Justfile, Makefile, package.json scripts), the CI workflow
|
|
|
72
75
|
- Forbidden commands: TODO(project), for example "plain `pytest` hits the live database"
|
|
73
76
|
(source: CLAUDE.md), or "none".
|
|
74
77
|
- Lint and type check: TODO(project).
|
|
75
|
-
-
|
|
76
|
-
scripts off, for the real layout
|
|
77
|
-
`
|
|
78
|
-
|
|
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".
|
|
79
82
|
- CI workflow and job set to compare job counts against: TODO(project).
|
|
80
83
|
|
|
81
84
|
### 4.2 Hard rules
|
|
@@ -111,12 +114,15 @@ Read `.npmrc`, `pnpm-workspace.yaml` (`minimumReleaseAge`, `onlyBuiltDependencie
|
|
|
111
114
|
"none". If a bot is used: keep it paused until the 3 reviewers are clean, then trigger it
|
|
112
115
|
once. A pause posted right after `gh pr create` does not stop the first review: open the
|
|
113
116
|
PR as a draft, pause the bot, wait for its confirmation, then mark the PR ready.
|
|
114
|
-
-
|
|
117
|
+
- Merge method, and how a branch takes in changes from the base branch: TODO(project), for
|
|
118
|
+
example "merge commit; the base is merged into the branch by hand" (source: CLAUDE.md).
|
|
119
|
+
- Where human decisions are recorded: TODO(project), for example "the PR body".
|
|
120
|
+
- Checks before a merge: TODO(project) or "none".
|
|
115
121
|
- Paths or PR types that need a human approval: TODO(project) or "none". Use the real
|
|
116
122
|
paths (find them, for example `find . -type d -name versions` for migrations); do not
|
|
117
123
|
assume a framework's default layout.
|
|
118
124
|
|
|
119
125
|
## 5. Decisions
|
|
120
126
|
|
|
121
|
-
-
|
|
122
|
-
|
|
127
|
+
- Record every human decision on a PR, with the source and the date, in the same turn: where
|
|
128
|
+
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,18 @@ 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.
|
|
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.
|
|
99
104
|
|
|
100
105
|
## When the human asks to skip a step
|
|
101
106
|
|
|
@@ -112,7 +117,8 @@ PRs"). Do it only after the human confirms, and write the exception in the PR bo
|
|
|
112
117
|
| Small diff, docs or spec PR | Still all 3 reviewers |
|
|
113
118
|
| Reviewer reports a non-blocking finding | Fix it in this PR |
|
|
114
119
|
| Finding needs a design choice | Ask the human |
|
|
115
|
-
|
|
|
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 |
|
|
116
122
|
| PR from a fork | Reviewers only read; nobody runs its code |
|
|
117
123
|
|
|
118
124
|
## Common mistakes
|