diagnosing-ci-and-merge-bottlenecks — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited diagnosing-ci-and-merge-bottlenecks (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Engineering analytics treats a pull request like product analytics treats a user: a PR moves through a pipeline (opened → CI → review → merged → deployed) and the job is to find where it slows down. The surface is three named MCP tools — you call them, you don't write SQL. Dogfooded on PostHog/posthog; the same tools serve autonomous agents (e.g. PostHog Code) reasoning about their own PRs.
date_from (default-30d), newest first. Each row carries author (nested object: handle, display_name, is_bot), repo (nested: owner, name), state, is_draft, labels, open_to_merge_seconds, and a ci rollup (runs / passing / failing / pending) from the head-SHA join. Answers most PR-level questions: which PRs have failing or pending CI, which are stuck open longest, per-author or per-repo triage, and time-to-merge stats (aggregate open_to_merge_seconds over the returned merged rows yourself — median and p95, never a mean).
date_from / date_to, default last 30 days):run_count, success_rate, p50_seconds, p95_seconds, last_failure_at. Answers "is CI getting faster or slower" and "which workflow is the slow or flaky long pole". There is no built-in trend — call it over two adjacent windows and compare. success_rate / p50_seconds / p95_seconds cover completed runs only and are null when a window has no completed runs — guard for null before comparing two windows (a workflow can have runs in one and none in the other).
pair per workflow run (many on a multi-workflow repo, interleaved by time), then merged/closed. Answers "where is PR N stuck". metric_quality is partial.
There is no aggregate time-to-merge tool and no "counts" tool — derive those from pull-requests (the stuck/failing counts, the merge-time percentiles).
These are structural limits of today's snapshot data — state them, don't paper over them.
it as "open to merge", never "cycle time" or "review time". Flag it when long-lived drafts inflate a number.
newer runs land (until the workflow_run webhook ships). Treat a pending count as unsettled, not as a settled failure; lead with status, not a verdict.
ci rollup reflects only the latest commit's runs. Thereis no other link between a PR and its checks.
absence; that data hasn't landed. pr-lifecycle is partial for the same reason.
author.is_bot(nested under author, not a row-level field) and is_draft for throughput / merge-time questions; keep them in for bot-impact questions.
limit rows (newest first); truncated is true when morematch, and there is no repo or limit filter to narrow the call. When truncated is true, any percentile or count you derive covers only the newest page — not the whole window — so say so and shrink date_from until the real set fits under the cap.
| The question | Tool | How |
|---|---|---|
| Is CI getting slower? Which workflow is the long pole? | workflow-health | Call over two adjacent windows (e.g. date_from=-14d, then date_from=-28d date_to=-14d); compare p50_seconds and p95_seconds per workflow. Lead with the median but always check p95 separately — they move independently. |
| Which open PRs have failing or pending CI? | pull-requests | Keep rows where ci.failing > 0 or ci.pending > 0. pending means unsettled (or stale) — not a settled failure. |
| Which PRs are stuck open longest? | pull-requests | Keep state = open, not is_draft, not author.is_bot; sort by created_at ascending (oldest first). |
| How long are PRs taking to merge? Per author? | pull-requests | Over merged rows (merged_at set, not bot, not draft), aggregate open_to_merge_seconds — median and p95. Group by author.handle for cohort context, not a ranking (per-developer surveillance is an explicit non-goal). Trend it by calling with two date_from windows. |
| Where is PR N stuck? | pr-lifecycle | Walk the sorted events: opened → first CI started, the CI span (first start → last finish; one pair per workflow), last CI finished → merged. The largest gap is the bottleneck. A long open→merge with quick CI points at review/idle time the partial data can't itemize yet — say so. |
Mirror how a human investigates: aggregate signal → confirm → concrete PR.
workflow-health (find the slow/flaky long-pole workflow)
→ pull-requests (confirm it's dragging merge time; list the affected PRs)
→ pr-lifecycle (open a representative stuck PR and show the gap)"CI median rose because e2e-playwright p95 doubled; that workflow is the long pole on PR #1234, which sat 47m in CI before merging."
never collapse them into one "average".
open_to_merge_seconds cycle time or review time — it's coarse open-to-merge.pending > 0 — it may be unsettled or stale.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.