Files
memind/skills/diff-viewer/SKILL.md
John 2e14873f2d Initial commit: Memind H5 portal with MindSpace, Plaza, and agent jobs.
Track application source and tests; exclude local env, user workspaces, and runtime data via .gitignore.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 15:04:43 -07:00

772 B

name, description
name description
diff-viewer 代码对比可视化技能:以高亮 diff 形式展示文件修改前后(需启用 diffviewer 扩展)

Diff 查看器

使用 diffviewer MCP 扩展在聊天中渲染代码修改对比。

何时使用

  • 用户要看代码改动前后对比
  • 展示重构、bug 修复、配置变更的效果
  • 比 markdown 代码块更直观地呈现变更

前提

Settings → Extensions 中启用 Diff Viewer 扩展。

工具

show_diff(title, old_content, new_content, language?) — 渲染带行号的 diff

规则

  1. language 填文件类型(rusttypescriptpython 等),用于语法提示
  2. 内容太大时只截取关键改动部分,加说明
  3. 配合 git_diff 工具使用效果最佳