harvest-reviews
Skill20 starsChanged 18 days agoMITView on GitHub
Harvest human code-review comments from recently merged PRs and distill them into the team-reviewer rules — fetch threads with the code they targeted and the fix that followed, classify them, and merge them into a per-computer, gitignored store. Use when the user runs /harvest-reviews, optionally with a window ("90d", "since 2026-10-01") and PR filters (repo, org, label, author, path, reviewer).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ceptln/quota-burnertheir own version, first seen Sep 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ceptln/quota-burner★ 18same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- a11y-page-auditSkill
- branch-comment-cleanupSkill
- branch-test-planSkill
- context7-mcpSkill
- env-example-syncSkill
- feature-based-architectureSkill
- great-readmeSkill
- light-dark-modeSkill
- localizationSkill
- minimal-code-changesSkill
- prod-page-auditSkill
- quantum-design-tokensSkill
- reviewable-commitsSkill
- shell-aliases-socialSkill
- skill-best-practices-syncSkill
- skills-auditSkill
- skills-socialSkill
- stacked-pr-splitterSkill
- team-reviewerSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 2 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 53
Run from the target repo's root: node ${CLAUDE_SKILL_DIR}/scripts/fetch-reviews.mjs <since> <flags>.
- Very specific: line 61
If newItems is 0, report the query and stop — nothing to learn.
- Very specific: line 65
Read the pending items in batches: node ${CLAUDE_SKILL_DIR}/scripts/digest.mjs --offset 0 --limit 40, then follow the Next batch line until …
- Very specific: line 68
Read rules.json (it may not exist yet) so you map items to existing rule ids before inventing new ones.
- Very specific: line 86
Write every item, including noise, so the run can be marked processed.
- Distinctive: line 111
Never delete a rule because this batch lacks evidence for it — staleness (unseen for 6 months) and contradictions are computed and shown by …
- Very specific: line 116
Run: node ${CLAUDE_SKILL_DIR}/scripts/render.mjs --commit.
- Very specific: line 121
If it says NOT committed, classify the missing ids and rerun.
- Very specific: line 143
Squash/rebase workflows: follow-up commits are matched by commit date after the first comment and by file path.
- Distinctive: line 150
Reset: delete the store folder to start over.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Harvest Reviews
Learn how this team reviews code from what human reviewers actually wrote on merged PRs,
and keep the team-reviewer skill's rules current. Rules are paraphrased and carry no
reviewer names; the per-example files keep @reviewer and project because they never
leave this computer. Nothing is posted to GitHub, and nothing outside the store is written.
Inputs
- Arguments:
$ARGUMENTS - Requires:
gh(authenticated) and Node 18+; no npm packages - Store:
${CLAUDE_SKILL_DIR}/../team-reviewer/.review-harvest/— gitignored in the dotfiles repo, per computer. Override withREVIEW_HARVEST_DIR. Layout:state.json— watermark per filter set, seen item ids, run log, pending fetchraw/<date>.jsonl— fetched PRs, one per line (script output, never edit)cache/— fetched PRs (kept a day) and commit patches (kept 7 days), so a crashed or repeated run resumes instead of refetchingclassified/<date>.jsonl— your classifications, one item per linerules.json— source of truth for rule text (you edit this)index.md,rules.md,false-positives.md,top-rules.md,examples/<category>.md— generated byrender.mjs; never edit by hand
- Default scope: merged PRs of the current repo, since the last run with the same filters, else 30 days.
Translate the arguments into fetch-reviews.mjs flags. Ask only when a filter is
genuinely ambiguous:
| Asked for | Flag |
a window: 14d, 2w, 3m, 2026-10-01 | positional since |
| another repo / a whole org | --repo owner/name / --repo org:acme (repeatable) |
| labels, PR author, base branch, title words, team | --search "label:frontend -author:me base:main" |
| an area of the code | --path src/payments/ or --path "**/*.tsx" (repeatable) |
| one reviewer's style | --reviewer <login> (repeatable) |
| ignore someone (another bot, an AI reviewer) | --exclude-user <login> |
| re-read threads already processed | --rescan |
Phase 1 — Fetch
- Run from the target repo's root:
node ${CLAUDE_SKILL_DIR}/scripts/fetch-reviews.mjs <since> <flags>. - It prints a JSON summary (query used, PR and item counts, raw file). Bots, empty approvals/LGTM, the PR author's own top-level comments and threads the author opened on their own code are already excluded, as are items processed in earlier runs.
- Network errors and GitHub 5xx/rate limits are retried. If the script still dies or
reports
failedPRs> 0, rerun the same command: cached PRs are skipped, and the watermark never moves past a PR that failed. - If
newItemsis 0, report the query and stop — nothing to learn.
Phase 2 — Classify
- Read the pending items in batches:
node ${CLAUDE_SKILL_DIR}/scripts/digest.mjs --offset 0 --limit 40, then follow theNext batchline until done. - Read
rules.json(it may not exist yet) so you map items to existing rule ids before inventing new ones. - For every item write one line to
classified/<today>.jsonlin the store (append if it exists):{"id":"PRRT_…","category":"tests","outcome":"changed","scope":"rule","ruleId":"tests-cover-error-path","stance":"supports"}category:correctnesssecurityperfarchitecturenamingtestsa11ytypesdxstyleoutcome:changed(a follow-up commit or suggestion addressed it),pushed-back(the author argued and the reviewer conceded or the thread ended unresolved in their favour),ignored(no reply, no change)scope:rule(would apply to any PR in this codebase) orone-off(only makes sense for this change: a typo, a product question, "can you rebase")stance:supportsthe rule inruleId;contradictsit (a reviewer or the team explicitly accepted the opposite);false-positive(a reviewer said not to flag something —ruleIdpoints to akind: "false-positive"entry);nonefor one-offs and noise, withruleId: null
- Write every item, including noise, so the run can be marked processed. Judge
outcomefrom the follow-up patch and the replies, not fromisResolvedalone.
Phase 3 — Merge into rules.json
rules.json is {"rules": [ … ]}; each entry:
{"id":"tests-cover-error-path","kind":"rule","category":"tests",
"rule":"Test the failure path of every new branch, not only the happy path.",
"why":"Regressions here shipped twice because only success was asserted.",
"before":"it('saves', …)","after":"it('saves', …)\nit('surfaces a 500 as a toast', …)"}- Strengthen existing rules: point matching items at their
ruleId. Rewriteruleorwhyonly when the new threads state it more precisely; replacebefore/afterwhen a newer, clearer example exists. - Add a rule for a recurring point. Ids are
<category>-<kebab-slug>, stable once created.render.mjsadmits it only with ≥2 supporting items or 1 that caused a change; below that it stays a silent candidate — add it anyway so evidence accumulates. - Paraphrase the reviewers into an imperative rule plus the reason. No names, no quotes, no repo-specific jargon the next reader would not understand.
before/afteris one short hunk (≤6 lines each) taken from the newest example, trimmed to the essence.- Things reviewers said not to flag become
"kind": "false-positive"entries. - Never delete a rule because this batch lacks evidence for it — staleness (unseen for 6 months) and contradictions are computed and shown by the renderer.
Phase 4 — Render and verify
- Run:
node ${CLAUDE_SKILL_DIR}/scripts/render.mjs --commit. It recomputes evidence count, last seen, contradicted and stale status, regenerates the markdown and the top-15 list thatteam-reviewerinjects, marks the run processed (--commitadvances the watermark instate.json; it is not a git commit), and prints added / changed / removed rules plus therules.mddiff. - If it says
NOT committed, classify the missing ids and rerun. Use--forceonly when the user agrees to drop them. - Fix every warning it prints (unknown category, dangling
ruleId) and rerun.
Report
## Review harvest — <since> → <today>
Query: `<query>` · <N> PRs · <N> items (<N> led to a change) · <N> one-offs skipped
### Added
### Changed
### Removed
### Top 15 now
### rules.md diff
<collapsed diff from render.mjs>Notes & edge cases
- Not in a repo: the fetch needs
--repo; ask which repo or org rather than guess. - Squash/rebase workflows: follow-up commits are matched by commit date after the
first comment and by file path; a force-push that rewrites dates can hide the fix.
Fall back to
isOutdatedplus the author's reply when judgingoutcome. - AI reviewers: anything GitHub marks as a bot is excluded. Human accounts that relay
an AI tool's output are not — add them with
--exclude-user. - Huge runs: the search caps at 300 PRs (
--limit). Narrow the window or filters rather than raising it far; classification quality drops with volume. - Reset: delete the store folder to start over; nothing else depends on it.
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
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.

