Token导航 LogoToken导航

Agent Skill · 研究检索

diffity-review(差异审查)

diffity-review 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

diffity-review 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 12,382。

总安装 10,331周安装 422GitHub Stars 571下载 3,308核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:diffity-review(差异审查)
来源仓库:https://github.com/kamranahmedse/diffity
仓库路径:skills/diffity-review
安装命令:
npx skills add https://github.com/kamranahmedse/diffity --skill diffity-review
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/kamranahmedse/diffity --skill diffity-review

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

diffity-review 可对指定 Git 引用进行自动化代码审查,生成内联评论与改进建议。适用于安全、性能、命名规范等多维度代码质量检查,集成于主流 AI 编程助手平台。支持聚焦特定关注点(如 security、performance),也可全面扫描所有潜在问题。

依赖本地 diffity 工具链运行,需预先安装并保证对仓库路径有完整读写权限。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/diffity-review

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/kamranahmedse/diffity --skill diffity-review;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

diffity-review 怎么安装?

在终端执行 npx skills add https://github.com/kamranahmedse/diffity --skill diffity-review。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

diffity-review 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

diffity-review 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

diffity-review 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

diffity-review 用的人多吗?

公开数据是累计安装 10,331 次,近一周安装 422 次,下载 3,308 次,GitHub 571 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

diffity-review 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
diffity-review

差异审查 · 本页

10,331571操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Diffity Review Skill

You are reviewing a diff and leaving inline comments using the diffity agent CLI.

Arguments

  • ref (optional): Git ref to review (e.g. main..feature, HEAD~3). Defaults to working tree changes. When both ref and focus are provided, use both (e.g. /diffity-review main..feature security).
  • focus (optional): Focus the review on a specific area. One of: security, performance, naming, errors, types, logic. If omitted, review everything.

CLI Reference

diffity agent diff
diffity agent list [--status open|resolved|dismissed] [--json]
diffity agent comment --file <path> --line <n> [--end-line <n>] [--side new|old] --body "<text>"
diffity agent general-comment --body "<text>"
diffity agent resolve <id> [--summary "<text>"]
diffity agent dismiss <id> [--reason "<text>"]
diffity agent reply <id> --body "<text>"
  • --file, --line, --body are required for comment
  • --end-line defaults to --line (single-line comment)
  • --side defaults to new
  • general-comment creates a diff-level comment not tied to any file or line
  • <id> accepts full UUID or 8-char prefix

Prerequisites

  1. Check that diffity is available: run which diffity. If not found, install it with npm install -g diffity.

Instructions

Step 1: Ensure diffity is running for the correct ref (without opening browser)

The review needs a running session whose ref matches the requested ref. A ref mismatch causes "file not in current diff" errors when adding comments.

  1. Run diffity list --json to get all running instances. Parse the JSON output and find the entry whose repoRoot matches the current repo.
  2. If a matching entry exists, compare its ref field against the requested ref:

- The registry stores "work" for working-tree sessions and the user-provided ref string (e.g. "main", "HEAD~3") for named refs. - If refs match → reuse the session, note the port, and continue to Step 2. - If refs don't match → restart: run diffity <ref> --no-open --new (or diffity --no-open --new if no ref). The --new flag kills the old session and starts a fresh one. Use Bash tool with run_in_background: true. Wait 2 seconds, then verify with diffity list --json and note the port. - If no ref was requested and the running session's ref is not "work" → restart with diffity --no-open --new (the running session is for a named ref, but we need working-tree).

  1. If no session is running for this repo, start one in the background:

- Command: diffity <ref> --no-open (or diffity --no-open if no ref) - Use Bash tool with run_in_background: true - Wait 2 seconds, then verify with diffity list --json and note the port.

Step 2: Review the diff

  1. Get the unified diff directly from diffity — this handles merge-base resolution, untracked files, and all ref types automatically: diffity agent diff This outputs the full unified diff for the current session. Line numbers are in the @@ hunk headers.
  2. Find and read all relevant CLAUDE.md files — the root CLAUDE.md and any CLAUDE.md files in directories containing modified files. These define project-specific rules that the diff must follow.
