出海助手-代码差异解读 / diffs
> 本技能改造自开源技能 diffs(来源:openclaw/openclaw,openclaw 开源技能生态)。已完整保留原始运行文件(scripts/references/assets 与 LICENSE),并新增中文出海使用说明。原始英文说明见文末「English (Original)」与同目录 SKILL.original.md。
功能说明 / Functional Overview
把代码 diff 解释成人类可读的变更说明,帮助快速评审与理解。
适用场景 / Use Cases
- PR 变更速读
- code review 辅助
- 向非技术同事解释改动
使用方法 / How to Use
- 粘贴 diff 或指定提交/分支,技能会输出变更摘要与影响分析。
示例 / Examples
- 「PR 变更速读」——用自然语言把任务交给本技能即可。
限制说明 / Limitations
- 需要外部服务/凭证的技能,请先完成授权配置后使用。
- 本技能为开源技能的中文本地化版本,核心逻辑与原技能一致;如遇专业术语,正文保留英文原词(如 Shopify、SEO、GA4 等)。
English (Original) / 英文原文(完整保留)
> The section below is the original skill definition, preserved verbatim for traceability and full functionality.
When you need to show edits as a real diff, prefer the diffs tool instead of writing a manual summary.
The diffs tool accepts either before + after text, or a unified patch string.
Check details.changed: identical before/after input returns false without creating an artifact; rendered results return true.
Use mode=view when you want an interactive gateway-hosted viewer. After the tool returns, use details.viewerUrl with the canvas tool via canvas present or canvas navigate.
If the deployment uses a loopback trusted proxy (for example Tailscale Serve with gateway.trustedProxies including 127.0.0.1), raw loopback viewer requests can fail closed without forwarded client-IP headers. In that topology, prefer mode=file / mode=both, or use a configured viewerBaseUrl / explicit proxy/public baseUrl when you need a shareable viewer URL.
Use mode=file when you need a rendered file artifact. Set fileFormat=png (default) or fileFormat=pdf. The tool result includes details.filePath.
For large or high-fidelity files, use fileQuality (standard|hq|print) and optionally override fileScale/fileMaxWidth.
When you need to deliver the rendered file to a user or channel, do not rely on the raw tool-result renderer. Instead, call the message tool and pass details.filePath through path or filePath.
Use mode=both when you want both the gateway viewer URL and the rendered artifact.
If the user has configured diffs plugin defaults, prefer omitting mode, theme, layout, and related presentation options unless you need to override them for this specific diff.
Include path for before/after text when you know the file name.