{
  "$schema": "https://bestaiskill.com/schemas/agent-install/2.json",
  "skill": "github-review-pr",
  "built": "2026-10-26",
  "control_level": 4,
  "control_level_label": "L4 高权限",
  "capabilities": [
    "execute_command",
    "network",
    "write_file"
  ],
  "required_controls": {
    "agent": [
      "sandbox_recommended",
      "graded_authorization"
    ],
    "admin": [
      "approval_process",
      "rollback_support",
      "full_audit"
    ]
  },
  "evidence": [
    {
      "file": "scripts/",
      "summary": "Executes local scripts or commands: executed on the host per prompt instructions: gh auth status / gh pr view / gh pr list / gh repo view / gh pr "
    },
    {
      "file": "网络端点",
      "summary": "Declares external network access: api.github.com — all gh api / gh pr view|list|checks / gh repo view / gh pr"
    },
    {
      "file": "本地工作目录",
      "summary": "File I/O and artifact output: read-only default paths: git fetch writes to namespaced refs refs/review-pr/<PR>/base, …/head, …/recorded-base"
    }
  ],
  "verification": {
    "method": "第二遍独立重读 + 反查（换角度找第一遍的错，不沿用第一遍结论）：① find 全量清点资产面（含隐藏文件与可执行位）：本 skill 恰好 4 个文件（SKILL.md 487 行、references 260+412 行、evals/evals.json 19 行），无 scripts/、无 tests/、无 agents/openai.yaml、无隐藏文件、无可执行位；② 逐类 token 扫描定位网络与执行面：curl|wget|scp|ssh|nc|eval|base64|subprocess|os.system|python|node|npm|npx|chmod|sudo|api.github|http(s):// —— 唯一字面 URL 是 personal 政策里的 claude.com 项目要求页，api.github.com / github.com 均无字面量（已在 external_deps 标注为 gh/git 的隐式端点，未硬写成显式端点）；③ 逐条反查 external_deps 的调用点真实存在（gh 7 类子命令、git 13 类子命令、jq 2 处用法，均定位到具体行号）；④ 本文件内每条 evidence 的 quote 在写入前用脚本做「字节级子串」机器校验（含换行的多行引用按原字节匹配），100% 命中；⑤ 命令与参数真实性交叉核对（merge-tree --write-tree 需 git ≥ 2.38 且 README Requirements 已声明、gh pr checks 退出码 8 表示 pending、gh pr merge --match-head-commit、PUT update-branch 的 expected_head_sha、POST reviews 的 commit_id、rules/branches/<branch> 的 merge_queue 参数、gh pr review 无 commit_id 故改用 REST 端点）——均为文档级一致性核对，未联网执行、未跑构建/测试/格式化；⑥ 边界与夸大检查：对「与 github-ops / git-safety-net 的边界应在 SKILL.md 明确指路」这一任务假设做了全目录 grep，结果零命中，详见 second_pass 第 1 条。全过程只读：未 clone/pull、未改工作副本任何文件。",
    "second_pass": [
      {
        "item": "任务假设：SKILL.md 是否明确指路 github-ops / git-safety-net",
        "status": "discrepancy",
        "detail": "在本 skill 目录内 grep 'github-ops|git-safety-net|skill://' 零命中。SKILL.md 不用「指名 sibling skill」的方式划边界，而是用两条排除清单：'Use a narrower workflow instead when the request is only one of these:'（含 Create or administer PRs, issues, repositories, or workflows / Diagnose CI without reviewing the code change / Address already-filed review comments without performing a fresh review / Merge an already-reviewed PR without performing a fresh review / Review an unpushed local branch or working-tree diff / Run a security-only diff audit）与 frontmatter description 末尾的 'Do not use for general GitHub CRUD, repository-wide audits, CI-only diagnosis, security-only diff audits, unpushed local diffs…'。实际分工出现在仓库级文档：README.md:3723-3726 'Use **github-ops** for verified PR, issue, Actions, repository, organization-access, and API operations.' / 'Use **github-review-pr** when a maintainer needs a current-base code review, ownership decision, or review-gated repair/landing…'；github-ops/SKILL.md 结尾亦有 'For local Git recovery, dirty worktrees, bundles, or lost commits, use `git-safety-net`. This skill owns GitHub-hosted state.'。结论：边界清楚且可查，但实现方式是「本 skill 的排除清单 + 仓库 README 导航」，不是任务描述预期的 SKILL.md 内显式指路。"
      },
      {
        "item": "external_deps 反查：gh CLI 调用点是否真实存在",
        "status": "ok",
        "detail": "逐处定位：gh auth status(SKILL.md:144)、gh pr view --json …(145)、gh api repos/$BASE_REPO/pulls/$PR_NUMBER(146)、gh repo view --json nameWithOwner,visibility,isPrivate,stargazerCount,forkCount(147)、gh api --paginate …/issues/$PR/timeline(150 区域)、gh api repos/$BASE_REPO/commits/$ENCODED_BASE_SELECTOR(164 区域)、gh pr list …--jq(106-107)、gh api --paginate pulls/$PR/reviews|comments 与 issues/$PR/comments(279-281)、gh pr checks(376)、gh api --method POST …/reviews(remediation:68)、--method PUT …/update-branch(206)、gh pr merge …--match-head-commit(322 区域)、gh api repos/$BASE_REPO --jq 合并设置(298)、gh api user --jq .login(personal:37)。全部真实存在，无编造。"
      },
      {
        "item": "external_deps 反查：git 子命令与版本前提",
        "status": "ok",
        "detail": "git fetch --no-tags（含 refs/pull/<n>/head:refs/review-pr/<n>/head 与 recorded-base 回退取法）、git rev-parse、git cat-file -e \"$SHA^{commit}\"、git merge-base 与 --is-ancestor、git merge-tree --write-tree --messages、git log --right-only --cherry-pick --no-merges、git diff（含 --cached --check/--stat 与 <commit>^ 形式）、git switch --detach、git cherry-pick --no-commit、git patch-id --stable、git write-tree、git merge --no-ff -s ours 均在源码内定位到。版本前提只在仓库级文档声明（README.md:3234 '**Requirements**: authenticated `gh` CLI, `git` with `merge-tree --write-tree`, and `jq`.'），SKILL.md 正文未写版本号——即 git 过旧时会在第 3 步直接失败而非给出友好提示。"
      },
      {
        "item": "external_deps 反查：网络端点与 jq",
        "status": "ok",
        "detail": "jq 两处用法真实：gh 的 --jq（pr list 排序与字段投影）与 ENCODED_BASE_SELECTOR=$(jq -rn --arg ref \"heads/$BASE_REF\" '$ref|@uri')(SKILL.md:166)。端点：唯一字面 URL 为 references/personal_maintainer_context.md:87 的 https://claude.com/contact-sales/claude-for-oss；api.github.com 与 github.com 全文无字面量，均由 gh/git 的认证/远端配置解析——已在 external_deps 的 endpoint 字段显式标注「隐式」，未伪装成源码里的显式端点。"
      },
      {
        "item": "安全结论反例搜索：有没有漏掉的网络调用 / 隐藏脚本 / 混淆内容",
        "status": "ok",
        "detail": "find 全量（含隐藏文件）确认仅 4 个文件、无可执行位、无压缩包/二进制；token 扫描 curl|wget|scp|ssh|nc|eval|base64|subprocess|os.system|python|node|npm|npx|chmod|sudo 全部零命中；4 个文件均为可直接阅读的 markdown/JSON，无 base64 段、无编码或混淆内容。故「无自带脚本、无隐蔽外发」成立。识别到的唯一执行面是正文明确指示「在隔离克隆中运行被测仓库规定的测试」——属被测代码执行而非本 skill 自带脚本，已计入 security.scripts_executed 与 grade 理由。"
      },
      {
        "item": "安全结论反例搜索：凭证读取",
        "status": "ok",
        "detail": "grep token|GH_TOKEN|GITHUB_TOKEN|secret|\\.env|keychain|credential 仅命中风险条款（secret exposure、'semantic secret/PII review'、'token change'）与权限检查，没有任何读取或导出凭据值的指令。真实凭据接触只有两处：gh 以宿主已登录身份发起 API/写操作（gh auth status 是显式使用），以及写前查询仓库认证权限。结论：不存在把 token 值读入上下文或外发的路径；但需知晓所有评审/写操作都在维护者的 gh 身份下执行，权限等同于该登录态。"
      },
      {
        "item": "资产面核对：agents/openai.yaml 缺失是否异常",
        "status": "ok",
        "detail": "本 skill 无 agents/openai.yaml。仓库 104 个 SKILL.md 中仅 6 个带该文件（claude-usage-analyst、codex-image-gallery、design-style-picker、download-gemini-images、git-safety-net、wps-doc-scraper），故缺失属仓库常态，不构成差异。后果仅是该 skill 只有 Claude Code 侧 frontmatter（name/description/argument-hint），没有 Codex 侧的显式调用策略（如 allow_implicit_invocation）声明。"
      },
      {
        "item": "「实现原理」是否夸大：功能声明 vs 实际代码能力",
        "status": "ok",
        "detail": "逐条对照 frontmatter 声明（base drift / history discontinuities / polluted branches / ownership / curation / supersession / review-conditioned repair or landing / immutable Git snapshots / three-way merge results / isolated contribution projection / checks / tests / findings-first reporting）——正文各有对应步骤与命令，无越界承诺。两处属「需注记」而非夸大：(a) 「bounded newest-to-oldest sweep」的实现是 gh pr list --limit 100 加「分页可能超限时改用 API 直到每个 open PR 都被计入」并要求报出 verified count，边界由「显式 --all-open + 分页补齐」共同定义；(b) 技能主动限界，声明 GitHub 无 expected-base CAS、--match-head-commit 只守 head 不守 base，要求披露残余竞态——属自我约束而非能力吹嘘。"
      },
      {
        "item": "命令/参数真实性（未联网，仅内部一致性 + 文档级核对）",
        "status": "ok",
        "detail": "gh pr checks 退出码 8 = checks pending、gh pr merge --match-head-commit、gh pr review 无 commit_id 故改用 gh api POST pulls/<n>/reviews、PUT pulls/<n>/update-branch 需 expected_head_sha、repos/<repo>/rules/branches/<branch> 的 merge_queue.parameters.merge_method、git merge-tree --write-tree 的退出码语义、git merge --no-ff -s ours 让新旧两个头都成为祖先从而可非快进 push——这些用法彼此自洽且与 README Requirements 一致。明确标注：本节为文档级一致性核对，未运行任何命令（遵守「只读源码、不跑 build/测试」的纪律）。"
      },
      {
        "item": "评测覆盖度：evals 是否覆盖声明的主路径",
        "status": "discrepancy",
        "detail": "evals/evals.json 只有 1 条用例（personal-context-current-base-ownership，5 条 expectations），覆盖 personal 模式下的 BASE 归属判定与 land-then-fix 六道门、零 GitHub 变更。而最复杂的三条路径没有评测用例：队列模式（--all-open 的 epoch 失效、每 PR 独立账本、汇总表）、污染分支投影与 ours 桥修复 + 强制 squash、具名 closed-unmerged PR 的 merit 复核。属覆盖不均（非缺陷、非夸大），后果是这些路径的行为回归只有人工评审兜底。被覆盖的那条用例本身把契约写得很具体：'expected_output' 要求「A read-only personal-maintainer decision that attributes the pre-existing bookkeeping issue to BASE and permits land-then-fix only after every safety gate is checked.」，expectations 含 'Explicitly applies references/personal_maintainer_context.md' 与 'Performs no GitHub mutation'。"
      },
      {
        "item": "只读默认是否被 references 悄悄放宽（隐藏写授权）",
        "status": "ok",
        "detail": "未发现隐性授权通道。remediation 首行即 'Load this reference only after the user explicitly authorizes an external write.'，SKILL.md:483 也把它的加载条件写成显式授权；personal 政策第 9/12 节反复声明 'A decision never authorizes a GitHub mutation by itself.' 与 'Treat \"can we merge and fix it ourselves?\" as a request for a decision, not permission to mutate GitHub.'；修复路径还要求非快进拒绝即停、禁 force-push、禁止 hook/签名绕过。"
      },
      {
        "item": "task 重点：references/personal_maintainer_context.md 里到底是什么（作者本人的维护偏好？）",
        "status": "ok",
        "detail": "是「请求方维护者本人的政策档案（opt-in overlay）」，不是 skill 内置的通用价值判断。第 1 节明写只对提出该政策 profile 的维护者或显式 opt-in 的用户生效；第 3 节明写不得发布该 profile 摘要、不得把私人上下文复制进公开 review、不得外推到其他 owner（'Do not publish the distilled profile, copy private context into a public review, or generalize it to another owner.'）。内容确实是仓库作者自己的维护取向：curated marketplace 而非 directory、要求「真本事」（专用知识/可执行工具/复杂诊断工作流）而非通用常识的漂亮包装、外部贡献者目标只作排序 tie-breaker、Claude for Open Source 只用于排序且阈值必须 live 核验不得写死、land-then-fix 五道门、每 PR 一次确认（'never merge directly from a queue result or a general statement of intent.'）。即：作者把自己的维护偏好写成默认不生效的 overlay，并给了「不得滥用/不得外推」的护栏。"
      },
      {
        "item": "task 重点：landing/remediation 的写操作授权门禁是否真实存在",
        "status": "ok",
        "detail": "存在且是动作粒度。remediation:27-31 的授权表把 Post a normal PR/issue comment、提交 APPROVE/REQUEST_CHANGES/COMMENT、Update the PR branch from base、Push repair commits、Close the PR、Merge the PR、Enable auto-merge、Use an admin bypass、Delete a branch 分成 9 个独立授权项（auto-merge 明示 'merge authorization alone is insufficient'）。配套门禁：写前重校验（PR 仍 open、live head == reviewed head、live base == 最近三路分析基线、授权人有权限、无未决 P0/P1）、写后读回并立即重查 head（changed → posted review 判 stale 并阻塞落地）、merge 的 --match-head-commit 守卫、personal 模式每 PR 一次确认且换 head/base 即失效、落地后置校验（state=MERGED、landing SHA 可达、LANDING_SHA^{tree} 与预演 merge-tree 树相等、作者映射一致、分支是否被删）。"
      },
      {
        "item": "task 重点：安全面（gh/git 子命令、凭证、端点、注入面）是否遗漏",
        "status": "ok",
        "detail": "gh/git/jq 子命令已全量清点（见第 2/3/4 条），凭证与端点见第 5/6 条。注入面按「不可信 PR 文本 → 模型上下文 → verdict → 授权后写操作」链路记录，并补两条易漏点：① personal 模式会把历史闭 PR 的评论文本当「维护者先例」学习（历史评论同样不可信）；② 正文允许引用外部来源，但限定其只能建立领域事实/评审标准，'even a genuine quotation does not prove that the target satisfies or violates them'，不得用引文替代目标代码证据——这显著降低了注入文本被当作「证据」使用的收益。"
      }
    ],
    "level": 1,
    "level_label": "V1 已固定",
    "commit": "d5c4678cb5d4fd6acc9c922690df035dbd33d247",
    "sha256": "c02b555dc1c086158aa908d2912e0adaf1671802a307e89835778120da4f1276",
    "reviewed_by": null,
    "reviewed_at": null
  },
  "assessed_at": "2026-10-25",
  "method_version": "2.0",
  "mirror": {
    "archive": "https://skillpub.pages.dev/r2/v/2026-09-15/github-review-pr.tar.gz",
    "sha256": "c02b555dc1c086158aa908d2912e0adaf1671802a307e89835778120da4f1276",
    "commit": "d5c4678cb5d4fd6acc9c922690df035dbd33d247"
  },
  "original": {
    "github": "https://github.com/daymade/claude-code-skills/tree/main/github-review-pr",
    "path": "github-review-pr",
    "commit": "d5c4678cb5d4fd6acc9c922690df035dbd33d247"
  }
}