Agent Skills
› Terry-Mao/AICodingFlow
› review-pr-local
review-pr-local
GitHub在本地执行PR审查流程,模拟CI环境准备输入快照并委托给review-pr技能。严格限制只读操作和输出到指定路径,禁止修改代码或推送,确保审查过程安全隔离且结果可验证。
Trigger Scenarios
本地代码实现完成后、推送或创建PR前
需要模拟CI审查流程进行本地预检时
Install
npx skills add Terry-Mao/AICodingFlow --skill review-pr-local -g -y
SKILL.md
Frontmatter
{
"name": "review-pr-local",
"description": "Run the repository PR review workflow locally from the current branch using temporary-directory snapshots and the same review.json contract as CI."
}
review-pr-local
Use this skill after local implementation work and before pushing or creating a
PR. It prepares the same review inputs used by the GitHub review workflow, then
delegates review logic to review-pr.
Workflow
- From the repository root, prepare local review inputs. This prefers the
GitHub PR associated with the current branch for
pr_description.txt, then falls back to locally built PR metadata when the GitHub PR cannot be fetched. Thepr_diff.txtsnapshot is built from the local worktree diff. The command writes snapshots to a temporary directory and prints the selected review skill asskill=<path>plus exact file paths:python3 .github/scripts/prepare_local_review_inputs.py - Read the
skillpath printed by the command. - Follow the selected skill exactly. It will apply any referenced local companion guidance when present.
- Use only the printed snapshot paths as review inputs:
pr_description_pathpr_diff_pathspec_context_pathwhen non-empty
- Inspect repository files from the current repository root when the review skill needs source context.
- Write the review output only to the printed
review_path. - Validate the review output:
python3 .github/scripts/validate_review_json.py <pr_diff_path> <review_path> - Validate that the review phase did not mutate repository files:
python3 .github/scripts/validate_local_review_result.py \ --baseline-status <baseline_status_path>
Safety Rules
- After input preparation, do not run
git add,git commit,git push,gh, or GitHub API commands. - Do not post comments or mutate GitHub state.
- Do not modify source, workflow, tests, specs, or skill files.
- If review discovers issues, report them through
review.json; do not fix code during this skill.
Version History
- e53c5ac Current 2026-07-24 11:35


