await-pr-checks
Skill4 starsChanged 6 months agoMITView on GitHub
Monitor PR checks, wait for completion, auto-fix test failures, and report back. Use when user says "wait for checks", "monitor CI", "watch PR", "await checks", or wants to know when CI passes.
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 16 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
If user provides a PR number or URL, use it.
- Distinctive: line 19
Run a polling loop: fetch the PR check run status using GitHub tools (owner, repo, pullNumber).
- Distinctive: line 22
Checks still running: wait 30 seconds and poll again
- Very specific: line 25
All CI checks pass: call get_review_comments to check for CodeRabbit inline comments.
- Very specific: line 33
When Bugbot's status is skipped:
- Distinctive: line 40
Wait for all other checks to finish first: If other checks are still running or have failures, handle those (Steps 3-4) before moving to …
- Distinctive: line 42
After resolving Bugbot's comments and pushing fixes, return to Step 2 to monitor the new CI run (Bugbot will re-run on the new commits).
- Distinctive: line 50
Wait for all CI checks to pass first: If checks are still running or have failures, handle those (Steps 3-4) before processing CodeRabbit …
- Distinctive: line 55
If CodeRabbit posted review comments with actionable findings:
- Distinctive: line 61
After resolving comments and pushing fixes, return to Step 2 to monitor the new CI run.
- Distinctive: line 63
If CodeRabbit posted only a summary comment (no inline code review comments), report it as informational and continue — no action needed.
- Distinctive: line 80
Read the relevant source files identified in the error output
- Distinctive: line 83
If tests failed, run them locally using the project's standard test command
- Very specific: line 84
Do NOT commit or push automatically — leave fixes in the working tree and tell the user: "CI fix applied locally.
- Distinctive: line 89
Do NOT attempt to fix. Report to the user:
- Distinctive: line 95
Retry limit: After 3 fix cycles without all checks passing, stop and report to the user.
- Distinctive: line 99
When all checks pass:
- Distinctive: line 112
When stopping due to retry limit or unfixable failures:
- Very specific: line 124
Check if any CI failure patterns fixed during this workflow are not covered by existing .agents/rules/ files
- Distinctive: line 125
Search existing rules by keyword and concept to avoid duplicates
- Very specific: line 126
If a reusable pattern was found, suggest /create-rule.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Await PR Checks
Monitor a pull request's CI checks, wait for them to complete, automatically fix test failures, and report back when everything passes (or when manual intervention is needed).
Instructions
Step 1: Identify the PR
- If user provides a PR number or URL, use it.
- Otherwise, detect from current branch: get the branch name with
git branch --show-current, then list open pull requests using the available GitHub tools (owner, repo, head branch, state: open) to find the matching PR number.
Step 2: Poll Check Status
Run a polling loop: fetch the PR check run status using GitHub tools (owner, repo, pullNumber).
Interpret the results (evaluate in this order):
- Checks still running: wait 30 seconds and poll again
- Any check fails: go to Step 3 (diagnose and fix)
- Bugbot check is
skipped: go to Step 2b (Bugbot found issues) - All CI checks pass: call
get_review_commentsto check for CodeRabbit inline comments. If found, go to Step 2c (CodeRabbit found issues). Otherwise, go to Step 5 (report success)
Step 2b: Handle Bugbot Results
Bugbot uses a non-standard status convention:
success= Bugbot finished and found no bugs — treat as a normal passing checkskipped= Bugbot finished and found bugs — it has posted review comments on the PR that need resolution
When Bugbot's status is skipped:
- Report to the user:
Bugbot found issues on PR #<number> (status: skipped). Transitioning to /resolve-pr-comments to address Bugbot's review comments. - Wait for all other checks to finish first. If other checks are still running or have failures, handle those (Steps 3-4) before moving to Bugbot comments. Bugbot comments are code review feedback, not CI failures — they're resolved differently.
- Once all other checks are resolved (passed or reported), invoke the
/resolve-pr-commentsskill to process Bugbot's comments through the standard one-by-one approval flow. - After resolving Bugbot's comments and pushing fixes, return to Step 2 to monitor the new CI run (Bugbot will re-run on the new commits).
Step 2c: Handle CodeRabbit Results
CodeRabbit posts AI code review comments on PRs. It may also set a check status (named coderabbitai or similar) to indicate that a review was performed.
CodeRabbit's review status alone is not a pass/fail gate — with request_changes_workflow: false in .coderabbit.yaml, it only posts comments without blocking the PR. The value is in the review comments themselves.
Wait for all CI checks to pass first. If checks are still running or have failures, handle those (Steps 3-4) before processing CodeRabbit comments. CodeRabbit comments are code review feedback, not CI failures — they're resolved differently.
Once all CI checks pass:
- Fetch the PR review comments using the available GitHub tools (owner, repo, pullNumber). Filter for comments from the
coderabbitaiuser (or users ending in[bot]with "coderabbit" in the name). - If CodeRabbit posted review comments with actionable findings:
CodeRabbit posted review comments on PR #<number>. Transitioning to /resolve-pr-comments to address CodeRabbit's review comments. - Invoke the
/resolve-pr-commentsskill to process CodeRabbit's comments through the standard one-by-one approval flow. - After resolving comments and pushing fixes, return to Step 2 to monitor the new CI run.
If CodeRabbit posted only a summary comment (no inline code review comments), report it as informational and continue — no action needed.
Step 3: Diagnose Failures
For each failed check:
- Get the failed check's details from the
get_check_runsoutput (name, status, conclusion, details URL) - Fetch the build/test logs. The check runs response includes check run details and URLs. For detailed CI failure logs, follow the check run URL in the GitHub UI or run the GitHub CLI command
gh run view <run-id> --log-failedif available. - Parse the log output to identify:
- Build errors: compilation failures, missing references
- Test failures: which tests failed and why (assertion messages, exceptions)
- Infrastructure failures: timeout, OOM, flaky network — these are NOT auto-fixable
Step 4: Auto-Fix and Retry
For build errors and test failures:
- Read the relevant source files identified in the error output
- Fix the issue (compilation error, broken test assertion, missing import, etc.)
- Build locally to verify, using the project's standard build command
- If tests failed, run them locally using the project's standard test command
- Do NOT commit or push automatically — leave fixes in the working tree and tell the user: "CI fix applied locally. Run
/commitand push when ready, then I'll continue monitoring." - Once the user has committed and pushed, return to Step 2 to monitor the new run
For infrastructure/flaky failures:
Do NOT attempt to fix. Report to the user:
Check "<name>" failed due to infrastructure issues (not a code problem).
You may want to re-run it manually: <check URL>Retry limit: After 3 fix cycles without all checks passing, stop and report to the user. Do not loop indefinitely.
Step 5: Report Results
When all checks pass:
All CI checks passed on PR #<number>:
- <check 1>: passed
- <check 2>: passed
- ...
<If fixes were applied:>
Fixes applied:
- <commit hash>: <description>When stopping due to retry limit or unfixable failures:
CI checks on PR #<number> need attention:
- <check 1>: passed
- <check 2>: FAILED — <reason>
<what was tried and why it couldn't be auto-fixed>Step 5b: Knowledge Capture — Rule Check
- Check if any CI failure patterns fixed during this workflow are not covered by existing
.agents/rules/files - Search existing rules by keyword and concept to avoid duplicates
- If a reusable pattern was found, suggest
/create-rule. Provide:- The pattern (rule text)
- The anti-pattern (the bad code or violation, with example)
- The evidence (source: CI failure auto-fix, what was discovered)
- Suggested context tags (e.g.,
ci,build,test,infrastructure)
Do NOT write rule files directly — /create-rule handles dedup, ID assignment, index update, and source tracking.
Skip this step if no new patterns were discovered.
Critical Rules
- Max 3 fix attempts — do not loop forever. After 3 fix cycles, report and stop.
- Never fix infrastructure failures — timeouts, OOM, rate limits, and flaky network issues require manual re-run, not code changes.
- Always build/test locally before committing — don't commit blind fixes.
- Don't change test expectations to make tests pass — fix the code under test, not the test assertions (unless the test itself is genuinely wrong).
- Commit messages must describe what was fixed — not just "fix CI".
- Bugbot
skipped≠ success — Bugbot reportsskippedwhen it finds bugs. Onlysuccessmeans no issues. When Bugbot isskipped, transition to/resolve-pr-commentsto address its review comments before declaring all checks green. - Bugbot comments go through
/resolve-pr-comments— do NOT attempt to auto-fix Bugbot findings like CI failures. They are code review feedback and must be processed through the standard comment resolution flow with user approval. - CodeRabbit comments go through
/resolve-pr-comments— CodeRabbit is an AI code reviewer that posts inline review comments. Its check status (if present) is informational, not a CI gate. After CI checks pass, check for CodeRabbit review comments and process them through/resolve-pr-commentslike Bugbot comments. - CodeRabbit summary comments are informational — CodeRabbit posts a high-level summary comment (walkthrough) on each PR. This is not actionable — only process its inline code review comments through
/resolve-pr-comments.
In this repository61 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/ai-workspace-projections.mdcCursor rule
- .cursor/rules/mcp-tool-configs.mdcCursor rule
- .cursor/rules/node-typescript.mdcCursor rule
- .cursor/rules/runstore-listruns-cache.mdcCursor rule
- .cursor/rules/worker-posture.mdcCursor rule
- .cursor/rules/worker-safety.mdcCursor rule
- commitSkill
- create-agentSkill
- create-issueSkill
- create-mcpSkill
- create-planSkill
- create-prSkill
- create-ruleSkill
- create-skillSkill
- create-test-planSkill
- implement-planSkill
- load-contextSkill
- mergeprepSkill
- orchestrate-create-planSkill
- orchestrate-create-test-planSkill
- orchestrate-implement-planSkill
- orchestrate-resolve-pr-commentsSkill
- orchestrate-reviewSkill
- publish-releaseSkill
- resolve-conflictsSkill
- resolve-issue-commentsSkill
- resolve-pr-commentsSkill
- resolve-review-findingsSkill
- review-prSkill
- reviewSkill
- run-test-planSkill
- setup-worktreeSkill
- update-contextSkill
- await-pr-checksSkill
- commitSkill
- create-agentSkill
- create-issueSkill
- create-mcpSkill
- create-planSkill
- create-prSkill
- create-ruleSkill
- create-skillSkill
- create-test-planSkill
- implement-planSkill
- load-contextSkill
- orchestrate-create-planSkill
- orchestrate-create-test-planSkill
- orchestrate-implement-planSkill
- orchestrate-resolve-pr-commentsSkill
- orchestrate-reviewSkill
- publish-releaseSkill
- resolve-conflictsSkill
- resolve-issue-commentsSkill
- resolve-pr-commentsSkill
- review-prSkill
- reviewSkill
- run-test-planSkill
- setup-worktreeSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

