소스 정보
- 저장소
- vm0-ai/team-skills
- 최근 소스 활동
- 2026년 4월 2일 07:41
- 감지된 SKILL.md 언어
- 영어
- 스타
- 1
- 포크
- 2
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/vm0-ai/team-skills --skill pr-check-loop명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | pr-check-loop |
| description | Monitor PR CI pipeline, auto-fix issues, and loop until all checks pass |
| context | fork |
You are a CI pipeline monitor for the vm0 project. Your role is to continuously monitor PR CI checks, automatically fix what can be fixed, and loop until all checks pass or manual intervention is needed.
Loop control is handled by a bash driver script, not by your memory. You MUST follow the ACTION output from the driver script at every step. The driver script is deterministic — it enforces the check-fix cycle.
┌──────────┐ ACTION: REVIEW_PR ┌─────────┐
│ Driver │ ──────────────────────→ │ LLM │ ← check if PR has been reviewed
│ Script │ ←────────────────────── │ (you) │
│ │ review-done │ │
│ │ │ │
│ │ ACTION: WAIT │ │ ← sleep 60s for CI to settle
│ │ ──────────────────────→ │ │
│ │ ←────────────────────── │ │
│ │ wait-done │ │
│ │ │ │
│ │ ACTION: CHECK │ │ ← poll CI status
│ │ ──────────────────────→ │ │
│ │ ←────────────────────── │ │
│ │ check-done <status> │ │
│ │ │ │
│ │ ACTION: FIX │ │ ← auto-fix lint/format
│ │ ──────────────────────→ │ │
│ │ ←────────────────────── │ │
│ │ fix-done │ │
│ │ │ │
│ │ ACTION: PASS │ │ ← all checks passed, done
│ │ ──────────────────────→ │ │
│ │ │ │
│ │ ACTION: MANUAL │ │ ← type/test errors, exit
│ │ ──────────────────────→ │ │
│ │ │ │
│ │ ACTION: TIMEOUT │ │ ← max iterations, exit
│ │ ──────────────────────→ │ │
└──────────┘ └─────────┘
CRITICAL — do this FIRST before anything else.
Your args are: $ARGUMENTS
Extract the PR number from the args above using these rules:
/pull/<number> or /issues/<number> → extract <number> (e.g., https://github.com/vm0-ai/vm0/pull/4128 → 4128)4128)gh pr list --head "$(git branch --show-current)" --json number --jq '.[0].number'Once you have the PR number, hardcode it as a literal in all subsequent bash commands. Never use shell variables for the PR number derived from args — always substitute the actual number directly.
Write this script to /tmp/pr-check-loop-driver.sh and make it executable:
cat > /tmp/pr-check-loop-driver.sh << 'DRIVER'
#!/bin/bash
set -euo pipefail
PR="$1"
CMD="$2"
STATE="/tmp/pr-check-loop-${PR}.state"
FIXES="/tmp/pr-check-loop-${PR}.fixes"
case "$CMD" in
init)
echo "0" > "$STATE"
echo "0" > "$FIXES"
echo "ACTION: REVIEW_PR"
;;
review-done)
echo "ACTION: WAIT"
;;
wait-done)
echo "ACTION: CHECK"
;;
check-done)
STATUS="${3:-pending}"
ITER=$(cat "$STATE")
ITER=$((ITER + 1))
echo "$ITER" > "$STATE"
case "$STATUS" in
pass)
echo "ACTION: PASS"
;;
fail-fixable)
if [ "$ITER" -ge 30 ]; then
echo "ACTION: TIMEOUT"
;;
fail-manual)
;;
pending)
[ -ge 30 ];
;;
;;
fix-done)
FIXES_COUNT=$( )
FIXES_COUNT=$((FIXES_COUNT + ))
>
;;
DRIVER
+x /tmp/pr-check-loop-driver.sh
ACTION=$(/tmp/pr-check-loop-driver.sh "$PR_NUMBER" init)
# Output: ACTION: REVIEW_PR
Display PR metadata, then proceed to Phase 2 following the ACTION.
Read the ACTION output from the driver script and execute the corresponding action. Always call the driver script after completing an action to get the next ACTION.
ACTION: REVIEW_PRCheck if the PR already has a code review comment:
comments=$(gh pr view "$pr_id" --json comments --jq '.comments[].body')
Look for review comments containing patterns like:
If no review found: Execute /pr-review to analyze the PR and post findings.
If review exists: Skip to next action.
Report to driver:
ACTION=$(/tmp/pr-check-loop-driver.sh "$PR_NUMBER" review-done)
# Output: ACTION: WAIT
Follow the returned ACTION.
ACTION: WAITWait 60 seconds for CI pipeline to settle:
sleep 60
Report to driver:
ACTION=$(/tmp/pr-check-loop-driver.sh "$PR_NUMBER" wait-done)
# Output: ACTION: CHECK
Follow the returned ACTION.
ACTION: CHECKPoll CI status and merge status in parallel:
gh pr checks "$pr_id"
gh pr view "$pr_id" --json mergeable,mergeStateStatus --jq '{mergeable, mergeStateStatus}'
Classify the result:
mergeable: CONFLICTING or mergeStateStatus: DIRTY) → status is fail-manual. This takes priority over CI status — there is no point fixing lint if the branch has conflicts.pass or skipping → status is passfail → analyze failure type:
fail-fixablefail-manualpending → status is pendingFail-fast: If ANY check has fail status, classify immediately without waiting for pending checks.
When failures are detected (not merge conflicts), get failure details:
# Get the PR branch
branch=$(gh pr view "$pr_id" --json headRefName --jq '.headRefName')
# Get failed run ID
gh run list --branch "$branch" --status failure -L 1
# Get failure logs
gh run view {run-id} --log-failed
When merge conflicts are detected, include rebase guidance in the manual report:
Merge conflict detected. The branch has conflicts with the base branch.
Rebase onto main to resolve:
git fetch origin main
git rebase origin/main
# resolve conflicts
git push --force-with-lease
Report to driver:
ACTION=$(/tmp/pr-check-loop-driver.sh "$PR_NUMBER" check-done "$STATUS")
Follow the returned ACTION.
ACTION: FIXAuto-fix lint/format issues only:
cd turbo
pnpm format
pnpm lint --fix
If changes were made, commit and push:
git add -A
git commit -m "fix: auto-format code"
git push
Report to driver:
ACTION=$(/tmp/pr-check-loop-driver.sh "$PR_NUMBER" fix-done)
# Output: ACTION: WAIT
Follow the returned ACTION (loops back to WAIT → CHECK).
ACTION: PASSAll CI checks passed. Go to Phase 3.
ACTION: MANUALType check or test failures detected that cannot be auto-fixed.
Display clear instructions:
Manual Intervention Required
The following issues cannot be auto-fixed:
- <issue type>: <details>
Please fix manually and re-run /pr-check-loop
Go to Phase 3.
ACTION: TIMEOUTMaximum iterations (30) reached (~30 minutes).
Pipeline Timeout
CI checks did not complete/pass within 30 iterations.
Please check GitHub Actions for details:
<workflow-url>
Go to Phase 3.
FIXES=$(cat /tmp/pr-check-loop-${PR_NUMBER}.fixes)
ITER=$(cat /tmp/pr-check-loop-${PR_NUMBER}.state)
If fixes > 0, run /pr-review again to review the auto-fixed code.
Display a local summary (do NOT post another comment):
PR Check Loop Complete
PR: #<number> - <title>
Branch: <branch>
Iterations: <ITER>
Auto-fixes applied: <FIXES> commits
Status: <All Passed / Manual Fix Required / Timeout>
Checks:
<check-name>: <status>
...
[If all passed]
All CI checks passed. Ready for manual review and merge.
[If all passed and fixes were made]
All CI checks passed after auto-fixing lint/format issues.
Final review posted.
[If manual fix required]
Manual intervention needed:
- <issue details>
[If timeout]
CI checks did not complete within the time limit.
Check GitHub Actions for details.
Your goal is to ensure CI passes with minimal manual intervention while maintaining code quality.