# investigating-ci-failures

The investigating-ci-failures Claude Code skill traces an individual CI failure to its likely cause. It separates PR-specific problems from default-branch breaks and flaky tests.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 188 installs · ★ 101 repo stars
- Author: PostHog
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/investigating-ci-failures/SKILL.md
- Updated: 2026-11-16
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/investigating-ci-failures

## What it does

The skill examines a failed test or red CI run and classifies the failure as tied to a PR, the default branch, or a flaky test. For a default-branch incident, it traces the responsible commit, its author and PR, then checks whether a later commit fixed the problem.

It draws on engineering analytics tools, CI failure logs, and the `engineering_analytics_ci_failures` and `engineering_analytics_ci_job_history` views. The investigation compares branch patterns and job attempts; a CI rerun is not needed. Fingerprint analysis covers pytest only, so Jest, Playwright, and Cargo failures are examined through their raw log lines. Job history arrives through webhook sync and can lag.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill investigating-ci-failures -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/investigating-ci-failures/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/investigating-ci-failures/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill investigating-ci-failures -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/investigating-ci-failures/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill investigating-ci-failures -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/investigating-ci-failures/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/ai-plugin skills/investigating-ci-failures
```

2. **Manually: put the files in place**
- File: `.github/skills/investigating-ci-failures/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill investigating-ci-failures -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/PostHog/ai-plugin --path skills/investigating-ci-failures
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/investigating-ci-failures/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill investigating-ci-failures -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/investigating-ci-failures/SKILL.md

## When to use it
- tell whether a PR introduced a CI failure
- trace a default-branch failure to a commit
- identify the author and PR behind a breaking commit
- distinguish a flaky test from a persistent failure
- check whether a later commit fixed the failure

## Example prompts
- Investigate the CI failure in my PR and identify its cause.
- Find the commit that made this test fail on the default branch.
- Check whether this test fails intermittently or on every run.

## Similar
- [analyze-ci](https://affpapa.org/en/nevibecode/skills/analyze-ci.md) — skill · ★ 28925 repo stars
- [investigating-replay](https://affpapa.org/en/nevibecode/skills/investigating-replay.md) — skill · 424 installs
- [setup-comprehensive-testing](https://affpapa.org/en/nevibecode/commands/setup-comprehensive-testing.md) — command · 278 installs
- [dx-devops-test-failures-analyze](https://affpapa.org/en/nevibecode/skills/dx-devops-test-failures-analyze.md) — skill · 5100 installs
- [test-automator](https://affpapa.org/en/nevibecode/agents/qdhenry-test-automator.md) — subagent · ★ 1357 repo stars
- [mcore-testing](https://affpapa.org/en/nevibecode/skills/mcore-testing.md) — skill · 1800 installs

From the same set: [posthog/ai-plugin](https://affpapa.org/en/nevibecode/by/posthog/ai-plugin.md) — 82 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
