← 返回
未分类

reviewing-final-state-diff

Use when the user asks to review a commit range, feature branch, PR branch, or `<start_commit>..HEAD` as the final code state instead of reviewing individual commits.
Use when the user asks to review a commit range, feature branch, PR branch, or `<start_commit>..HEAD` as the final code state instead of reviewing individual commits.
user_e3479a50
未分类 community v1.0.0 1 版本 98571.4 Key: 无需
★ 0
Stars
📥 69
下载
💾 0
安装
1
版本
#latest

概述

Reviewing Final State Diff

Overview

Review the code as it would land after the full range is applied. Ignore transient problems that existed only in earlier commits and were fixed by later commits in the same range.

Workflow

If the user asks how to invoke this skill, see references/examples.md for prompt examples.

  1. Confirm the review range.
    • Use the exact range when the user provides one, such as ..HEAD.
    • If only a branch is provided, determine a merge base against the likely target branch; ask only when the target branch is ambiguous.
    • Note whether the working tree has uncommitted changes, because they are outside a pure commit-range review unless the user includes them.
  1. Build the final-state picture before judging.
    • Run git diff --stat and git diff --name-only .
    • Inspect relevant final files at HEAD, not only the patch hunks.
    • Follow call sites, tests, config, migrations, and public contracts touched by the diff.
  1. Review for final behavior.
    • Prioritize bugs, regressions, data loss, security issues, compatibility breaks, concurrency risks, resource leaks, and missing high-value tests.
    • Do not flag commit sequencing, temporary breakages, or intermediate implementation choices unless they still affect the final tree.
    • Do not edit code during review unless the user explicitly asks to fix findings.
  1. Verify when practical.
    • Run focused tests, compilation, or static checks that correspond to the changed surface.
    • If verification is blocked or too expensive, state exactly what was not run and why.

Output Format

Lead with findings, ordered by severity.

For each finding include:

  • Severity such as P0, P1, P2, or P3.
  • Final-file path and line reference.
  • The observable risk in the final code state.
  • A concrete fix direction.

If no blocking findings are found, say that clearly and include any verification limits or residual risks. Keep summaries secondary to findings.

Command Hints

git status --short
git diff --stat <start_commit>..HEAD
git diff --name-only <start_commit>..HEAD
git diff <start_commit>..HEAD -- <path>
git diff --check <start_commit>..HEAD

For branch-based reviews:

git merge-base HEAD origin/main
git diff --stat $(git merge-base HEAD origin/main)..HEAD

Common Mistakes

  • Reviewing each commit separately when the user asked for final state.
  • Reporting issues that were fixed later inside the same range.
  • Citing only diff context when the final file or caller context changes the behavior.
  • Saying the range is clean without running or clearly scoping verification.

版本历史

共 1 个版本

  • v1.0.0 Initial release 当前
    2026-05-06 14:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,215 📥 266,514
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,801
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,132