# Fix Ready Prs

Inspect every open non-draft PR for CI failures and unresolved Cursor Bugbot findings...

- Repository: https://github.com/fastrepl/anarlog (9738 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add fastrepl/anarlog --skill fix-ready-prs -g -a claude-code -y`
Codex: `npx skills add fastrepl/anarlog --skill fix-ready-prs -g -a codex -y`
Cursor: `npx skills add fastrepl/anarlog --skill fix-ready-prs -g -a cursor -y`
Gemini CLI: `npx skills add fastrepl/anarlog --skill fix-ready-prs -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add fastrepl/anarlog`

## Description

Inspect every open non-draft PR for CI failures and unresolved Cursor Bugbot findings, then fix them on the existing PR branches. Use when asked to check active PRs, triage ready PRs, fix CI, or address Bugbot comments. Use only outside gitbutler/workspace; on that branch use the repository-local fix-prs skill.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Fix Ready PRs

Check the active checkout's branch with `git symbolic-ref --quiet --short HEAD`
before running this workflow. On `gitbutler/workspace`, skip this skill and use
[fix-prs](../fix-prs/SKILL.md), preserving any narrower user scope. Its GitButler
branch handling and review-resolution workflow take precedence; do not check
out PR branches or use the Git-write commands below in that workspace.

Work through every **open, non-draft** pull request. Fix CI failures and
unresolved Bugbot findings on the existing PR branch. Do not open a new PR for
an existing one.

Drafts are out of scope unless the user names them.

## 1. Inventory

```bash
gh pr list --state open --limit 200 \
  --json number,title,isDraft,headRefName,headRepositoryOwner,isCrossRepository,url,mergeStateStatus
```

Keep only `isDraft == false`. Record number, branch, URL, and whether the head
is a fork (`isCrossRepository`).

## 2. Collect failures

For each ready PR, gather **current-head** CI and **unresolved** Bugbot threads.
Do not treat an in-progress check as green.

### CI

```bash
gh pr checks <n>
gh pr view <n> --json statusCheckRollup,headRefOid
```

Treat as a failure when a required or repo workflow check is `FAILURE`,
`TIMED_OUT`, `ACTION_REQUIRED`, or `CANCELLED` on the current head and has not
been superseded by a newer run.

Ignore:

- `SKIPPED` / `NEUTRAL`
- Netlify header/pages/redirect checks and canceled deploy previews
- Mintlify Deployment skips
- macOS/Windows/iOS jobs that this repo skips on pull requests

If a failing job has logs, pull them:

```bash
gh run view <run-id> --log-failed
```

If checks are still `IN_PROGRESS` / `pending`, wait until they finish or fail
before declaring the PR clean. Re-poll rather than guessing.

### Bugbot

Use review threads, not only the Bugbot check conclusion. A green Bugbot check
can still leave unresolved comments, and an older finding may already be
fixed.

The rest: https://github.com/fastrepl/anarlog/blob/HEAD/.agents/skills/fix-ready-prs/SKILL.md