Assess the change size and adapt your strategy
  1. Gauge the diff size and plan your approach. Every file gets a thorough review regardless of diff size — the difference is how you organize the work: No matter the size, read and review every changed file. Do not skip or spot-check files.

- Small (under ~100 changed lines, 1-3 files): Straightforward — review each file in order. - Medium (100-500 changed lines, 3-10 files): Group files by area (e.g. backend, frontend, tests, config). Review core logic files first so you understand intent before reviewing the ripple effects. - Large (500+ changed lines or 10+ files): Group files by area. Start with core logic, then review every remaining file. For mechanically repetitive changes (e.g. the same rename applied to 20 files), verify the pattern is correct on the first few instances, then check every remaining instance for deviations from the pattern — don't skip any, but you can check them faster once the pattern is established.

Understand the change before reviewing it
  1. Summarize the change first. Before looking for problems, build a mental model of the diff: Understanding intent helps you distinguish intentional behavior from real bugs.

- What is this change trying to accomplish? (new feature, bug fix, refactor, config change) - Which files are structural changes vs. the core logic change? - What is the author's intent? Read commit messages (git log --oneline <args>) and any linked issues or PR descriptions for context. - What are the key decisions the author made, and what constraints were they working within?

  1. For each changed file (adjusted by size strategy above), read the entire file (not just the diff hunks) to understand the full context.
  2. Cross-reference callers and dependents. For any changed function signature, renamed export, modified return type, or altered behavior: grep for usages across the codebase. A function that looks correct in isolation can break every caller. Check:

- Who calls this function? Will they handle the new return value / error / null case? - Who imports this module? Will the changed export name resolve? - Does this type change propagate correctly to consumers?

  1. Analyze the code changes using the techniques below. If a focus argument was provided, concentrate on that area. Otherwise, apply all analysis passes and the signal threshold.
How to analyze

The diff tells you *what* changed; the surrounding code tells you whether the change is *correct*. Apply these analysis passes:

Data flow analysis — Trace values through the changed code. Where does each variable come from? Where does it go? Check:

  • Can a value be null/undefined where the changed code assumes it isn't?
  • Does the changed code handle all branches of an upstream conditional?
  • If a function's return type changed, do all callers handle the new shape?
  • Are there narrowing checks (e.g. if (x)) that the diff accidentally moved outside of?

State and lifecycle analysis — For stateful code (React state, database transactions, streams, event listeners):

  • Does the change create a state that can't be reached or can't be exited?
  • Are resources (listeners, subscriptions, file handles) still cleaned up on all paths?
  • Can concurrent access corrupt shared state?
  • Does the ordering of operations still satisfy invariants (e.g. init before use)?

