ワンクリックで
mark-pr-ready
Promote a draft PR to ready-for-review after CI passes and self-review is clean. Assigns reviewers and adds labels.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Promote a draft PR to ready-for-review after CI passes and self-review is clean. Assigns reviewers and adds labels.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Diagnose and fix failing CI on a PR. Capped at 3 attempts. Load repo-setup first.
Refresh /workspace/repo and prepare the correct branch. Load this before any situation skill.
Resolve a GitHub issue end-to-end — explore, plan, implement, clean up, and open a draft PR.
Review a pull request. Self-fix on own PRs, post a review on others'. Load repo-setup first.
Review the current branch's changes against intent. Returns a structured list of findings the caller can hand to a fix-applier, or an empty list when there's nothing to address. Use this for both self-review of your own work and reviewing someone else's PR.
Apply review findings as the smallest code changes, then commit and push. Used on the bot's own PRs.
| name | mark-pr-ready |
| description | Promote a draft PR to ready-for-review after CI passes and self-review is clean. Assigns reviewers and adds labels. |
| license | Apache-2.0 |
| metadata | {"audience":"autonomous-agents"} |
Promote a draft PR out of draft status. Only do this when CI is green and self-review found no remaining issues.
gh pr checks <N> --required).Verify CI status:
FAILING=$(gh pr checks <N> --json name,state \
--jq '[.[] | select(.state != "SUCCESS" and .state != "SKIPPED" and .state != "NEUTRAL")]')
If the output is not an empty array [], stop — CI isn't green yet.
Mark ready for review:
gh pr ready <N>
Request reviewers. Always add the creator of the originating issue as a reviewer — they have the most context on the problem and should sign off on the fix:
ISSUE_AUTHOR=$(gh issue view <issue-N> --json author --jq '.author.login' 2>/dev/null)
if [ -n "$ISSUE_AUTHOR" ]; then
gh pr edit <N> --add-reviewer "$ISSUE_AUTHOR" 2>/dev/null || true
fi
Then fall back to CODEOWNERS. GitHub auto-assigns from CODEOWNERS when a draft PR is marked ready (if branch protection requires reviews), so explicit assignment is often unnecessary. If the repo doesn't use branch protection, try to find an owner:
CODEOWNERS_FILE=""
for f in .github/CODEOWNERS CODEOWNERS docs/CODEOWNERS; do
[ -f "$f" ] && CODEOWNERS_FILE="$f" && break
done
if [ -n "$CODEOWNERS_FILE" ]; then
OWNERS=$(grep -v '^#' "$CODEOWNERS_FILE" | awk '{for(i=2;i<=NF;i++) print $i}' | sort -u | head -3)
for owner in $OWNERS; do
owner="${owner#@}"
gh pr edit <N> --add-reviewer "$owner" 2>/dev/null || true
done
fi
If reviewer assignment fails (e.g. the issue author can't review their own org's PR, or isn't a collaborator), skip silently.
Add labels:
gh pr edit <N> --add-label "bot-generated"
If the original issue had priority labels, propagate them:
ISSUE_LABELS=$(gh issue view <issue-N> --json labels --jq '.labels[].name' 2>/dev/null)
for label in $ISSUE_LABELS; do
case "$label" in priority*|P0|P1|P2|P3|critical|high|medium|low)
gh pr edit <N> --add-label "$label" 2>/dev/null || true
;;
esac
done
Post a short comment noting the PR is ready. Mention what CI checks passed and that self-review found no issues. Write it naturally — vary the wording, don't use a canned phrase.
auto-merge next if the PR qualifies.check_suite or workflow_run event with conclusion success.