diagnosing-ci-and-merge-bottlenecks

Diagnoses GitHub CI pipeline health and pull-request merge bottlenecks using engineering analytics MCP tools.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill diagnosing-ci-and-merge-bottlenecks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnosing-ci-and-merge-bottlenecks
Source: https://github.com/PostHog/posthog-foss/tree/main/products/engineering_analytics/skills/diagnosing-ci-and-merge-bottlenecks
Command: npx skills add https://github.com/PostHog/posthog-foss --skill diagnosing-ci-and-merge-bottlenecks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Engineering teams struggle to see where their CI and pull-request pipeline slows down: which GitHub Actions workflow is the flaky long pole, whether CI is getting slower over time, and where a specific PR is stuck. This Skill answers those questions by querying engineering analytics MCP tools instead of writing SQL.

Core Features & Use Cases

  • Workflow health trends: Compare workflow-health metrics (success rate, p50/p95 durations) across adjacent windows to detect CI slowdowns and identify the slow or flaky long-pole workflow.
  • PR pipeline triage: List open PRs with failing or pending CI, find PRs stuck open longest, and compute median and p95 time-to-merge per author cohort from pull-requests data.
  • Single-PR lifecycle analysis: Walk a PR's event timeline (opened, ready-for-review, per-workflow CI runs, merged) with pr-lifecycle to pinpoint the largest bottleneck gap.
  • Flaky test cost analysis: Use the flaky-tests queue to find confirmed flakes, quarantine candidates, and blast radius ranked by master failures and distinct PRs hit.
  • Use Case: Ask "is CI getting slower on our repo?" and get a verdict like "e2e-playwright p95 doubled this fortnight and is the long pole on PR #1234, which sat 47 minutes in CI before merging."

Quick Start

Ask the assistant to check whether CI on your GitHub repo is getting slower and which workflow is the bottleneck.

Frequently Asked Questions about diagnosing-ci-and-merge-bottlenecks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if GitHub Actions CI is getting slower?

Call the workflow-health tool over two adjacent windows, such as the last 14 days versus the prior 14 days, and compare p50_seconds and p95_seconds per workflow. Report median and p95 separately since they move independently, and guard against null values when a window has no qualifying runs.

How do I find which open pull requests have failing CI?

Query the pull-requests tool and keep rows where ci.failing or ci.pending is greater than zero. Treat pending counts as unsettled or potentially stale rather than settled failures, since the CI source syncs on a watermark.

How do I measure pull request time to merge?

Aggregate ready_to_merge_seconds over merged, non-bot, non-draft rows from pull-requests, using median and p95 rather than a mean. Fall back to open_to_merge_seconds only with a coarse label, since it fuses draft and review time.

Can this skill tell me why a specific CI check failed?

No, it covers aggregate pipeline health only. For a verdict on one specific CI failure, such as whose fault it was or which commit broke it, use the investigating-ci-failures skill instead.

What are the limitations of the flaky test detection?

The flaky-tests queue only covers the main Backend pytest and Frontend Jest suites, and confirmed_flake status requires proof of nondeterminism via a same-commit recovery in the same matrix job. Counts are absolute signals, never rates, because passing runs are mostly not emitted.

Why does pull-requests sometimes return incomplete results?

The tool returns a capped page of 1000 rows, newest first, with a truncated flag when the cap is hit. Narrow the query with author, source_id, repo, or a shorter date_from window until the full result set fits.