Analyse a team's pull requests and produce a PR health report. Collects the PRs linked from Linear tickets in the given projects, fetches them from GitHub, and measures review speed stage by stage (time before review, time to first review, review to approval, approval to merge, full review cycle), PR size, throughput, open PRs per author, stacked PR wait, review rounds and depth, follow-up fixes, reverts, CI failures, reviewer load and who reviews whom, per project and per repository. Use this whenever the user asks how long PRs take to merge or get reviewed, wants PR, review or engineering velocity metrics, cycle time, DORA-style numbers, a PR health or review bottleneck report, or wants to understand or improve their team's PR process, for Linear projects or for a list of PRs. Requires an authenticated `gh` CLI, and the Linear MCP server to start from Linear projects.
Ships in pr-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Turns "how are our PRs doing?" into numbers and a report. The program does the fetching and the arithmetic; the agent's job is to choose the right PRs, read the results critically, and write findings a team can act on.
${CLAUDE_SKILL_DIR}below means the directory holding thisSKILL.md. Claude Code expands it automatically; other agents (Codex included) do not — substitute that directory's absolute path, which is shown next to this skill in the session's skill list.
gh, authenticated with read access to the repositories (gh auth status).Run it as python3 "${CLAUDE_SKILL_DIR}/scripts/run.py" <command>. Its commands are prlist,
analyze, render and metrics (lists every metric with its definition).
list_projects (query = the name, include
archived). When a name matches several projects (for example "Payments" matching
"Payments v1" and "Payments v2"), take all of them unless one is an exact match, and tell the user
which ones you used.clock.timezone to the team's time zone when it differs. Otherwise write a config file
only for what the user asks to change. The options are in
config.example.json and references/metrics.md.For each project, call list_issues with project, updatedAt: -P<days>D, limit: 250 and
fields: ["title", "status", "statusType", "completedAt"], following the cursor to the end.
Keep the tickets where work happened: status type started, or completed with completedAt
inside the window. Skip backlog, unstarted and canceled tickets; they have no PRs worth counting.
For each kept ticket, call get_issue with fields: ["attachments"]. Issue these calls in
parallel batches of about 25. After each batch, append to a tickets JSON file in a working
directory:
[{"ticket": "TEAM-123", "project": "Project A",
"links": ["https://github.com/acme/app/pull/1234", "https://docs.example.com/design"]}]
Writing after every batch means a long run can stop without losing work. Put every attachment
URL in links; the next step keeps only GitHub PR links.
python3 "${CLAUDE_SKILL_DIR}/scripts/run.py" prlist tickets.json -o prs.csv
The CSV has the columns url,projects,tickets, with ; between list values. It is the input to
every later run, so save it where the user can find it and tell them the path. A user who already
has PR URLs can write this CSV by hand and skip steps 1 and 2.
python3 "${CLAUDE_SKILL_DIR}/scripts/run.py" analyze prs.csv --since <YYYY-MM-DD> --until <YYYY-MM-DD> \
[--config config.json] -o results.json
It fetches each PR from GitHub, caches merged and closed PRs in ~/.cache/pr-metrics (open PRs
are always read fresh), runs every metric for all PRs and for each project and repository, and
prints a text digest. The first run of about 150 PRs takes about a minute. The structure of
results.json is in references/results-format.md.
Read the digest, then the parts of results.json that explain it: the slowest PRs, the rows
behind follow-up fixes, the reviewer tables. Write insights.json:
{
"headline": "One or two sentences: the state of things and the one thing to change.",
"findings": [{"title": "Short claim", "detail": "The numbers behind it.", "tone": "good | watch | problem",
"evidence": {"metric": "review_depth", "key": "silent_large", "group": "overall:all"}}],
"recommendations": [{"title": "A concrete change", "detail": "Why, and how to tell it worked."}]
}
Rules for the insights, because a team will act on them:
results.json. Use medians and P90; mention a mean only
next to them.groups.<group>.evidence.<key>, each with a note on why the PR is listed. Point the finding's
evidence at the list that backs it (group defaults to overall:all); the report shows it
under the finding so readers can check the claim PR by PR. Leave evidence out when no list
backs the claim.gh api repos/<repo>/pulls/<n>/reviews, .../pulls/<n>/comments,
.../issues/<n>/comments) and confirm the note matches. If a check turns up something the
metric cannot see, such as feedback only from bots, say so in the finding.dataset.missing or dataset.excluded holds PRs the user would
expect to be included (an inaccessible repository, closed PRs), mention it in a finding.python3 "${CLAUDE_SKILL_DIR}/scripts/run.py" render results.json --insights insights.json \
--title "<Team or project> PR Health" -o report.html
report.html is one self-contained page with light and dark themes that works at phone width.
It is generated, so to change the page, change the renderer, not the HTML.
report.html as an Artifact with icon: "chart"
and a one-sentence description naming the projects and the window. The page already follows
the Artifact page contract, so publish it as is. To refresh a report published earlier,
publish to its URL.report.html to open in a browser.Send the report (the Artifact link or the file path), the headline, and the top two or three
findings, then say where prs.csv and results.json are so the next run can reuse them. An
Artifact is private until the user shares it; say so.
Metrics are classes registered in scripts/pr_metrics/metrics/__init__.py. A "time from A to B"
measure is a DurationMetric with one span() method; anything else implements compute().
The report renders any registered metric with no changes to the renderer.
references/metrics.md has the definitions and the steps. Run the tests
with cd "${CLAUDE_SKILL_DIR}/scripts" && python3 -m unittest discover -s tests -t ..
config.example.json (opens in a new tab)references/metrics.md (opens in a new tab)references/results-format.md (opens in a new tab)scripts/pr_metrics/__init__.py (opens in a new tab)scripts/pr_metrics/analysis.py (opens in a new tab)scripts/pr_metrics/cli.py (opens in a new tab)scripts/pr_metrics/clock.py (opens in a new tab)scripts/pr_metrics/config.py (opens in a new tab)scripts/pr_metrics/github/__init__.py (opens in a new tab)scripts/pr_metrics/github/client.py (opens in a new tab)scripts/pr_metrics/github/fetch.py (opens in a new tab)scripts/pr_metrics/github/queries.py (opens in a new tab)scripts/pr_metrics/lifecycle.py (opens in a new tab)scripts/pr_metrics/metrics/__init__.py (opens in a new tab)scripts/pr_metrics/metrics/base.py (opens in a new tab)scripts/pr_metrics/metrics/ci.py (opens in a new tab)scripts/pr_metrics/metrics/follow_ups.py (opens in a new tab)scripts/pr_metrics/metrics/review_quality.py (opens in a new tab)scripts/pr_metrics/metrics/review_stages.py (opens in a new tab)scripts/pr_metrics/metrics/reviewers.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/pr-workflow:pr-metricsfrom pr-workflow
npx claudepluginhub driangle/ai-powers --plugin pr-workflowOther plugins' skills for the same job
14 skills in this plugin
/change-recapRecap what changed in an area of the code over a timeframe — new features, improvements, fixes and under-the-hood work — from the pull requests merged on GitHub in that window, grouped by initiative and project where the issue tracker records them, enriched with the ticket updates and Slack threads from the same window (confirmations, rollouts, problems after merge, follow-ups), and credited to who built and reviewed each change, written so developers and managers can both read it, as an HTML page that can be published as a Claude Artifact. Typically run on Fridays for the week's recap. Use whenever someone asks what changed, shipped, got merged or happened in a repo, service, folder, product area or team this week, last week, this sprint or since a date, asks for a weekly or Friday recap, a "what's new" or a changelog-style summary of recent work, even if they don't say "recap"./commitCommit all uncommitted changes with an auto-generated conventional commit message. Use when the user asks to commit, save changes, or invokes /commit./commit-msgGenerate a one-line conventional commit message from staged changes. Use when the user asks for a commit message or invokes /commit-msg.