pr-checklist
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePR Checklist
PR 检查清单
Independently analyze changes and generate a report. Do not post or edit code unless explicitly requested.
独立分析变更并生成报告。除非明确要求,否则请勿发布或编辑代码。
Scope
范围
Default: current branch's GitHub PR. Explicit targets take precedence:
pr <number-or-url>branch <branch> [base <base>]- or
range <base>..<head>range <base>...<head> - ,
commit <sha>, orstagedworking-tree - (no review target)
self-check
Paths or natural-language focus/exclusions restrict the target.
PR uses GitHub's diff; branch uses (infer default base or ask); explicit ranges preserve supplied semantics; commit compares its parent; staged means index only; working-tree means its diff only. Without an explicit target or current PR, ask. Ignore untracked files in the review diff unless included or overlapping a staged file; mention overlaps. Configuration resolution is exempt.
base...branchUse GitHub only for PR identity, base/head, paths, and diff — not body, comments, reviews, checks, coverage, issues, or other metadata.
默认:当前分支的GitHub PR。明确指定的目标优先级更高:
pr <编号或URL>branch <分支名> [base <基准分支>]- 或
range <基准>..<头部>range <基准>...<头部> - 、
commit <哈希值>或stagedworking-tree - (无审核目标)
self-check
可通过路径或自然语言指定的重点/排除项来限制目标范围。
PR 使用GitHub的差异对比;branch 使用 (自动推断默认基准分支或询问用户);明确指定的范围保留其语义;commit 与其父提交对比;staged 仅指索引内容;working-tree 仅指其差异。若无明确目标或当前PR,需询问用户。除非被包含或与已暂存文件重叠,否则忽略审核差异中的未跟踪文件;若存在重叠需提及。配置解析不受此限制。
base...branch仅使用GitHub获取PR标识、基准/头部分支、路径和差异信息——不使用PR正文、评论、审核记录、检查结果、覆盖率数据、问题或其他元数据。
Self-check
自我检查
For , read and follow references/self-check.md, then stop. Do not enter the normal review workflow.
self-check对于 ,请阅读并遵循 references/self-check.md,然后停止操作。请勿进入常规审核流程。
self-checkConfiguration
配置
For normal reviews, before loading the diff, read and follow references/configuration.md. Resolve from the target state and validate it with . A missing file uses the defaults; an invalid file fails.
.pr-checklist.ymlscripts/parse-config.tsIf configuration enables no analysis, print and stop successfully.
PR checklist: nothing enabled to analyze.对于常规审核,在加载差异前,请阅读并遵循 references/configuration.md。从目标状态中读取 并使用 验证其有效性。若文件缺失则使用默认配置;若文件无效则审核失败。
.pr-checklist.ymlscripts/parse-config.ts若配置未启用任何分析项,请打印 并成功终止。
PR checklist: nothing enabled to analyze.Workflow
工作流程
- Resolve target identity; use field-limited .
gh pr view - Load, normalize, and validate configuration from the resolved target. Exit early when nothing is enabled.
- Inspect the resolved diff, applicable instructions, and context at its head. Prefer ; use a temporary worktree for broad work, never an unrelated dirty checkout.
git show <head>:<path> - For staged scope, use or
git show :<path>; exclude unstaged content. Working-tree scope uses the checkout.git checkout-index - Run useful local checks; independently derive and deduplicate findings.
- Run only enabled analysis passes. For configured checks, pass the normalized items and verify that the result preserves their IDs, titles, and order.
- Merge the exact normalized , enabled outputs, and
plan. Set disabledsourceandantiSlopsections tochanges; set disabled or emptynulltochecks. Validate against[], which enforces section enablement and configured check identity, title, and order.prChecklistSchema - In this skill directory, render to a unique temporary path:
bash
TMP_ROOT="${TMPDIR:-/tmp}"
REPORT_DIR=$(mktemp -d "${TMP_ROOT%/}/pr-checklist.XXXXXX")
REPORT="$REPORT_DIR/pr-checklist.md"
if ! printf '%s' "$PR_CHECKLIST_JSON" | npx --yes deno@2.5.4 run \
--allow-net=zenquotes.io \
scripts/render.ts \
> "$REPORT"
then
rm -f "$REPORT"
rmdir "$REPORT_DIR" 2>/dev/null || true
exit 1
fi
printf '<pr_checklist>%s</pr_checklist>\n' "$REPORT"JSON enters stdin; Markdown exits stdout. Report the path; change destination only when requested.
- 确定目标标识;使用字段受限的 命令。
gh pr view - 从已确定的目标中加载、标准化并验证配置。若未启用任何项则提前退出。
- 检查已解析的差异、适用的说明及其头部的上下文。优先使用 ;如需处理大量内容,使用临时工作树,切勿使用无关的脏检出。
git show <head>:<path> - 对于staged范围,使用 或
git show :<path>;排除未暂存内容。Working-tree范围使用当前检出内容。git checkout-index - 运行有用的本地检查;独立推导并去重发现的问题。
- 仅运行已启用的分析流程。对于配置的检查项,传入标准化后的条目并验证结果保留其ID、标题和顺序。
- 合并标准化后的 、已启用的输出和
plan。将禁用的source和antiSlop部分设为changes;将禁用或为空的null设为checks。根据[]进行验证,该模式强制要求部分启用状态以及配置检查项的标识、标题和顺序。prChecklistSchema - 在当前技能目录中,渲染到唯一的临时路径:
bash
TMP_ROOT="${TMPDIR:-/tmp}"
REPORT_DIR=$(mktemp -d "${TMP_ROOT%/}/pr-checklist.XXXXXX")
REPORT="$REPORT_DIR/pr-checklist.md"
if ! printf '%s' "$PR_CHECKLIST_JSON" | npx --yes deno@2.5.4 run \
--allow-net=zenquotes.io \
scripts/render.ts \
> "$REPORT"
then
rm -f "$REPORT"
rmdir "$REPORT_DIR" 2>/dev/null || true
exit 1
fi
printf '<pr_checklist>%s</pr_checklist>\n' "$REPORT"JSON从标准输入传入;Markdown从标准输出输出。报告路径;仅在被要求时更改目标位置。
Analysis
分析
Anti-slop
Anti-slop(冗余代码检查)
When enabled, read and follow references/anti-slop-review.md. When subagents or task delegation are available, use that prompt as an independent delegated pass. Verify its result and score.
Use engineering judgment when verifying the score against the findings.
启用时,请阅读并遵循 references/anti-slop-review.md。若有子代理或任务委托可用,将该提示作为独立的委托流程使用。验证其结果和评分。
验证评分与发现问题时需运用工程判断。
Configured checks
配置检查项
When enabled with non-empty items, read and follow references/configured-checks-review.md. When subagents or task delegation are available, use that prompt as an independent delegated pass. Verify every configured item is represented exactly once.
启用且条目非空时,请阅读并遵循 references/configured-checks-review.md。若有子代理或任务委托可用,将该提示作为独立的委托流程使用。验证每个配置条目都被精确呈现一次。
Changes
变更分析
When enabled, read and follow references/changes-review.md. When subagents or task delegation are available, use that prompt as an independent delegated pass. Verify its results.
启用时,请阅读并遵循 references/changes-review.md。若有子代理或任务委托可用,将该提示作为独立的委托流程使用。验证其结果。