원클릭으로
repo-health
Periodic AI-readiness report — scorecard against 12 named assets plus PR review mining from the last N merged PRs.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Periodic AI-readiness report — scorecard against 12 named assets plus PR review mining from the last N merged PRs.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | repo-health |
| description | Periodic AI-readiness report — scorecard against 12 named assets plus PR review mining from the last N merged PRs. |
| type | skill |
| license | MIT |
| compatibility | ["claude-code"] |
| user-invocable | false |
Single periodic command that combines:
scripts/repo-health-score.sh) — bounded checklist with 🟩🟨⬜ icons and a medal (🥉🥈🥇🏆).scripts/pr-review-mine.sh) — repeated reviewer-feedback phrases from the last N merged PRs, suggest-only.Writes the combined report to .claude/repo-health-latest.md (always) and .claude/repo-health-latest.json (with --json). Both files are gitignored.
/mtk-setup --audit — see whether tagged principles bumped asset #2.toolkit-health./mtk-setup first.Parse flags. Accept:
--prs N (1..50, default 10) — number of merged PRs the mining step scans.--json — also write .claude/repo-health-latest.json.--no-mining — skip the PR mining step (scorecard only).Run the scorecard. Always.
bash scripts/repo-health-score.sh
Capture stdout — this is the first half of the report.
2b. Run audit-drift check on stamped docs. Best-effort, non-blocking.
for doc in CLAUDE.md .claude/references/architecture-principles.md .claude/references/conventions.md; do
[ -f "$doc" ] || continue
bash scripts/audit-drift-check.sh "$doc" || true # exit 1 = drift, captured for report
done
The script reads each doc's audited-against: stamp, intersects git diff --name-only <sha>..HEAD with file paths cited in the doc, and prints a markdown table of stale citations. If any doc reports drift, the AI Context bucket in the scorecard is annotated 🟨 audit drift: N citations (do not change pass to fail — drift is a warning, not a regression).
Skip silently for unstamped docs (no warning — older audits pre-v7.8.0 have no stamp).
Run PR mining. Unless --no-mining is set.
bash scripts/pr-review-mine.sh --prs <N>
The script is fail-soft: when gh is missing or unauthenticated, it emits a Skipped: block and exits 0. Capture stdout — this is the second half of the report.
Derive top-3 actionable changes. Read both outputs:
⬜ asset in the scorecard is a candidate.Rank by: fail in AI Context bucket > fail in Dev Workflow > fail in Onboarding > mined phrase. Pick the top 3, each phrased as a single sentence with the file path or action to take.
Write the report. Concatenate into .claude/repo-health-latest.md:
# Repo health report — <ISO date>
<scorecard output>
<mining output>
## Top 3 actionable changes
1. ...
2. ...
3. ...
With --json, also write .claude/repo-health-latest.json containing { "scorecard": {...}, "mining": {...}, "top3": [...] }.
Present to the engineer. Echo the report path and the medal + top-3 in chat. Do not dump the full report inline unless asked.
6.5. Publish the report artifact (additive, capability-gated). After the report is on disk, follow .claude/references/artifact-publishing.md. repo-health usually runs standalone (no active workflow), so this publishes .claude/repo-health-latest.md directly as a Claude Artifact and reports the URL in chat; if a REVIEW workflow is active, it records results.health_report_path and updates that workflow's artifact in place instead. Silent no-op when the tool is unavailable or MTK_ARTIFACT_PUBLISH=0. Disk is written first regardless.
.claude/repo-health-latest.md exists and contains a Medal: line, a 12-row asset table, and a "Top 3 actionable changes" section..claude/references/artifact-publishing.md; the on-disk report was written first regardless.Skipped: <reason> line — never fabricated phrases..claude/references/architecture-principles.md.bash scripts/repo-health-score.sh --json | jq .medal returns a non-empty string.| Rationalization | Reality |
|---|---|
| "I'll auto-promote the mined phrases to principles since they're already cited." | Mining is always suggest-only. Promotion is a separate, manual step with [MINED:feedback] tagging. |
| "The scorecard medal is 🥉 — I'll skip the report and just fix things." | The report IS the next action. Don't suppress the artifact. |
"gh failed, so I'll guess what reviewers usually say." | Mining is fail-soft — leave the section empty rather than fabricate. |
| "I'll add new assets on the fly to make the score look better." | The 12 assets are canonical (see repo-health-assets.md). Don't extend without updating the reference. |
| "Repo-health and toolkit-health are basically the same — I'll merge them." | They're different: repo-health = readiness of this repo as an AI work surface; toolkit-health = how the team uses MTK. Keep them separate. |
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.