Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

iterate-pr

/iterate-pr

Autonomicznie monitoruje otwarty pull request w pętli i poprawia uwagi z przeglądu, błędy CI oraz konflikty rebase, także gdy trzeba pilnować PR-a.

Repozytorium
stage-cli ↗
Licencja
MIT
Ostatnia zmiana repozytorium
06.09.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 06.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Autonomicznie monitoruje otwarty pull request w pętli i poprawia uwagi z przeglądu, błędy CI oraz konflikty rebase, także gdy trzeba pilnować PR-a.

Oryginalny opis (EN)

Use when a PR is open and the user wants to autonomously monitor and fix PR review comments, CI failures, and rebase conflicts on a recurring loop, or when asked to babysit/iterate on a PR

Jak działa

  1. WHEN INVOKED — Do These Two Steps Immediately
  2. Iteration Sequence
  3. Condition Checks
  4. Invocation
Sekcje z nagłówków SKILL.md, w oryginale · 91 linii, 581 słów
Podgląd SKILL.md
---
name: iterate-pr
description: Use when a PR is open and the user wants to autonomously monitor and fix PR review comments, CI failures, and rebase conflicts on a recurring loop, or when asked to babysit/iterate on a PR
metadata:
  internal: true
---

# Iterate PR

Recurring loop that checks a PR each iteration and fixes what's broken. Combines `/fixing-pr-comments`, `/fixing-ci`, and `/rebase-origin-main`.

## WHEN INVOKED — Do These Two Steps Immediately

**STEP 1: Run the iteration checklist once right now** (before setting up the loop).

Execute all condition checks, run the appropriate sub-skills, and report results. Do not skip this — the first pass must happen immediately in the current session.

**STEP 2: After reporting results, always kick off the loop** using `/loop` at the requested interval (default 10m):

```
/loop <INTERVAL> For PR #<NUM> (<OWNER>/<REPO>): run the iterate-pr iteration sequence — check PR state, check for merge conflicts, check for unresolved comments, check for failing CI. Fix what's broken. Cancel the loop when the PR is closed or merged, OR when ALL of the following are simultaneously true: no merge conflicts with origin/main, zero unresolved review threads, no failing CI checks, no pending CI checks, and no commit was pushed this iteration.
```

Replace `<INTERVAL>` with the interval passed to `/iterate-pr` (default `10m`), and `<NUM>`, `<OWNER>`, `<REPO>` with the actual values resolved in Step 1. Do not leave placeholders.

**The loop is mandatory. Never ask the user whether to set it up — always set it up.**

Both steps are mandatory. The loop is not a substitute for Step 1 — it is in addition to it.

---

## Iteration Sequence

Each iteration (including the first one in Step 1 above) follows this sequence:

```
1. VERIFY   → gh pr view; stop loop if closed/merged
2. REBASE   → If merge conflicts with origin/main → /rebase-origin-main
3. COMMENTS → If unresolved threads → /fixing-pr-comments
4. CI       → If CI failing → /fixing-ci
5. REPORT   → Summarize what was checked and what was done (or skipped).
               Cancel the loop when ANY of the following is true:
               - PR is closed or merged
               - ALL of the following are simultaneously true:
                 - No merge conflicts with origin/main
                 - Zero unresolved review threads
                 - No failing CI checks
                 - No pending CI checks
                 - No commit was pushed this iteration
```

Only invoke sub-skills when their condition is met. Skip clean steps.

**Fully autonomous.** No user approval needed — triage, fix, commit, push, reply, resolve.

**Do not ask the user whether to continue or cancel the loop.** Apply the cancellation rule mechanically.

**Exception:** Ambiguous merge conflicts pause for manual resolution.

## Condition Checks

```bash
OWNER=$(gh repo view --json owner -q '.owner.login')
REPO=$(gh repo view --json name -q '.name')
NUM=$(gh pr view --json number -q '.number')

# 1: PR open?
gh pr view --json state -q '.state'
# CLOSED or MERGED → stop loop immediately

# 2: Merge conflicts with main?
git fetch origin main
git merge-tree --write-tree --no-messages HEAD origin/main > /dev/null 2>&1
# Non-zero exit code → conflicts exist → run /rebase-origin-main

# 3: Unresolved comments?
# gh -f/-F flag parsing mangles ! (non-null type annotations); use --input - to pass JSON directly
gh api graphql --input - <<EOF | jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved==false)] | length' || echo 0
{"query":"query(\$owner:String!,\$repo:String!,\$pr:Int!){repository(owner:\$owner,name:\$repo){pullRequest(number:\$pr){reviewThreads(first:100){nodes{isResolved}}}}}","variables":{"owner":"$OWNER","repo":"$REPO","pr":$NUM}}
EOF
# Non-zero count → run /fixing-pr-comments

# 4: CI failing?
gh pr checks $NUM --json name,bucket -q '[.[] | select(.bucket == "fail")]'
# Non-empty → run /fixing-ci

# 5: CI pending?
gh pr checks $NUM --json name,bucket -q '[.[] | select(.bucket == "pending")]'
# Non-empty → keep loop alive (do not cancel)
```

## Invocation

- `/iterate-pr` — 10m default
- `/iterate-pr 5m` — every 5 minutes
- `/iterate-pr 2m` — every 2 minutes

Wersje

RepozytoriumWynikLicencja
Ta strona · reviewstage/stage-cli100MIT
FrancoStino/opencode-skills-collection100MIT
rootcastleco/rei-skills100MIT
davila7/claude-code-templates100MIT
sickn33/agentic-awesome-skills100MIT
getsentry/skills100Apache-2.0
LiHongwei-cn/lihongwei-cn100MIT
dimagi/dimagi-claude-workflows100MIT
agent-skills-hub/agent-skills-hub100MIT

Migawka bazy z 13.11.2026 · wersja paczki 71e83d5fdfbb (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 95t3-babysit-pr
    Monitoruje pull request podczas przeglądu i CI, aż do zakończenia.
  • 100babysit-pr
    Monitoruje pull request w trakcie przeglądu i CI, gdy użytkownik prosi o obserwowanie PR.
  • 100babysit-pr
    Monitoruje i naprawia automatyczne uwagi review (Copilot, SonarCloud) oraz błędy CI w PR bieżącej gałęzi, aż PR nadaje się do przeglądu przez człowieka.
  • 100babysit-pr
    Monitoruje otwarty pull request na GitHubie pod kątem awarii CI, uwag z przeglądu i możliwości scalenia oraz bezpiecznie ponawia uruchomienia lub naprawia błędy.
  • 100mr-watch
    Obserwuje otwarty MR lub PR i samodzielnie usuwa blokady scalenia w pętli sondowania: błędy CI, uwagi recenzentów i konflikty, aż do scalenia, zamknięcia lub przerwania.
  • 100pr-babysitter
    Monitoruje lub naprawia otwarty pull request na GitHubie: błędy CI, konflikty, wątki review i gotowość do merge, raportując zmiany stanu.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.