跳到正文
Skillpedia
通用编程81k · #1637

diff-analyze

它能做什么

这项技能审查一组代码改动,为风险打分,并标明改动的类型。适合准备拉取请求或较大改动、希望快速进行风险检查的开发者。

适用场景

  • ✓当你准备拉取请求,想了解其风险时。
  • ✓当某项改动涉及多个模块,你希望有第二种视角时。
  • ✓当你需要关于应邀请哪些审核者的建议时。

技能链接

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-jujutsu/skills/diff-analyze/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请分析我当前改动的风险,并建议应由谁来审核。”

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

工作原理

这项技能根据你选择的基准读取 git 差异,为风险打分,对改动分类,并根据文件路径推断审核角色。它还会为每个文件给出行数和风险。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Diff Analysis

Analyze git diffs for risk, complexity, and reviewer assignment.

When to use

Before submitting a PR or after making significant changes, analyze the diff to understand risk level, get reviewer recommendations, and classify the type of change.

Steps

  1. Pick the ref — HEAD for uncommitted work, main..BRANCH for a branch (--branch), or the PR's base..head range (--pr, resolve it with gh pr view N --json baseRefName,headRefName). The analyze_* tools take a ref and run git themselves; they do not accept diff text.
  2. Analyze diff — call mcp__plugin_ruflo-core_ruflo__analyze_diff with { ref, includeFileRisks: true } for a comprehensive analysis
  3. Risk score — call mcp__plugin_ruflo-core_ruflo__analyze_diff-risk with { ref } for a quantified risk assessment
  4. Classify changes — call mcp__plugin_ruflo-core_ruflo__analyze_diff-classify with { ref } to categorize (feature, bugfix, refactor, etc.)
  5. Get reviewer roles — call mcp__plugin_ruflo-core_ruflo__analyze_diff-reviewers with { ref, limit } for roles inferred from paths and risk; check CODEOWNERS separately when assigning people
  6. Diff stats — call mcp__plugin_ruflo-core_ruflo__analyze_diff-stats with { ref } for line counts, file counts, complexity metrics
  7. File-level risk — call mcp__plugin_ruflo-core_ruflo__analyze_file-risk with { path } (required) for each file the earlier steps flagged

Risk factors

  • Files with high churn history
  • Security-sensitive paths (auth, crypto, permissions)
  • Large diffs (>500 lines)
  • Cross-module changes
  • Database migration files
常见问题

基准应该选什么?

未提交的工作使用 HEAD;比较分支与 main 时,或使用拉取请求的基础和目标范围。

它会指名具体的人吗?

它根据文件路径和风险建议角色。具体的人员请查看 CODEOWNERS 文件。

它会修改我的代码吗?

不会。它只分析改动并报告结果。

详情

作者的原始描述

Analyze git diffs for risk scoring, reviewer recommendations, and change classification. Use when preparing a PR, reviewing a large or cross-module change, or before merging to assess risk and pick reviewers.

repo: ruvnet/ruflo

热度

GitHub 星标
81k
排名
#1637
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能