diff4 for Openclaw

A secure CLI tool for encrypting and sharing git diffs and source files using client-side AES-256-GCM encryption.

djyde
v1.0.0
Apr 12, 2026
0
627
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install diff4

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install diff4 using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is diff4?

diff4 is a high-security utility designed for developers who need to share code changes and files without compromising privacy. As a specialized addition to the Openclaw Skills ecosystem, it ensures that your sensitive code never reaches a server in plaintext. By utilizing AES-256-GCM encryption on the client side, diff4 guarantees that only recipients with the correct out-of-band passphrase can decrypt and view the shared content.

Whether you are performing a quick code review or sending snippets across a distributed team, diff4 provides a seamless bridge between local development and secure cloud-based previews. It integrates perfectly with existing git workflows, making it an essential component for teams prioritizing security within their Openclaw Skills toolkit.

diff4 Use Cases

  • Securely sharing the most recent git commit with a peer for immediate review.
  • Previewing staged changes to ensure code quality before pushing to a remote repository.
  • Bundling and transmitting multiple arbitrary text files across teams with end-to-end encryption.
  • Managing self-hosted encryption servers for internal corporate compliance.

How diff4 Works

  1. The user initiates a command to capture a git diff or specific file contents.
  2. diff4 captures the data and performs client-side encryption using a pre-configured passphrase and the AES-256-GCM algorithm.
  3. The encrypted payload is uploaded to the designated diff4 server (default or self-hosted).
  4. The server generates a unique URL for the encrypted bundle.
  5. The user shares the URL and provides the decryption passphrase to the recipient via a secure, out-of-band channel.

diff4 Setup

To integrate this into your Openclaw Skills environment, ensure you have Node.js installed, then run:

npm i -g @diff4/cli

Initialize your encryption key:

diff4 key-gen [your-secret-passphrase]

Verify your configuration:

diff4 key-get

diff4 Data Schema & Taxonomy

diff4 organizes data into encrypted bundles. When sharing multiple files, it uses a specific JSON structure before encryption:

Data Component Description
Diff Payload Standard git diff output (UTF-8 text).
File Bundle A JSON array containing file paths and their corresponding text content.
Metadata Includes versioning and encryption headers required for GCM decryption.
Server URL Defaults to [https://diff4.com](https://diff4.com) unless overridden by DIFF4_SERVER env var.

diff4 Advanced Features

  • Support for self-hosted instances to maintain total control over the data lifecycle.
  • Environment variable integration for DIFF4_PASSPHRASE and DIFF4_SERVER for automated CI/CD workflows.
  • Multi-path file bundling allowing for complex code snippet sharing in a single encrypted link.
  • Graceful error handling for empty diffs or unsupported binary formats to maintain stable Openclaw Skills automation.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*