一键导入
pr-review-mining
Mine recurring reviewer-feedback phrases from the last N merged PRs and surface them as suggest-only [MINED:feedback] candidates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Mine recurring reviewer-feedback phrases from the last N merged PRs and surface them as suggest-only [MINED:feedback] candidates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | pr-review-mining |
| description | Mine recurring reviewer-feedback phrases from the last N merged PRs and surface them as suggest-only [MINED:feedback] candidates. |
| type | skill |
| license | MIT |
| compatibility | ["claude-code"] |
| user-invocable | false |
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.
/mtk repo-health (periodic readiness report).setup-audit --mine-prs to seed architecture-principles.md candidates.gh is unauthenticated and the engineer is offline — fail-soft will skip with a warning.architecture-principles.md.Pre-flight. Confirm gh is installed and authenticated: gh auth status >/dev/null 2>&1. If not, report the warning and stop — do not attempt to fix gh auth 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.md defines 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 ## Denylist section of that file and re-run.
Suggest-only. Present each candidate phrase to the engineer with its PR citations. Do NOT modify architecture-principles.md automatically — 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.md with the table.
#<n>) — fabricated phrases without citations are a red flag.architecture-principles.md.gh was missing or unauthenticated, the output explicitly says Skipped: <reason> rather than fabricating phrases.| 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. |
Corrective batch of multiple small independent fixes (apply review findings, several/multiple fixes across >3 files, no new contract or architecture) — broader than fix, lighter than implement.
One-time repo setup that detects tech stack, audits the codebase, pulls coding guidelines, and generates a project-specific CLAUDE.md
Full feature implementation loop orchestrating planning, batching, verification, and review skills
Use when the task is a new feature, breaking change, multi-file change, or any work where approval should happen before coding begins.
Use to create, update, and read durable workflow state under .mtk/workflows/ so orchestration survives compaction, crash, and session handoff.
Use after a spec is approved and before multi-file implementation begins, to break work into verifiable batches with checkpoints.