一键导入
monitor-pr-ci
Monitor PR CI checks and review comments, auto-fix failures and address feedback
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Monitor PR CI checks and review comments, auto-fix failures and address feedback
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
View and edit gasclaw maintainer configuration at runtime
Check and apply updates to all Gastown dependencies
Create well-structured conventional commit messages from staged changes
Create a well-structured PR with conventional commit title and descriptive body
Review a pull request for code quality, test coverage, security, and best practices
Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.
| name | monitor-pr-ci |
| description | Monitor PR CI checks and review comments, auto-fix failures and address feedback |
Monitor a PR's CI checks and review comments. Automatically fix CI failures and address reviewer feedback.
This skill watches a PR until it is merged or reaches the iteration limit. Each iteration:
Ensure gh is authenticated and the repo is cloned locally:
gh auth status
git remote -v
If no PR number is given, detect from the current branch:
PR_NUMBER=$(gh pr view --json number -q '.number' 2>/dev/null)
If a PR number or URL is provided, use it directly.
Repeat up to max-iterations times (default 30), sleeping interval seconds (default 60) between iterations:
gh pr checks "$PR_NUMBER" --json name,state,conclusion,detailsUrl
Categorize results:
gh pr view "$PR_NUMBER" --json reviews,reviewRequests,comments
gh api repos/{owner}/{repo}/pulls/{pr}/comments
Categorize comments:
For each failing check:
Fetch logs: Use the detailsUrl or GitHub Actions API:
# Get the failed run ID
RUN_ID=$(gh api repos/{owner}/{repo}/actions/runs --jq '.workflow_runs[] | select(.head_sha=="'$(git rev-parse HEAD)'") | .id' | head -1)
# Get failed job logs
gh run view "$RUN_ID" --log-failed
Analyze the failure: Read the log output. Common categories:
Apply the fix: Edit the relevant files based on the error analysis.
Commit and push:
git add -A
git commit -m "fix(ci): <description of what was fixed>"
git push
Wait for CI to re-run on the next polling iteration.
For each actionable comment:
Read the comment and the surrounding code context.
Apply the requested change to the relevant file(s).
Reply to the comment acknowledging the fix:
gh api repos/{owner}/{repo}/pulls/{pr}/comments/{comment_id}/replies \
-f body="Fixed in $(git rev-parse --short HEAD). <brief explanation>"
Resolve the thread if you have permission:
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "<thread_id>"}) {
thread { isResolved }
}
}'
Commit and push all fixes together:
git add -A
git commit -m "fix(review): address review feedback"
git push
Stop polling when any of these are true:
Report final status:
gh pr view "$PR_NUMBER" --json state,mergeable,statusCheckRollup,reviews
gh commands fail with auth errors, re-authenticate: gh auth loginAt the end of each iteration, print a status summary:
[Iteration 3/30] PR #42
CI: 4/5 passing, 1 in progress (build)
Reviews: 2 resolved, 1 pending
Action: Waiting for build check to complete
At completion:
PR #42 — All checks passing, all reviews addressed
Total iterations: 7
Fixes applied: 3 (2 CI, 1 review)
Ready for merge