跳到正文
Skillpedia
通用编程48k · #3613

gitnexus-review

它能做什么

这个技能指导你的智能体审查代码改动,并判断它们是否可以安全合并。适合希望在合并前对拉取请求或本地改动再做一次检查的开发者。

适用场景

  • ✓当你希望审查拉取请求中的缺陷和合并风险的时候。
  • ✓当你想在提交前检查本地、暂存或未提交的改动的时候。
  • ✓当你想知道某项改动可能缺少哪些测试的时候。

技能链接

https://github.com/abhigyanpatwari/GitNexus/blob/main/.claude/skills/gitnexus-review/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/abhigyanpatwari/GitNexus/blob/main/.claude/skills/gitnexus-review/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请审查第 42 号拉取请求中的缺陷,并告诉我它是否可以安全合并。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会阅读改动,利用代码索引查看受影响的范围,并检查源码以确认每项发现。它会给出结论,并附上支持的证据。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

GitNexus review

Review the requested change surface without editing source, committing, pushing, posting, or resolving threads. A later explicit request may authorize those actions. Use GitNexus for structural evidence and source inspection for proof; neither substitutes for the other.

Resolve the target

Accept these forms:

Input Review surface
PR URL, owner/repo#42, #42, or bare number GitHub PR
base...head Merge-base range
base..head Exact two-dot range
Branch, tag, or commit Ref against the repository default branch
local, staged, unstaged, or working-tree wording Local changes
No target Current branch's open PR; otherwise local changes; otherwise current branch

An explicit target always wins. Interpret a bare number as a PR only in a GitHub repository with working gh authentication; otherwise ask for a ref or URL. If implicit mode finds both branch commits and local changes, review them as two labeled surfaces rather than silently dropping or blending either one.

Record the resolved target kind, repository root, default branch, base SHA, head SHA, merge-base when applicable, and included local states. Resolve the default branch from remote metadata (refs/remotes/<remote>/HEAD or GitHub repository metadata); use main or master only as an explicit fallback and say when doing so.

PR

Use gh pr view/gh api to pin the PR number, repository, title, URL, base ref, base SHA, head ref, and head SHA. Fetch those exact commits without switching the user's branch. Compute git merge-base <base> <head> and use that SHA as the review base: GitHub PR diffs are merge-base diffs, while detect_changes(scope: "compare") is a two-dot comparison.

Use the local git diff <merge-base> <head> as the complete diff source of truth; use GitHub metadata for PR facts and review state. For fork PRs, fetch the pull ref or the contributor remote instead of assuming the head branch exists on origin.

Branch, ref, or range

Resolve every ref to a commit before reviewing. For a branch or A...B, use the merge-base as the comparison base. For an explicit A..B, honor A as the exact base. Do not compare a feature branch directly with a moving default branch tip when merge-base semantics were intended.

Local changes

Inspect git status --short, the staged diff, the unstaged diff, and every untracked file. Use detect_changes with staged, unstaged, or all as requested. Untracked files are not guaranteed to appear in Git diff or graph mapping, so read them directly and list them in the review provenance.

Align the checkout and index

The graph and diff must describe the same head. Reuse an existing worktree only when it is at the exact target SHA. Otherwise create a temporary detached worktree for the PR/ref head, review there, and remove only that temporary worktree afterward. Never switch or reset the user's current worktree.

Check GitNexus status in the target worktree. If stale, run node .gitnexus/run.cjs analyze --index-only before trusting graph results (temporary worktrees never carry the gitignored run.cjs — fall back to the installed gitnexus CLI, then npx gitnexus), and include --pdg in that same refresh when the diff plausibly touches trust or data-flow boundaries, so the taint pass below doesn't pay a second full analyze. Taint and dependence evidence needs that PDG layer: when the workflow's taint pass finds it missing, rebuild with analyze --pdg --index-only and record the rebuild in provenance. For local changes, refresh the index so new or modified source is represented. If an exact target checkout/index cannot be established, state the limitation and do not claim a complete graph-backed review.

Review workflow

  1. Read the fu
常见问题

它会在拉取请求上发表评论吗?

不会。默认情况下,该技能只做审查,不会发布、提交或解决讨论线程。

它能审查哪些类型的改动?

它接受 GitHub 拉取请求、分支或提交范围,以及本地暂存或未暂存的改动。

它只依赖索引吗?

不是。它用索引了解结构,并用源文件确认事实。

详情

作者的原始描述

Review code changes with GitNexus from a GitHub PR URL or number, a branch/ref or commit range, or local staged, unstaged, and untracked changes. Use when the user asks for a code review, merge-risk assessment, regression hunt, missing-test analysis, or a verdict on whether a PR, branch, commit range, or local diff is safe.

repo: abhigyanpatwari/GitNexus

热度

GitHub 星标
48k
排名
#3613
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能