โ† Back to cheatsheet

Diffs Tool Plugin

OpenClaw v2026.3.1 includes a new optional diffs plugin that renders read-only diffs from before/after text or unified patches directly in your chat interface.

v2026.3.1Developer Tools

What You Need to Know

Code reviews, config changes, and document edits are much easier to understand when you can see exactly what changed. The diffs tool takes two text inputs (before and after) or a unified patch format and renders a clear, color-coded diff in the conversation โ€” green for additions, red for removals, and context lines for orientation.

This is a read-only tool by design. It does not modify files or apply patches โ€” it only visualizes differences. This makes it safe for any environment, including sandboxed sessions where write access is restricted. The assistant can show you what a proposed change would look like without having the permission to actually make it.

Practical use cases include reviewing config changes before applying them ("show me the diff between my current openclaw.json and the proposed update"), comparing workspace file versions ("what changed in AGENTS.md since last week"), and previewing code modifications suggested by the assistant before you accept them.

The plugin supports both line-level and word-level diffing. Line-level is the default and works well for code and config files. Word-level highlighting is useful for prose documents like SOUL.md or MEMORY.md where changes might be within a single paragraph rather than entire lines being added or removed.

Install the plugin with clawhub install diffs or enable it in your config under plugins. Once active, the assistant can invoke it automatically when discussing changes, or you can request it explicitly: "show me a diff of those two versions." The output respects your channel's formatting capabilities โ€” rich rendering in webchat and Discord, plain text fallback in Telegram.