← 返回 Skill 列表
extension
分类: 开发与工程API Key 暂未确认

diffx

操作diffx Git-diff CLI,用于工作树差异、本地/远程引用范围、GitHub PR差异、GitLab MR差异、提交/比较URL差异以及与git-diff兼容的直通。当代理必须决定要比较什么时使用,将意图映射到`diffx`输入语法,选择输出模式(`diff`/`patch`/`stat`等),应用包含/排除过滤器,或解决常见的标志/分页器冲突。

person作者: jakexiaohubgithub

Use Diffx CLI

Use this skill to translate a diffing request into the right diffx command.

Decision Flow

  1. Classify the target.
  • Current repo changes only -> load references/worktree.md.
  • Two refs/branches/tags/SHAs -> load references/local-and-remote-ranges.md.
  • GitHub PR/commit/compare URL or github:owner/repo#123 -> load references/github-and-gitlab.md.
  • GitLab MR (gitlab:owner/repo!123) -> load references/github-and-gitlab.md.
  1. Choose output shape.
  • Full code review output -> diff (default).
  • Apply-ready output -> --mode patch.
  • Summary output -> --stat, --numstat, --shortstat, --name-only, --name-status, or --summary.
  • Custom table output -> --overview only.
  1. Apply optional narrowing.
  • File globs -> load references/filters-and-pass-through.md.
  • Native git diff flags/pathspec -> load references/filters-and-pass-through.md.
  1. Handle failures/conflicts.
  • Unexpected empty output, invalid input, or flag conflicts -> load references/troubleshooting.md.

Defaults

  • For generic "what changed?": diffx --no-pager
  • For compact review: diffx <range-or-target> --stat --no-pager
  • For patch handoff: diffx <range-or-target> --mode patch --no-pager

Reference Map

  • references/worktree.md: current working tree and --index behavior.
  • references/local-and-remote-ranges.md: branch/tag/SHA and remote shorthand ranges.
  • references/github-and-gitlab.md: PR/MR/commit/compare forms.
  • references/filters-and-pass-through.md: include/exclude, git flags, pathspec.
  • references/troubleshooting.md: invalid combos, exit codes, quick fixes.