본문으로 건너뛰기
cccskills
무료GitHub에 공개

pr-green-loop

After pushing code or creating a PR, automatically wait for CI checks to complete, fix failures, address Bugbot findings, and re-push in a loop until the PR is green. Use when the user pushes to a PR, creates a PR, or asks to get a PR to green.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구GitHub
설치 방법 보기

포함된 파일(1)

  • SKILL.md4.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

PR Green Loop

Drive a PR to green by iterating: push → wait for checks → fix failures → address Bugbot → re-push → repeat.

When to activate

  • User creates a PR (after pr-create finishes)
  • User pushes new commits to an existing PR
  • User asks to "get the PR green", "fix CI", or "fix all PR issues"

Prerequisites

  • gh CLI installed and authenticated
  • Current branch has a remote-tracking PR (or one was just created)

Workflow

Step 1: Ensure code is pushed and PR exists

  1. Run git status to check for uncommitted changes.
  2. Push the branch: git push -u origin HEAD.
  3. If no PR exists yet, delegate to the pr-create skill and wait for user approval before continuing.
  4. Capture the PR number:
gh pr view --json number -q .number

Step 2: Wait for CI checks to complete

Poll until all check suites finish (no pending / queued / in_progress remaining):

gh pr checks <PR_NUMBER> --watch --fail-fast

If --watch is unavailable or hangs, fall back to a manual polling loop:

while true; do
  STATUS=$(gh pr checks <PR_NUMBER> --json name,state --jq '[.[].state] | unique | join(",")')
  echo "Check states: $STATUS"
  # Break when no "PENDING", "QUEUED", or "IN_PROGRESS" remain
  echo "$STATUS" | grep -qiE 'pending|queued|in_progress' || break
  sleep 30
done

Report the final status summary before proceeding.

Step 3: Fix CI failures

If any check failed:

  1. Delegate to the ci-fix skill (fetch logs, classify, auto-fix or diagnose).
  2. For auto-fixable issues (lint, format, lock file, pre-commit): apply fixes, stage, and commit.
  3. For test failures: read the failing test, understand the root cause, fix the code (not just the test), and commit.
  4. Use conventional commits: fix(<scope>): <description>.

Step 4: Address Bugbot findings

Bugbot posts review comments on the PR. Fetch and fix them:

  1. Fetch unresolved review conversations (delegate to github-pull-request-handling skill's script):
SKILL_BASE_DIR/scripts/pr-conversations.sh <PR_NUMBER>
  1. For each unresolved Bugbot comment:

    • Read the full thread to understand the finding.
    • Fix the issue in the codebase.
    • Commit with a conventional message: fix(<scope>): address bugbot — <short description>.
    • Reply to the comment with the commit hash (see github-pull-request-handling for reply format).
  2. For non-Bugbot review comments: skip them — those are for the author to triage manually.

Step 5: Push and loop

  1. Push all new fix commits: git push.
  2. Go back to Step 2 and wait for the new CI run.
  3. Repeat until:
    • All checks pass and no new unresolved Bugbot comments exist.
    • Or a maximum of 3 iterations is reached (to avoid infinite loops).

If the loop limit is hit, report the remaining failures and stop.

Step 6: Report final status

When the PR is green (or the loop limit is reached), output a summary:

## PR Green Loop — Result

**PR**: #<number>
**Status**: ✅ All green / ⚠ Issues remain after 3 iterations
**Iterations**: <count>

**Fixes applied**:
- <commit hash>: <description>
- <commit hash>: <description>

**Remaining issues** (if any):
- <description of unresolved failure or comment>

Delegation to other skills

ConcernDelegate to
Creating the PRpr-create
Diagnosing CI failuresci-fix
Fetching/replying to review commentsgithub-pull-request-handling
Commit message formatgit-conventional-commits
Python lint/format fixesruff
Lock file syncuv

Rules

  • Never force-push; always use regular git push.
  • Never git add . — stage only files related to the fix.
  • Stop and ask the user if a test failure root cause is ambiguous.
  • Only auto-fix Bugbot comments; leave human reviewer comments for the author.
  • Cap iterations at 3 to prevent runaway loops.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Implement comprehensive error handling for Python code paths to keep services resilient and user-friendly. Use when failures are currently silent or exceptions leak through.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Unique-AG/ai52026년 10월 19일 업데이트

Tabular and numerical data analysis with descriptive statistics and insights. Use when the user provides data, tables, CSVs, or numbers and wants analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Unique-AG/ai52026년 10월 19일 업데이트

Financial factsheet analysis with key metrics extraction and investment rationale

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Unique-AG/ai52026년 10월 19일 업데이트

ci-fix

무료

Diagnose and fix CI failures without leaving your editor.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Unique-AG/ai52026년 10월 19일 업데이트

Reproduce ai-repo PR checks locally with Poe and CI scripts, including per-package typecheck and coverage behavior. Use when validating changes before push or when user asks which local commands match CI.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Unique-AG/ai52026년 10월 19일 업데이트

Ask clarifying questions before implementing to ensure Python requirements are understood. Use when a task lacks detail, dependencies are unclear, or multiple interpretations are possible.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Unique-AG/ai52026년 10월 19일 업데이트

Unique-AG의 스킬 모두 보기

이 스킬의 문제 신고