← ClaudeAtlas

gh-metricslisted

Use when asked how often a GitHub repo merges pull requests, average or median time to merge, PR throughput, review turnaround, open-PR backlog, or how often RFC/proposal issues get accepted and how long they take. Computes repository PR and issue/RFC metrics consistently via the gh CLI.
tonypiazza/gh-metrics · ★ 0 · Code & Development · score 60
Install: claude install-skill tonypiazza/gh-metrics
# PR & Issue/RFC Metrics ## Overview Compute repository health metrics consistently instead of hand-rolling `gh` + `jq` each time. One Python script wraps the GitHub CLI and reports merge rate, cycle time, throughput, review timing, open-PR backlog, and RFC/issue acceptance — with the same definitions and bot filtering every run. **Prerequisite:** the GitHub CLI must be installed and authenticated (`gh auth status`). The script shells out to `gh`; it stores no token itself. It works on any repository the `gh` login can access — including private or company/SSO-gated repos (with the `repo` token scope). Repos the user cannot reach fail gracefully with a clear message. ## When to Use - "How often does <repo> merge PRs?" / "What's the merge rate?" - "Average / median time to merge a PR?" - "How long until a PR gets its first review?" / review turnaround - "How big is the open PR backlog and how old is it?" - "How often do RFCs / proposals get accepted, and how long do they take?" ## Quick Reference ```bash SCRIPT=scripts/gh_metrics.py # relative to this skill directory # Tier 1 — fast: merge rate, cycle time, throughput, open backlog python3 $SCRIPT owner/repo # Tier 2 — add review timing, PR size, review counts (batched GraphQL) python3 $SCRIPT owner/repo --deep --sample 100 # Issue/RFC mode — acceptance, time to first response, time to close python3 $SCRIPT owner/repo --issues --limit 800 # Filter RFCs by label instead of title, or analyze all issues python3 $SCRI