Contract analysis — Check the changed code against the contracts it must satisfy:

  • Does the function still satisfy what its callers expect? (Read the callers, don't guess.)
  • If it implements an interface or overrides a base method, does it still conform?
  • Are pre-conditions and post-conditions preserved?
  • For API endpoints: does the response shape match what clients send/expect?

Boundary analysis — For code at system boundaries (user input, network, file I/O, IPC):

  • Is user-controlled input validated before use?
  • Can malformed external data crash the process or corrupt state?
  • Are there injection vectors (SQL, shell, XSS, path traversal)?

Edge case analysis — Only for cases that *will* happen in practice, not theoretical ones:

  • Empty arrays/strings, zero, negative numbers — does the code handle them?
  • Off-by-one in loops, slices, or index arithmetic
  • Integer overflow, division by zero where the divisor comes from input
Completeness check

After analyzing the code for correctness, check whether the change is complete — not just correct, but finished:

Test coverage:

  • If the diff adds new behavior (a new function, endpoint, UI flow, branch), are there tests covering it? If not, flag it as a [suggestion].
  • If the diff fixes a bug, is there a test that would have caught the bug? Regression tests prevent re-introduction.
  • If the diff modifies existing behavior, are existing tests updated to match? Stale tests that still pass are worse than no tests — they give false confidence.
  • If the diff includes tests, review them for quality:

- Do they test the right thing? (behavior, not implementation details) - Do they cover edge cases the code handles? (empty input, error paths, boundary values) - Are they isolated? (no hidden dependencies on test ordering or global state) - Could they pass even if the code were broken? (tautological assertions, mocked-away logic)

Missing pieces:

  • Schema change without a migration?
  • New environment variable without documentation or defaults?
  • New dependency without lockfile update?
  • Changed API response without client-side update?
  • New error type without handling at the call site?
  • Removed feature without cleanup of related code (dead imports, unused config, orphaned tests)?

Only flag missing pieces that are clearly needed for this change to work correctly. Don't flag aspirational improvements.

What to flag

Flag real problems that would affect correctness, security, or reliability:

  • Code that will fail to compile, parse, or run (syntax errors, type errors, missing imports, unresolved references)
  • Logic errors that will produce wrong results (clear bugs, off-by-one errors, broken conditions)
  • Security vulnerabilities in changed code (injection, XSS, auth bypass, data exposure)
  • Race conditions or data loss risks you can demonstrate with a concrete scenario
  • CLAUDE.md violations where you can quote the exact rule being broken
  • Broken contracts — a changed function that no longer satisfies what its callers expect
  • Missing tests for new or changed behavior (as [suggestion], not [must-fix], unless the project's CLAUDE.md requires tests)
  • Incomplete changes — migrations, config, client-side updates that are clearly needed for this change to work

Skip style concerns, linter-catchable issues, and pre-existing problems in unchanged code. Focus on the diff, not the whole file.

Validate before commenting

For each finding, verify it's real before posting:

  • Re-read the surrounding code — many apparent bugs disappear in full context
  • For "missing import" or "undefined variable" claims, grep to confirm
  • For broken callers, read the actual call sites
  • For CLAUDE.md violations, confirm the rule is scoped to this file
  • For missing tests, check that there isn't already a test in a different file that covers this path

If a repeated pattern appears across files, comment on the first occurrence and mention the pattern in the general summary instead of duplicating comments.

Step 3: Leave comments

  1. Order comments by severity. Post all [must-fix] comments first, then [suggestion], then [question]. Within each severity, follow file order. This ensures the most important issues are seen first if the author skims.
  2. Categorize each finding with a severity prefix in the comment body:

- [must-fix] — Bugs, security issues, data loss risks. Code that will break or produce wrong results. - [suggestion] — Concrete improvements with a clear reason. Not style preferences — real improvements. This includes missing tests, incomplete changes, and better approaches. - [question] — Something unclear that needs clarification from the author.

  1. For each finding, leave an inline comment using: diffity agent comment --file <path> --line <n> [--end-line <n>] [--side new] --body "<comment>"

- Use --side new (default) for comments on added/modified code - Use --side old for comments on removed code - Use --end-line when the issue spans multiple lines - Lead with the problem, not background. Be specific and actionable. - For small, self-contained fixes, include a code suggestion showing the fix - For larger fixes (structural changes, multi-location), describe the issue and suggested approach without a full code block - If flagging a CLAUDE.md violation, quote the exact rule being broken

  1. After leaving all inline comments, decide whether a general comment is needed: diffity agent general-comment --body "<overall review summary>"

- No findings → leave a general comment: "No issues found. Checked for bugs and CLAUDE.md compliance." - 1-2 findings → skip the general comment unless there's a cross-cutting concern the inline comments don't cover. - 3+ findings → leave a general comment summarizing the themes. - Large diffs → always leave a general comment noting the scope of the review and grouping findings by area. - Do not use severity prefixes in the general comment — prefixes are only for inline findings. - Lead with the verdict, be direct and concise — no compliments, no filler, no narrating what the code does.

Step 4: Open the browser

  1. Open the browser now that comments are ready: diffity open <ref> Pass the ref argument if one was provided (e.g. diffity open HEAD~3). Omit it to open the default view.
  2. Tell the user the review is ready and they can check the browser. Example: Review complete — check your browser. Found: 2 must-fix, 1 suggestion When you're ready, run /diffity-resolve to fix them.

平台分布

Codex

37.62%
按下载量换算1,244

Claude

33.31%
按下载量换算1,102

Cursor

17.23%
按下载量换算570

Gemini CLI

9.37%
按下载量换算310

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills