analyze-ci
Analyze CI checks for current branch's PR - polls pending checks until complete, diagnoses failures, auto-fixes straightforward issues, and suggests fixes for…
Skill by bonzofenix
Chalk Labs
Need help deploying analyze-ci?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/bonzofenix-analyze-ci
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/analyze-ci
What's inside
- Skill name
analyze-ci- Description
- Analyze CI checks for current branch's PR - polls pending checks until complete, diagnoses failures, auto-fixes straightforward issues, and suggests fixes for complex ones.
- License
- MIT
- Instructions
- 270 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- allowed-tools: must be a space-separated string
Files (4)
- SKILL.md
- poll-ci.sh
- poll_ci.py
- test_poll_ci.py
SKILL.md (first lines)
# Analyze CI
Analyze CI checks for the current branch's PR. Polls pending checks until all complete, diagnoses failures, auto-fixes straightforward issues, and suggests fixes for the rest.
## Prerequisites
- **GitHub CLI**: Authenticated via `gh auth login`
- **Current Branch**: Has an open PR on GitHub
- **Clean Working Tree**: No uncommitted changes (required for auto-fix commits)
## Workflow
1. Detect PR and check merge status
2. Fetch CI check status
3. Wait for pending checks (if any)
4. Analyze failures
5. Classify fixability and apply auto-fixes
6. Commit fixes (if any)
7. Report results
---
## Step 1: Detect PR and Check Merge Status
```bash
gh pr view --json number,state,mergedAt,mergedBy,headRefName
```
- If **no PR found**: report "No PR for current branch" and stop
- If **state is MERGED**: report merge time and author, then stop
- Otherwise: continue with the PR number
## Step 2: Fetch CI Check Status
```bash
gh pr checks --json name,state,bucket,workflow,link,completedAt,startedAt
```
Categorize each check by `bucket`:
- `pass` → passed
- `fail` → failed
- `pending` → still running
- `skipping` / `cancel` → skipped/cancelled
Display summary on a single line with check names:
```bash
gh pr checks --json name,state,bucket,workflow | jq -r '
group_by(.bucket) |
map({bucket: .[0].bucket, count: length, items: map(.name)}) |
.[] |
"\(.bucket | ascii_upcase): \(.count) - \(.items | join(", "))"
'
```
Format: **CI Status:** ✅ N passed | 🟡 N pending | ❌ N failed
Then list check names per bucket:
- **Passed:** check1, check2, check3
- **Pending:** check4, check5
- **Failed:** check6
If all passed and none pending → report success and stop.
## Step 3: Wait for Pending Checks — Stream Dispatch on Failure
If any checks have `bucket: "pending"`:
1. List which checks are still running with their start times
2. Tell the user: "N checks still running. Polling every 30s — dispatching fix agents as failures are found..."
3. **Do NOT use `gh pr checks --watch`** — it blocks as a single long-lived command, hits bash timeout limits, and dies on transient network errors.
4. Gather **fork context** once now (used by every sub-agent dispatched during polling):
```bash
gh pr view --json number,headRefName,baseRefName,title,body
git log --oneline -10
git diff $(gh pr view --json baseRefName -q .baseRefName)...HEAD --stat
```
5. Launch `poll_ci.py` in background (completion signal):
```bash
find ~/.claude -name "poll_ci.py" -path "*/analyze-ci/*" | head -1
python3 <path> --interval 30 --timeout 3600
```
Run with `run_in_background: true`, `timeout: 3600000`.
6. **Polling loop** — run until `poll_ci.py` background task completes:
Every 30s, fetch current check state:
```bash
gh pr checks --json name,state,bucket,workflow,link
```
For each check that just flipped to `bucket: "fail"` (not seen as failed before this iteration):
- Group it with matrix siblings already known to have failed (same base name)
- **Immediately dispatch a fix sub-agent** for the group (see sub-agent prompt below)
- Track dispatched groups — do not re-dispatch a group already dispatched
- Continue polling; do not wait for the agent to finish before polling again
7. When `poll_ci.py` signals completion, do a final fetch to catch any last failures missed between poll ticks, dispatch agents for any new groups not yet dispatched, then proceed.
8. If all checks passed (no failures ever seen) → report success and stop.
## Step 4: Fix Sub-Agents — Dispatch and Collect
### 4a: Grouping Rule (apply at dispatch time during polling)
For each newly-failed check:
1. Extract run ID from link: `https://github.com/OWNER/REPO/actions/runs/RUN_ID/...`
2. Derive **base job name** by stripping trailing ` (...)` suffix:
- `test (postgres-14)` → `test`
- `build / lint (node-18)` → `build / lint`
- `integration-tests (mysql, ubuntu)` → `integration-tests`
3. If a group with this base name was already dispatched, skip (matrix sibling handled). If a group exists but agent not yet dispatched, add sibling and dispatch now.
### 4b: Sub-Agent Prompt (fill in per group at dispatch time)
Each agent works in isolation — no shared state with other agents.
```
You are a CI fix agent. Work independently; do not reference other CI groups.
## Fork Context
- Repo: <OWNER/REPO>
- PR branch: <BRANCH_NAME>From bonzofenix/skills, MIT.
More from bonzofenix/skills
- 0.566score
whatsapp-to-db
bonzofenix
Turn a WhatsApp chat export (.zip, unzipped folder, or bare chat .txt) into a queryable SQLite database — every message, every voice note transcribed locally…
SkillAFreshness: AClaude Code +9 - 0.565score
yolo
bonzofenix
Ship the current branch end-to-end without stopping to ask — commit staged/unstaged work, push, open a PR, watch CI, merge once green, and where merging…
SkillAFreshness: AClaude Code +9 - 0.560score
claude-new
bonzofenix
Start a new background Claude Code session in a project under ~/workspace, so it shows up in the agent view.
SkillAFreshness: AClaude Code +9 - 0.554score
unresolved-comments
bonzofenix
Fetch and display only unresolved comments from a GitHub pull request
SkillAFreshness: AClaude Code +9 - 0.554score
sonarcloud-issues
bonzofenix
Fetch and display SonarCloud/SonarQube analysis issues for a GitHub PR
SkillAFreshness: AClaude Code +9 - 0.554score
last-screenshot
bonzofenix
References the most recent screenshot from the user's Desktop for analysis
SkillAFreshness: AClaude Code +9 - 0.554score
smart-pr
bonzofenix
Generate or update PR title and description based on branch diffs
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 25, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/bonzofenix/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from bonzofenix
- 0.566score
whatsapp-to-db
bonzofenix
Turn a WhatsApp chat export (.zip, unzipped folder, or bare chat .txt) into a queryable SQLite database — every message, every voice note transcribed locally…
SkillAFreshness: AClaude Code +9 - 0.565score
yolo
bonzofenix
Ship the current branch end-to-end without stopping to ask — commit staged/unstaged work, push, open a PR, watch CI, merge once green, and where merging…
SkillAFreshness: AClaude Code +9 - 0.560score
claude-new
bonzofenix
Start a new background Claude Code session in a project under ~/workspace, so it shows up in the agent view.
SkillAFreshness: AClaude Code +9 - 0.554score
unresolved-comments
bonzofenix
Fetch and display only unresolved comments from a GitHub pull request
SkillAFreshness: AClaude Code +9 - 0.554score
sonarcloud-issues
bonzofenix
Fetch and display SonarCloud/SonarQube analysis issues for a GitHub PR
SkillAFreshness: AClaude Code +9 - 0.554score
last-screenshot
bonzofenix
References the most recent screenshot from the user's Desktop for analysis
SkillAFreshness: AClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get analyze-ci running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
analyze-ci skill. Agent Mart. https://agentmart.dev/skills/bonzofenix-analyze-ci (last updated 2026-10-24)