Agent Skills › Terry-Mao/AICodingFlow › review-pr-local

review-pr-local

GitHub

在本地准备PR审查输入并执行代码审查流程,生成符合规范的review.json报告。用于在提交前模拟CI审查环境,确保代码质量与安全,不修改仓库文件。

.agents/skills/review-pr-local/SKILL.md Terry-Mao/AICodingFlow

Trigger Scenarios

本地开发完成后准备提交PR 需要在本地模拟CI审查流程

Install

npx skills add Terry-Mao/AICodingFlow --skill review-pr-local -g -y
More Options

Non-standard path

npx skills add https://github.com/Terry-Mao/AICodingFlow/tree/main/.agents/skills/review-pr-local -g -y

Use without installing

npx skills use Terry-Mao/AICodingFlow@review-pr-local

指定 Agent (Claude Code)

npx skills add Terry-Mao/AICodingFlow --skill review-pr-local -a claude-code -g -y

安装 repo 全部 skill

npx skills add Terry-Mao/AICodingFlow --all -g -y

预览 repo 内 skill

npx skills add Terry-Mao/AICodingFlow --list

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

  1. 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. The pr_diff.txt snapshot is built from the local worktree diff. The command writes snapshots to a temporary directory and prints the selected review skill as skill=<path> plus exact file paths:
    python3 .github/scripts/prepare_local_review_inputs.py
    
  2. Read the skill path printed by the command.
  3. Follow the selected skill exactly. It will apply any referenced local companion guidance when present.
  4. Use only the printed snapshot paths as review inputs:
    • pr_description_path
    • pr_diff_path
    • spec_context_path when non-empty
  5. Inspect repository files from the current repository root when the review skill needs source context.
  6. Write the review output only to the printed review_path.
  7. Validate the review output:
    python3 .github/scripts/validate_review_json.py <pr_diff_path> <review_path>
    
  8. 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

Same Skill Collection

.agents/skills/bootstrap-issue-config/SKILL.md
.agents/skills/create-issue/SKILL.md
.agents/skills/create-pr/SKILL.md
.agents/skills/diagnose-ci-failures/SKILL.md
.agents/skills/git-branch/SKILL.md
.agents/skills/git-commit/SKILL.md
.agents/skills/git-push/SKILL.md
.agents/skills/git-worktree/SKILL.md
.agents/skills/pr-walkthrough/SKILL.md
.agents/skills/resolve-merge-conflicts/SKILL.md
.agents/skills/review-spec-local/SKILL.md
.agents/skills/spec-driven-implementation/SKILL.md
.agents/skills/write-product-spec/SKILL.md
.agents/skills/write-tech-spec/SKILL.md
.github/skills/check-impl-against-spec/SKILL.md
.github/skills/create-product-spec/SKILL.md
.github/skills/create-tech-spec/SKILL.md
.github/skills/dedupe-issue-repo/SKILL.md
.github/skills/dedupe-issue/SKILL.md
.github/skills/implement-issue/SKILL.md
.github/skills/implement-specs/SKILL.md
.github/skills/product-change-report/SKILL.md
.github/skills/product-docs-sync/SKILL.md
.github/skills/product-wiki/SKILL.md
.github/skills/review-existing-code/SKILL.md
.github/skills/review-pr-repo/SKILL.md
.github/skills/review-pr/SKILL.md
.github/skills/review-spec-repo/SKILL.md
.github/skills/review-spec/SKILL.md
.github/skills/security-review-pr/SKILL.md
.github/skills/security-review-spec/SKILL.md
.github/skills/triage-issue-repo/SKILL.md
.github/skills/triage-issue/SKILL.md
.github/skills/update-dedupe/SKILL.md
.github/skills/update-pr-review/SKILL.md
.github/skills/update-triage/SKILL.md

Metadata

Files
0
Version
93c4bdd
Hash
a4c4d12d
Indexed
2026-07-24 11:35

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-03 03:00
浙ICP备14020137号-1