一键导入
pr-lifecycle
Manages the full PR lifecycle: creation, review comment handling, CI remediation, and user-approved merge
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manages the full PR lifecycle: creation, review comment handling, CI remediation, and user-approved merge
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scaffolds compilable but failing test harnesses for feature and chore tasks
Structured code review using tiered persona subagents, confidence-gated findings, and a merge/dedup pipeline. Use when reviewing code changes before creating a PR, as a build gate, or for standalone review.
GI/GR reconciliation gate for shipment manifests — verifies every manifest item exists in queue (pre-mode) or archive (post-mode) with the expected status, and closes shipments with the single-artifact safe-close procedure that archives ONLY manifest item IDs with a verify-after-each invariant + git-revert-on-cascade instead of the destructive cascade backlogit_ship_shipment.
On-demand harness health diagnostic. Checks manifest presence, version drift, file integrity, cross-reference validity, MCP tool availability, and template variable residue. Produces a per-category graded health report.
Multi-phase security audit skill. Scans agentic config surfaces and application source for OWASP Top 10 vulnerabilities, STRIDE threats, and config hygiene issues. Produces a scored, graded report persisted to the configured security docs directory (default: docs/security).
| name | pr-lifecycle |
| description | Manages the full PR lifecycle: creation, review comment handling, CI remediation, and user-approved merge |
| argument-hint | branch=feature/{feature-number}-{slug} |
| input | {"properties":{"branch":{"type":"string","description":"Feature branch to create PR for"},"title":{"type":"string","description":"PR title (optional, defaults to branch name)"}},"required":["branch"]} |
Manage the branch-to-merged workflow for a feature or chore branch. This skill creates or updates the pull request, responds to review feedback, keeps CI healthy, and stops at the user merge gate unless the user explicitly approves the merge.
Use this skill when implementation work is ready to move through pull request execution. It centralizes the PR control loop so higher-level agents can treat review, CI follow-up, and merge approval as one bounded workflow.
When the agent-intercom capability pack is installed, call ping at
session start. If reachable, broadcast at every step. If unreachable,
warn the operator that visibility is degraded and continue locally.
| Event | Level | Message prefix |
|---|---|---|
| Session start | info | [PR-LIFECYCLE] Starting: branch={input.branch} |
| Branch pushed | info | [PR-LIFECYCLE] Branch pushed: {branch} |
| PR created | info | [PR-LIFECYCLE] PR created: {pr_url} |
| PR updated | info | [PR-LIFECYCLE] PR updated: {pr_url} |
| Feedback received | info | [PR-LIFECYCLE] Review feedback: {comment_count} comments |
| Fix applied | info | [PR-LIFECYCLE] Fix applied for: {comment_summary} |
| CI failure | warning | [PR-LIFECYCLE] CI failed — delegating to fix-ci |
| CI green | info | [PR-LIFECYCLE] CI passing |
| Ready for merge | success | [PR-LIFECYCLE] PR ready — awaiting user approval |
| Merged | success | [PR-LIFECYCLE] Merged: {pr_url} |
| Blocked | warning | [PR-LIFECYCLE] Blocked: {reason} |
${input:branch}: (Required) Branch name to ship.${input:title}: (Optional) PR title override. When omitted, derive
the title from the branch name or prepared PR description.## Local Review Readiness block required by
.github/instructions/github-pr-automation.instructions.md §1.9, including:
READY, READY_WITH_FOLLOWUPS, or BLOCKED)BLOCKED.gh pr create or gh pr edit) to create or
refresh the pull request.When the repository is hosted on GitHub, Copilot Review may be requested in advisory shadow mode immediately after PR creation or after pushing new commits:
.github/instructions/github-pr-automation.instructions.md §1.1 when the operator or workflow enables migration shadow mode.DARK_MODE_ACTIVE is present, keep shadow review advisory by default:
local review readiness remains authoritative, and timeout/unavailability is
recorded in the PR readiness summary instead of blocking merge readiness..github/instructions/github-pr-automation.instructions.md Part 1:
categorize comments (§1.3), apply fixes (§1.4), reply to threads
(§1.5), and resolve bot-authored threads via GraphQL (§1.6).
When DARK_MODE_ACTIVE is present and the operator is AFK, continue these
bounded review-fix-push iterations autonomously: fix valid comments, commit and
push, reply with the fixing commit, resolve bot-authored threads, and only halt
for unsafe changes, unresolved P0/P1 findings, elevated blocking review, or
circuit-breaker limits.fix-ci skill with the active PR or branch
context..github/instructions/github-pr-automation.instructions.md Part 2
for status monitoring, failure extraction, and fix-push-poll loops.fix-ci own the remediation loop for failing checks and
unresolved review comments.When fixes were pushed (from either review or CI remediation) and shadow review is enabled:
.github/instructions/github-pr-automation.instructions.md
§1.7.Before presenting the PR as merge-ready, run the defense-in-depth
local review readiness verification defined in
.github/instructions/github-pr-automation.instructions.md §1.9:
hasNextPage
is false. If pagination cannot complete, fail closed and halt.headRefOid.READY or READY_WITH_FOLLOWUPS.reviewDecision, and any
CHANGES_REQUESTED reviews in the merge-readiness summary — these
may independently block merge at the GitHub level.READY_WITH_FOLLOWUPS requires
explicit follow-up handling, and shadow-review unavailability does not block
unless elevated by the activation contract or operator.DARK_MODE_ACTIVE is present, the activation record may satisfy this
approval signal only when the PR is inside scope, merge_approval_pre_authorized
is true, §1.9 passed for the current HEAD, required checks are green or
explicitly non-applicable, and P-009/P-016 have passed. Otherwise, wait for
explicit operator approval.main or any other branch. The calling agent (Ship)
depends on the branch context being preserved for post-merge work.After receiving operator approval, or after confirming a valid
DARK_MODE_ACTIVE approval record, and before executing any normal merge or
admin fallback:
headRefOid.headRefOid still matches the HEAD covered by the latest passed
§1.9 gate and the PR body's Reviewed HEAD value.headRefOid, or
the latest passed §1.9 gate covered a different SHA, re-run §1.9 in full
before merge or fallback — the prior gate result is stale.P-014 LAST-MILE CHECK PASSED: branch unchanged, local readiness still covers HEAD.This last-mile check closes the race window between approval receipt and merge execution. It is a lightweight incremental query (not a full §1.9 re-run) when the branch has not changed.
NORMAL_MERGE_READY before executing the merge command.MERGE_SUCCEEDED result with the
merge SHA and finish.REVIEW_REQUIRED_BLOCKCONVERSATION_RESOLUTION_BLOCKCHECKS_BLOCKMERGE_STRATEGY_BLOCKMISSING_ADMIN_RIGHTSUNKNOWN_MERGE_BLOCKadmin_fallback_pre_authorized.
Before fallback, run Step 5c's immediate headRefOid re-query/comparison and
re-confirm required checks, P-009 merge-commit strategy, P-016 topology, and
scope match.MISSING_ADMIN_RIGHTS.After a user-approved merge:
main and start working on it.
Post-merge closure work belongs on a dedicated post-merge/ branch
created by the Ship agent. This skill's responsibility ends at
reporting the merge result.The skill is complete only when one of these outcomes is explicit:
| Counter | Limit | Action |
|---|---|---|
| Fix-CI delegation cycles | 5 | Halt, leave PR for manual intervention |
| Review-fix cycles | 3 | Accept remaining advisory shadow-review comments as backlog follow-ups |
This skill operates at Tier 2 (Standard) — PR creation and follow-up is routine coordination.