Pr review mining
Skill moberghr/mtk-agent-toolkit/.claude/skills/pr-review-mining
Mine recurring reviewer-feedback phrases from the last N merged PRs and surface them as suggest-only [MINED:feedback] candidates.From its SKILL.md
npx -y skills add moberghr/mtk-agent-toolkit --skill pr-review-miningAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.2 KB, as published. Nobody here has run it
PR review mining
Overview
Wraps scripts/pr-review-mine.sh (fetches merged PR review threads via gh, clusters repeated reviewer-feedback phrases). Output is always advisory — phrases tagged [MINED:feedback] and never auto-edited into architecture-principles.md.
When To Use
- The engineer asks: "what are reviewers asking for repeatedly?", "mine our PRs", "what should we add to our rules?"
- As part of
/mtk repo-health(periodic readiness report). - As an optional step inside
setup-audit --mine-prsto seedarchitecture-principles.mdcandidates.
When NOT To Use
- The repo has fewer than 3 merged PRs — not enough signal.
ghis unauthenticated and the engineer is offline — fail-soft will skip with a warning.- The engineer wants to auto-edit principles — this skill never writes to
architecture-principles.md.
Workflow
-
Pre-flight. Confirm
ghis installed and authenticated:gh auth status >/dev/null 2>&1. If not, report the warning and stop — do not attempt to fixghauth from inside this skill. -
Run the miner.
bash scripts/pr-review-mine.sh --prs 10--prs N(default 10, range 1..50) — number of merged PRs to scan.--json— machine-readable output to stdout.
-
Read the canonical patterns reference.
.claude/references/pr-mining-patterns.mddefines what phrases mean and which are denylisted. If the engineer sees obvious noise (e.g., "looks good to me" sneaks through), append it to the## Denylistsection of that file and re-run. -
Suggest-only. Present each candidate phrase to the engineer with its PR citations. Do NOT modify
architecture-principles.mdautomatically — the engineer must opt in per-phrase, prefixing the resulting principle with[MINED:feedback]and citing the PR numbers. -
Record the run. If invoked from
repo-health, the parent skill emits a "PR mining" section into.claude/repo-health-latest.mdwith the table.
Verification
- The script exited 0 (mining is always advisory; non-zero only on argument validation error).
- The output references concrete PR numbers (
#<n>) — fabricated phrases without citations are a red flag. - No edits were made to
architecture-principles.md. - If
ghwas missing or unauthenticated, the output explicitly saysSkipped: <reason>rather than fabricating phrases.
Red Flags
| Rationalization | Reality |
|---|---|
| "This phrase appeared once but it's clearly a rule — I'll promote it." | The miner deliberately requires ≥2 distinct PRs. Single-PR feedback is one reviewer's preference, not a team norm. |
"I'll just write the mined phrase straight into architecture-principles.md." | Always tag [MINED:feedback] and cite PRs. Untagged mined rules are indistinguishable from extracted ones. |
"gh failed, I'll guess what reviewers usually say." | Mining is fail-soft — when gh is unavailable, the output is empty. Do not invent phrases. |