diffity-diff

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Diffity Diff Skill

Diffity Diff Skill

You are opening the diffity diff viewer so the user can see their changes in the browser.
您正在打开diffity差异查看器,以便用户可以在浏览器中查看他们的更改。

Arguments

参数

  • ref
    (optional): Git ref to diff (e.g.
    main..feature
    ,
    HEAD~3
    ) or a GitHub PR URL (e.g.
    https://github.com/owner/repo/pull/123
    ). Defaults to working tree changes.
  • ref
    (可选):用于对比的Git引用(例如
    main..feature
    HEAD~3
    )或GitHub PR链接(例如
    https://github.com/owner/repo/pull/123
    )。默认值为工作区的更改。

Instructions

操作步骤

  1. Check that
    diffity
    is available: run
    which diffity
    . If not found, install it with
    npm install -g diffity
    .
  2. Run
    diffity <ref>
    (or just
    diffity
    if no ref) using the Bash tool with
    run_in_background: true
    :
    • The CLI handles everything: if an instance is already running for this repo it reuses it and opens the browser, otherwise it starts a new server and opens the browser.
    • Do NOT use
      &
      or
      --quiet
      — let the Bash tool handle backgrounding.
  3. Wait 2 seconds, then run
    diffity list --json
    to get the port.
  4. Tell the user diffity is running. Print the URL and keep it short — don't show session IDs, hashes, or other internals. Example:
    Diffity is running at http://localhost:5391
    When you're ready:
    • Leave comments on the diff in your browser, then run /diffity-resolve to fix them
    • Or run /diffity-review to get an AI code review
  1. 检查
    diffity
    是否可用:运行
    which diffity
    。如果未找到,请使用
    npm install -g diffity
    进行安装。
  2. 使用Bash工具并设置
    run_in_background: true
    ,运行
    diffity <ref>
    (如果没有ref则直接运行
    diffity
    ):
    • CLI会处理所有事项:如果此仓库已有运行中的实例,它会复用该实例并打开浏览器;否则会启动新服务器并打开浏览器。
    • 请勿使用
      &
      --quiet
      — 让Bash工具处理后台运行。
  3. 等待2秒,然后运行
    diffity list --json
    获取端口号。
  4. 告知用户diffity正在运行。打印URL并保持简洁 — 不要显示会话ID、哈希值或其他内部信息。示例:
    Diffity is running at http://localhost:5391
    当您准备好时:
    • 在浏览器的差异页面上留下评论,然后运行 /diffity-resolve 来修复问题
    • 或者运行 /diffity-review 获取AI代码评审