hal-image for Openclaw

hal-image gives AI agents a fail-open workflow for inspecting, transforming, compressing, and delivering images without exposing local file paths.

ofoxai
v1.1.0
Sep 8, 2026
0
42
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install hal-image

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 hal-image 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 hal-image?

hal-image is an agent-safe image handling skill built around ImageMagick's magick command and the oxipng optimizer. It supports metadata inspection, resizing, cropping, rotation, format conversion, image composition, grids, overlays, and text watermarks.

The skill's defining discipline is to compress every image before delivery, avoid revealing local filesystem paths, and fail open when a tool or operation is unavailable. As part of Openclaw Skills, it helps reduce transfer sizes, multimodal token usage, and upload failures while preserving image pixels during lossless compression.

hal-image Use Cases

  • Inspect image format, dimensions, bit depth, and file size before processing.
  • Resize large screenshots, photos, charts, or generated images before reading or sending them.
  • Crop, rotate, desaturate, convert, or flatten transparent images for a target format.
  • Combine multiple images horizontally, vertically, or into a tiled collage.
  • Add logo overlays or explicit-font text watermarks.
  • Losslessly compress PNG files before attaching them to a message or upload.
  • Optimize JPEG and WebP assets when the optional format-specific tools are installed.
  • Continue delivering the original asset when ImageMagick, a compressor, or a processing step fails.

How hal-image Works

  1. Detect the image-processing request, generated asset, incoming image, or pending attachment.
  2. Check tool availability with magick --version and oxipng --version.
  3. Inspect the source using ImageMagick metadata commands to determine format, dimensions, bit depth, and byte size.
  4. Decide whether the image needs resizing, cropping, conversion, compositing, watermarking, or other transformations.
  5. Apply the required operation with magick; use montage for grids and collages.
  6. Select the appropriate compression path: oxipng for PNG, jpegoptim for JPEG, or cwebp for lossless WebP output.
  7. Optionally compare source and output with ImageMagick RMSE to verify pixel identity.
  8. If a tool or command fails, pass through the original image rather than blocking the task.
  9. Deliver the processed asset without exposing its local filesystem path.

hal-image Setup

Install ImageMagick and oxipng through Homebrew on macOS or Linux:

brew install imagemagick oxipng

Optional compressors for JPEG and WebP workflows:

brew install jpegoptim webp

Verify the required binaries:

magick --version
oxipng --version

The skill requires magick and oxipng according to its OpenClaw metadata. jpegoptim and cwebp are optional. Before processing an asset, inspect it with:

identify -format '%m %wx%h %[bit-depth]-bit %[size] bytes\n' image.png

For text watermarks, configure a valid system font path. If no usable font exists, skip the watermark and continue. Always compress the final image before sending it:

oxipng -o max --strip safe image.png

If compression is unavailable or errors, deliver the original image unchanged.

hal-image Data Schema & Taxonomy

The skill uses local image files as its working data model and does not impose a database schema.

Data element Purpose
Source image Incoming, generated, or rendered asset selected for inspection or transformation.
Metadata Format, width, height, bit depth, and byte size read with identify.
Intermediate asset Optional resized, cropped, composited, converted, or watermarked file.
Final delivery asset Processed image compressed immediately before attachment or upload.
Compression metadata PNG optimization settings such as -o max and --strip safe; JPEG or WebP settings when optional tools are available.
Verification result Optional RMSE comparison, where 0 indicates identical pixel data.

Common file outputs include PNG, JPEG, and WebP assets. Operations may rewrite files in place or create staged outputs such as staged.png, out.jpg, grid.png, or image.small.jpg. The workflow does not expose local paths to end users. Its metadata taxonomy is defined by the skill manifest: name hal-image, MIT license, version 1.1.0, author ofoxai, required binaries, emoji, and repository homepage.

hal-image Advanced Features

  • Fail-open behavior preserves task continuity when magick, oxipng, fonts, or optional compressors are missing.
  • Lossless PNG optimization with oxipng -o max --strip safe reduces file size without changing pixels.
  • Format-aware compression supports PNG, JPEG, and WebP workflows.
  • RMSE verification can confirm that a compressed PNG remains pixel-identical.
  • Multi-image composition supports horizontal rows, vertical stacks, and configurable montage grids.
  • Logo overlays use gravity and geometry controls for precise placement.
  • Explicit font discovery prevents ImageMagick watermark failures caused by missing default fonts.
  • One-pass transformations can combine rotation, grayscale conversion, resizing, flattening, and format changes.
  • Metadata-first processing helps agents reduce oversized inputs before loading them into context.
  • The skill's Openclaw Skills workflow is suitable for both received images and newly generated assets that must be safely delivered.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*