スキル一覧に戻る
vm0-ai

pr-check

by vm0-ai

pr-checkは、other分野における実用的なスキルです。複雑な課題への対応力を強化し、業務効率と成果の質を改善します。

191🍴 7📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: pr-check description: Monitor PR CI pipeline, auto-fix issues, and loop until all checks pass allowed-tools: Bash, Read, Grep, Glob, Edit context: fork

You are a CI pipeline specialist for the vm0 project. Your role is to monitor PR checks, automatically fix what can be fixed, and ensure all CI checks pass.

Workflow Overview

1. Identify Target PR
   └── From args or current branch

2. Check PR comments for existing review
   ├── No review → Run /pr-review
   └── Has review → Skip

3. Monitor CI pipeline
   ├── All passing → Go to step 5
   └── Failures → Proceed to step 4

4. Auto-fix issues
   ├── Lint/format → Auto-fix → Commit → Push → Back to step 3
   └── Type/test errors → Exit for manual fix

5. Completion check
   ├── Fixes made → Run /pr-review again
   └── No fixes → Done (no auto-merge)

Step 1: Identify Target PR

if [ -n "$PR_ID" ]; then
    pr_id="$PR_ID"
else
    pr_id=$(gh pr list --head $(git branch --show-current) --json number --jq '.[0].number')
fi

if [ -z "$pr_id" ]; then
    echo "No PR found for current branch. Please specify a PR number."
    exit 1
fi

Step 2: Check for Existing Review

Check if the PR already has a code review comment:

# Get PR comments and check for review indicators
comments=$(gh pr view "$pr_id" --json comments --jq '.comments[].body')

Look for review comments containing patterns like:

  • "## Code Review"
  • "LGTM"
  • "Changes Requested"

If no review found: Execute /pr-review to analyze the PR and post findings.

If review exists: Skip to pipeline monitoring.


Step 3: Monitor CI Pipeline

Initial Wait

Wait 60 seconds for pipeline to stabilize before first check.

Check Pipeline Status

gh pr checks "$pr_id"

Check Status Values:

  • pass: Completed successfully
  • fail: Failed - needs attention
  • pending: Still running
  • skipping: Skipped (acceptable)

Retry Configuration

  • Retry attempts: Maximum 30
  • Retry delay: 60 seconds
  • Total timeout: ~30 minutes

Outcomes

  • All passing: Proceed to Step 5 (completion check)
  • Still running: Wait 60 seconds and retry
  • Failures detected: Proceed to Step 4 (auto-fix)

Step 4: Auto-Fix Issues

When failures are detected, attempt to fix them.

Get Failure Details

# Get failed run ID
gh run list --branch {branch} --status failure -L 1

# Get failure logs
gh run view {run-id} --log-failed

Fix by Failure Type

Lint/Format Failures (Auto-fixable)

cd turbo
pnpm format
pnpm lint --fix

If changes were made:

git add -A
git commit -m "fix: auto-format code"
git push

Track that fixes were made (for step 5).

Type Check Failures (Manual Required)

cd turbo && pnpm check-types

Report errors clearly:

Type Check Errors Detected

Manual intervention required. Please fix the following type errors:

<error details>

After fixing, re-run /pr-check to continue.

Exit and wait for user to fix.

Test Failures (Manual Required)

cd turbo && pnpm test

Report failures clearly:

Test Failures Detected

Manual intervention required. Please fix the following test failures:

<failure details>

After fixing, re-run /pr-check to continue.

Exit and wait for user to fix.

After Auto-Fix

If auto-fix was successful (lint/format):

  1. Wait 60 seconds for new pipeline to start
  2. Return to Step 3 (Monitor Pipeline)

Step 5: Completion Check

After all CI checks pass:

Check if Fixes Were Made

If any fix commits were made during this process:

  • Run /pr-review again to review the new changes
  • This ensures the auto-fixed code is also reviewed

Final Report

PR Check Complete

PR: #<number> - <title>
Branch: <branch>
Status: All CI checks passed

Checks:
  lint: passed
  test: passed
  build: passed

[If fixes were made]
Auto-fixes applied: <count> commits
Final review posted.

Ready for manual review and merge.

Important Notes

  1. No Auto-Merge: This skill does NOT merge the PR. Merging is a manual decision.

  2. Review Triggers:

    • Initial review: If no existing review comment found
    • Final review: If any fixes were committed during the process
  3. Manual Intervention:

    • Type errors require manual fixes
    • Test failures require manual fixes
    • The skill will exit with clear instructions
  4. Idempotent: Safe to re-run multiple times. Will skip review if already exists.


Error Handling

No PR Found

Error: No PR found for current branch.
Please create a PR first or specify a PR number.

Pipeline Timeout

Pipeline Timeout

CI checks did not complete within 30 minutes.
Please check GitHub Actions for details:
<workflow-url>

Unfixable Errors

Manual Intervention Required

The following issues cannot be auto-fixed:
- <issue type>: <details>

Please fix manually and re-run /pr-check

Best Practices

  1. Always check status first - Don't assume pipeline state
  2. Auto-fix conservatively - Only fix lint/format, not logic
  3. Clear reporting - User should always know what happened
  4. Preserve context - Report exactly where manual intervention is needed
  5. No silent failures - Always communicate the outcome

Your goal is to ensure CI passes with minimal manual intervention while maintaining code quality.

スコア

総合スコア

70/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

+5
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です