Use when given a GitHub pull request link and needing an end-to-end multi-skill review pipeline that prepares a PR worktree, runs category reviews in parallel, submits one merged PR review, and then cleans up.
Run a full PR review pipeline by orchestrating existing skills directly.
This skill must:
Do not call scripts from this skill. Invoke the skills themselves.
pr_link (required)
https://github.com/pingcap/tidb/pull/12345project_path (optional)
Emit one JSON object summarizing orchestration status:
{
"pr_link": "https://github.com/pingcap/tidb/pull/12345",
"prepare": {},
"review_outputs": [],
"merge_submit": {},
"cleanup": {},
"status": "success",
"reason": ""
}
status values:
successpartial-failure (review/merge failed but cleanup attempted)failed (prepare failed, or critical orchestration failure)reason values:
subagent-dispatch-unavailable)Required: invoke these skills directly by name:
Forbidden in this skill:
prepare-pr-diff-worktree/scripts/*merge-review-json-and-submit-pr-review/scripts/*cleanup-pr-diff-worktree/scripts/*dispatching-parallel-agents by workflow intent (parallel, independent tasks).fork_context=falsecodex exec fallback: start a fresh child process with no parent conversation transcript in prompt inputfailed with reason context-isolation-unavailable.codex exec child-agent processes (one process per reviewer) when native Task/subagent API is unavailable.codex exec is available, stop and return failed with reason subagent-dispatch-unavailable.Prepare worktree metadata
pr_linkproject_path (when provided)fork_context=false) and explicitly scope the prompt to prepare only.code_path, diff_filename, work_tree)review-*.json, merged-review-output.json, github-review-payload.jsonscope-breach, terminate that subagent, and rerun prepare once in a new isolated subagentcode_pathdiff_filenamework_treeDispatch 6 review skills in parallel subagents
codex exec child-agent processesworkspace-write (never read-only)<review-skill-name> directly."code_path=<...>, diff_filename=<...>, output_filename=<...>."output_filename."workspace-write sandbox access."fork_context=false (no inherited parent conversation context)."Task("Invoke skill review-clarity-naming-comment-intent with code_path=<...> diff_filename=<...> output_filename=review-clarity-naming-comment-intent.json. Execute in this subagent only.", sandbox_mode="workspace-write")
Task("Invoke skill review-correctness-query-planner-execution with code_path=<...> diff_filename=<...> output_filename=review-correctness-query-planner-execution.json. Execute in this subagent only.", sandbox_mode="workspace-write")
Task("Invoke skill review-correctness-state-schema-transaction with code_path=<...> diff_filename=<...> output_filename=review-correctness-state-schema-transaction.json. Execute in this subagent only.", sandbox_mode="workspace-write")
Task("Invoke skill review-runtime-reliability-performance with code_path=<...> diff_filename=<...> output_filename=review-runtime-reliability-performance.json. Execute in this subagent only.", sandbox_mode="workspace-write")
Task("Invoke skill review-scope-structure-abstraction with code_path=<...> diff_filename=<...> output_filename=review-scope-structure-abstraction.json. Execute in this subagent only.", sandbox_mode="workspace-write")
Task("Invoke skill review-upgrade-compatibility-and-test-determinism with code_path=<...> diff_filename=<...> output_filename=review-upgrade-compatibility-and-test-determinism.json. Execute in this subagent only.", sandbox_mode="workspace-write")
codex exec fallback (conceptual):
codex exec --sandbox workspace-write -C "<code_path>" \
"Invoke skill review-clarity-naming-comment-intent directly. Inputs: code_path=<code_path>, diff_filename=<diff_filename>, output_filename=review-clarity-naming-comment-intent.json. Write output JSON to exactly output_filename. Run this subagent with workspace-write sandbox access. Do not run in parent; execute in this subagent only." \
> review-clarity-naming-comment-intent.log 2>&1 &
codex exec --sandbox workspace-write -C "<code_path>" \
"Invoke skill review-correctness-query-planner-execution directly. Inputs: code_path=<code_path>, diff_filename=<diff_filename>, output_filename=review-correctness-query-planner-execution.json. Write output JSON to exactly output_filename. Run this subagent with workspace-write sandbox access. Do not run in parent; execute in this subagent only." \
> review-correctness-query-planner-execution.log 2>&1 &
codex exec --sandbox workspace-write -C "<code_path>" \
"Invoke skill review-correctness-state-schema-transaction directly. Inputs: code_path=<code_path>, diff_filename=<diff_filename>, output_filename=review-correctness-state-schema-transaction.json. Write output JSON to exactly output_filename. Run this subagent with workspace-write sandbox access. Do not run in parent; execute in this subagent only." \
> review-correctness-state-schema-transaction.log 2>&1 &
codex exec --sandbox workspace-write -C "<code_path>" \
"Invoke skill review-runtime-reliability-performance directly. Inputs: code_path=<code_path>, diff_filename=<diff_filename>, output_filename=review-runtime-reliability-performance.json. Write output JSON to exactly output_filename. Run this subagent with workspace-write sandbox access. Do not run in parent; execute in this subagent only." \
> review-runtime-reliability-performance.log 2>&1 &
codex exec --sandbox workspace-write -C "<code_path>" \
"Invoke skill review-scope-structure-abstraction directly. Inputs: code_path=<code_path>, diff_filename=<diff_filename>, output_filename=review-scope-structure-abstraction.json. Write output JSON to exactly output_filename. Run this subagent with workspace-write sandbox access. Do not run in parent; execute in this subagent only." \
> review-scope-structure-abstraction.log 2>&1 &
codex exec --sandbox workspace-write -C "<code_path>" \
"Invoke skill review-upgrade-compatibility-and-test-determinism directly. Inputs: code_path=<code_path>, diff_filename=<diff_filename>, output_filename=review-upgrade-compatibility-and-test-determinism.json. Write output JSON to exactly output_filename. Run this subagent with workspace-write sandbox access. Do not run in parent; execute in this subagent only." \
> review-upgrade-compatibility-and-test-determinism.log 2>&1 &
wait
review-clarity-naming-comment-intent.jsonreview-correctness-query-planner-execution.jsonreview-correctness-state-schema-transaction.jsonreview-runtime-reliability-performance.jsonreview-scope-structure-abstraction.jsonreview-upgrade-compatibility-and-test-determinism.jsonreview-clarity-naming-comment-intent.jsonreview-correctness-query-planner-execution.jsonreview-correctness-state-schema-transaction.jsonreview-runtime-reliability-performance.jsonreview-scope-structure-abstraction.jsonreview-upgrade-compatibility-and-test-determinism.jsonoutput_filename) as a primary action, treat as scope-breach and rerun that reviewer in a fresh isolated subagentMerge and submit review
fork_context=false).pr_linkinput_files = all 6 review JSON files from step 2merged_output = merged-review-output.jsonpayload_output = github-review-payload.jsonCleanup (always attempt)
fork_context=false).work_tree from prepare outputproject_path when needed by current directory contextReturn orchestration summary JSON
statusfailed.failed with reason context-isolation-unavailable.codex exec is available in step 2: stop pipeline and return failed with reason subagent-dispatch-unavailable.codex exec subagents fail to start or exit non-zero, treat as reviewer-subagent failure.scope-breach, terminate it, and retry that step in a fresh isolated subagent. If retry still breaches scope, return partial-failure with reason scope-breach.partial-failure with failure details (including any hang signals used to justify forced termination)partial-failure with merge error and file outputs kept for retrypartial-failure and include cleanup error details