I. Skill Overview
This skill is utilized when specific edits to code, configuration files, or documentation need to be shared with other collaborators. Instead of pasting two separate text blocks in chat or manually writing verbose notes listing modified lines, the
diffs utility generates formatted, visually highlighted output that makes all additions, deletions and edits instantly clear to recipients.It supports three configurable output modes, adaptable to different sharing use cases.
II. Core Functional Capabilities
1. Three Distinct Output Modes
| Mode | Description | Applicable Scenarios |
|---|---|---|
mode=view |
Generates an interactive web preview link hosted by the Gateway service | Sharing diff content for others to view in a web browser |
mode=file |
Exports a fully rendered static file (PNG or PDF format) | Saving as an attachment or distributing via messaging platforms |
mode=both |
Produces both the interactive preview link and rendered static file | Workflows requiring both delivery formats simultaneously |
2. Flexible Input Acceptance
The
diffs utility accepts two valid input formats:- Side-by-side raw text pairs: Separate input blocks for the original pre-edit content and updated post-edit content
- Unified Patch string: Direct input of standard unified diff formatted text
3. Rendering Customization Controls
- File format options: PNG (default) and PDF
- Output quality tuning: Adjust rendering resolution via the
fileQualityparameter (standard/hq) - Dimension constraints: Scaling factor via
fileScaleand maximum horizontal width limit viafileMaxWidth
4. Intelligent Pre-Check & Delivery Rules
- If the pre-edit and post-edit input text are completely identical, the utility returns a boolean
falseand skips generating any output artifacts to eliminate unnecessary idle operations. - When sending rendered files to users or Discord channels, do not rely on the raw renderer output from the diffs tool. Instead, invoke the dedicated message utility and pass the generated file path via the
pathorfilePathargument.
5. Network Topology Compatibility Logic
If the deployment environment uses a loopback trusted reverse proxy (e.g. Tailscale Serve), raw viewer page requests may fail due to missing forwarded client IP headers. In such network setups, prioritize
mode=file or mode=both, or configure an explicit public-facing viewerBaseUrl proxy address.III. Primary Use Cases
- Code Review Assistance
Quickly generate visual highlighted diffs for single-file modifications during PR discussions, eliminating manual side-by-side code comparison for reviewers.
- Collaborative Documentation Change Presentation
Visually showcase exact edits during collaborative work on docs, configuration files, or README markdown content.
- Tutorial & Live Demo Support
Use highlighted diff visuals to clearly demonstrate before/after code fixes for audiences in tutorials or live presentations.
- Replacement for Manual Written Summaries
Eliminate tedious, hard-to-read text descriptions such as "I edited line X and removed line Y" within chat threads; a single rendered image or preview link fully conveys all changes.
IV. Usage Examples
Basic diffs Utility Invocation
Input: Original pre-edit text + updated post-edit text (or a unified patch string)
Output object returns
details.viewerUrl (interactive preview link) and/or details.filePath (local path to rendered static file)File Delivery via Message Utility
Pass the value stored in
details.filePath into the path or filePath parameter of the message tool to send the rendered file to target users or channels.V. Critical Governing Principles
- Prioritize the dedicated diffs utility: Always use this tool to visualize edits instead of manually writing text change summaries when sharing modifications.
- Skip artifact generation for identical content: The tool returns
falseand creates no files if pre-edit and post-edit text match exactly. - Deliver static files through the message utility: Never directly forward raw renderer output; always pass the file path reference via the message tool for distribution.
- Loopback proxy network caveat: Interactive preview links may break behind loopback reverse proxies; default to file rendering mode in such environments.
- Respect plugin default configuration values: Omit display parameters such as
mode,theme, andlayoutunless explicit overrides are required, adhering to the user’s preconfigured diffs plugin defaults.
VI. Summary
Diffs is a visualization and sharing skill for rendering text modification differences. The
diffs utility accepts paired before/after text blocks or standard unified patch input, then outputs highlighted change visuals as either PNG/PDF static files or interactive Gateway-hosted web preview links. Built for code review, collaborative documentation editing, and educational demo workflows, it provides a streamlined visual alternative to cumbersome handwritten text summaries of edits.