跳到正文
Skillpedia
通用编程394k · #17

diffs

它能做什么

它为 AI 智能体提供一个工具,可把修改前后的文本或补丁转换成可视化对比。它适合希望审阅或分享确切改动的人。

适用场景

  • ✓想准确展示文字或代码修改了哪些内容的时候。
  • ✓需要以链接或 PDF、PNG 文件形式分享对比结果的时候。
  • ✓手写的修改摘要可能不清楚或容易出错的时候。

技能链接

https://github.com/openclaw/openclaw/blob/main/extensions/diffs/skills/diffs/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请准确告诉我这两个版本的笔记之间改了什么,并给我一份可以发送的 PDF。”

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

工作原理

工具比较修改前后的文本,或读取补丁,然后生成查看页面、文件,或两者都生成。它会报告是否有变化,并返回查看链接或文件路径。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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, present details.viewerUrl with an available surface-presentation tool. 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 be rejected 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, use an available file-sending tool to send details.filePath as an attachment.

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.

常见问题

如果什么都没改,它会生成文件吗?

不会。如果修改前后的文本完全相同,工具会报告没有变化,也不会生成任何文件。

我可以把生成的文件发给别人吗?

可以。技能可以通过可用的文件发送工具,把文件作为附件发送。

它能生成哪些文件格式?

默认生成 PNG 图片;你要求时可生成 PDF 文件。

详情

作者的原始描述

Use the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.

repo: openclaw/openclaw

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能