diagnosing-ci-and-merge-bottlenecks
Fungsinya
Skill ini menggunakan analitik engineering untuk menunjukkan bagaimana pull request bergerak dari terbuka hingga digabungkan, dan di mana CI memperlambatnya. Ditujukan untuk pemimpin engineering yang menginginkan gambaran jelas tentang kecepatan pengiriman tim.
Kapan dipakai
- โSaat Anda ingin tahu apakah CI semakin cepat atau semakin lambat seiring waktu.
- โSaat Anda perlu menemukan alur kerja GitHub Actions mana yang paling lambat atau paling tidak andal.
- โSaat Anda ingin tahu berapa lama pull request memerlukan waktu dari terbuka hingga digabungkan.
Link skill
https://github.com/PostHog/posthog/blob/master/products/engineering_analytics/skills/diagnosing-ci-and-merge-bottlenecks/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โApakah CI kami semakin lambat, dan alur kerja GitHub mana yang menyebabkan penundaan?โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill membaca data pull request dan kesehatan per alur kerja selama jendela waktu tertentu, lalu melaporkan waktu median dan persentil ke-95. Anda tidak perlu menulis kueri apa pun.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Diagnosing CI and merge bottlenecks
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 named
MCP tools โ you call them, you don't write SQL. Dogfooded on PostHog/posthog; the same tools serve
autonomous agents (e.g. PostHog Desktop) reasoning about their own PRs. Scope is aggregate pipeline health:
to take one failing test or red run to a verdict, switch to the investigating-ci-failures skill.
The tools
pull-requestsโ the PR workhorse. Open PRs plus anything merged or closed sincedate_from(default-30d), newest first. Each row carriesauthor(nested object:handle,display_name,is_bot),repo(nested:owner,name),state,is_draft,labels,open_to_merge_seconds,ready_to_merge_seconds, and acirollup (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 over the returned merged rows yourself, median and p95, never a mean; preferready_to_merge_secondswhere non-null, it excludes draft time).workflow-healthโ per-workflow CI health over a window (date_from/date_to, default last 24 hours):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_ratecovers runs that succeeded or ended in a decisive failure (failure,timed_out,startup_failure, orstale), excluding skipped, cancelled, neutral, and action-required runs.p50_seconds/p95_secondscover successful runs only because cancelled and failed runs end early and would bias the duration trend. Each isnullwhen a window has no qualifying runs โ guard for null before comparing two windows (a workflow can have runs in one and none in the other).run_scope=pull_requestscopes to PR-attributed runs, excluding master/main (same-repo PRs only โ fork runs carry no PR attribution).pr-lifecycleโ a single PR's timeline: a header plus ordered events โ opened, ready-for-review and converted-to-draft transitions (when the issue-events table is synced), then a CI started/finished pair per workflow run (many on a multi-workflow repo, interleaved by time), then merged/closed. Answers "where is PR N stuck".metric_qualityispartial(no review or comment events).engineering-analytics-flaky-testsโ the active test-health queue from the per-test CI spans, over a window (date_fromdefault-7d, max 30 days). Evidence is counted per CI run, never per span or run attempt.classificationisconfirmed_flakeonly where the evidence proves nondeterminism (same_commit_recovery_run_count > 0: one commit both failed and passed the test in the same matrix job, via a "Re-run failed jobs" attempt going green or an in-job retry; a pass in a different leg, such as FOSS against EE, is not recovery);quarantinedmeans a tolerated failure was recorded while masked;suspected_regressionmeans only failures were recorded, which is absence of proof, not proof of a real break. A test qualifies on any same-commit recovery, a quarantined failure, any master/main failure, or failures on โฅmin_failed_prsdistinct PRs (failed_pr_count). Answers "what is this failing test costing us" and picks quarantine candidates. It does not answer "which tests are flaky": this queue only sees the main Backend pytest and Frontend Jest suites, and recovery proof only arrives when someone re-runs failed jobs (or a pytest test is hand-marked@pytest.mark.flaky(reruns=N)). Counts are absolute signal, never rates: passing runs are mostly not emitted, so there is no honest denominator. A CI setup break excludes every trial of the attempt, not only its failures: a run attempt whose tests errored in 3 or more jobs or for 3 or more owning teams, or a job attempt with 100 or more distinct failed or errored tests. A real break that wide is left out too, so when a whole suite or job goes red, checkworkflow-healthrather than reading an empty queue as healthy.**`engineering-analytics
Pertanyaan umum
Apakah saya perlu menulis SQL?
Tidak. Skill menggunakan alat bernama, sehingga Anda dapat bertanya dengan bahasa sehari-hari.
Mengapa menggunakan median dan bukan rata-rata?
Beberapa pull request yang sangat lambat dapat membuat rata-rata menyimpang, sehingga median dan persentil ke-95 memberikan gambaran yang lebih adil.
Bisakah skill ini menyelidiki satu tes yang gagal?
Tidak. Untuk satu tes atau eksekusi yang gagal, digunakan skill investigasi terpisah.
Detail
Deskripsi asli dari pembuat
Diagnoses CI and pull-request pipeline health for a GitHub repo using the engineering analytics MCP tools โ pull-requests (PR list with CI status), workflow-health (per-workflow CI trends), and pr-lifecycle (a single PR's timeline). Use when asked whether CI is getting faster or slower, which GitHub Actions workflow is the slow or flaky long-pole, how long PRs take from open to merge, how an author's merge time compares to the cohort, which open PRs have failing or pending CI, or where a specific pull request is stuck. Triggers on "engineering analytics", "is CI getting slower", "slow workflow
repo: PostHog/posthog
Popularitas
- Bintang GitHub
- 41k
- Peringkat
- #6864
- Lisensi
- โ
- Diperbarui
- 2/11/2026
Komentar
- โฆ
Skill lain dari repositori ini
depot-ci
41kMembantu agent Anda menyiapkan dan menjalankan alur kerja Depot CI, alternatif GitHub Actions, termasuk memigrasikan alur kerja yang ada dan membaca log eksekusi.
depot-container-builds
41kMembantu agent Anda membangun image Docker di builder jarak jauh Depot, termasuk image multi-platform, pengiriman ke registry, dan perbaikan kegagalan build.
depot-github-runners
41kMembantu agent Anda memindahkan job GitHub Actions ke runner yang dikelola Depot, memilih ukuran dan label runner, serta memecahkan masalah pengaturan runner.
editing-agents-md
41kMembantu agent Anda memutuskan apakah sebuah aturan layak masuk ke berkas AGENTS.md atau CLAUDE.md, dan menulisnya agar tetap dipatuhi tanpa membuat berkas membengkak.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.