agentleFS
danielrosehilldanielrosehill/Claude-Image-Production-Plugin/skills/to-jxl/SKILL.md

to-jxl

Skill21 starsChanged 8 days agoMITView on GitHub

Convert images to JPEG XL format (.jxl) with quality presets (lossless, visually lossless, or web). Use when you want optimal compression for photo archival or long-term storage, especially from JPEG originals where lossless transcoding preserves the original bitstream at smaller file size.

  • Installs packages

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Single file: run one conversion.

    line 44
  2. Distinctive:

    Directory (non-recursive): ask before processing, then loop over image files in the folder.

    line 45
  3. Very specific:

    Recursive: use find to locate all images in the tree.

    line 46
  4. Distinctive:

    Ask for confirmation before batch operations.

    line 48
  5. Distinctive:

    If any conversions failed, list them and suggest manual inspection.

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Convert Images to JPEG XL

Encode images to JPEG XL (.jxl) format using cjxl. Supports lossless, visually lossless, and web quality presets, with optional effort (compression) tuning.

When to use

  • Converting photos to JXL for archival, where file size matters and quality must be preserved.
  • Lossless-transcoding existing JPEG files to save ~20% file size without re-compression artifacts.
  • Creating web-optimized JXL variants with controlled visual loss.

Inputs to gather

  • Input file or directory — single image, folder, or recursive tree. If omitted, ask for the path.
  • Quality preset — ask which tier: lossless (full fidelity, -d 0), visually-lossless (imperceptible loss, -d 1.0, default), or web (visible compression acceptable, -d 3.0). Default: visually-lossless.
  • Effort level — optional, range 1–9 (1 = fastest, 9 = slowest/best compression). Default: 7. Only ask if the user is concerned about speed vs file size.

Procedure

1. Check tooling

command -v cjxl || echo "cjxl not installed — install with: sudo apt install libjxl-tools"

Abort if missing.

2. Map quality presets to distance

  • lossless → -d 0
  • visually-lossless → -d 1.0
  • web → -d 3.0

Set effort=7 unless the user overrides.

3. Determine scope

  • Single file: run one conversion.
  • Directory (non-recursive): ask before processing, then loop over image files in the folder.
  • Recursive: use find to locate all images in the tree.

Ask for confirmation before batch operations.

4. Convert

Single file:

cjxl -d <distance> -e <effort> input.jpg output.jxl

Batch (folder or recursive):

find <target> -maxdepth <1|999> -type f \
  \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \
     -o -iname '*.gif' -o -iname '*.webp' -o -iname '*.tif' \) \
  -exec cjxl -d <distance> -e <effort> {} {.}.jxl \;

Show progress (file count, time remaining estimate if batch is large).

5. Report

After conversion:

  • Count of files converted, skipped, failed.
  • Original vs. converted file sizes; report total bytes saved.
  • If any conversions failed, list them and suggest manual inspection.

Output / side effects

  • New .jxl files created in the same directory as originals (or in a user-specified output folder).
  • Original files remain unchanged.

Notes

  • Lossless JPEG→JXL transcoding: cjxl auto-detects JPEG bitstream and preserves it. To recover the original JPEG bit-exact later, use djxl --jpeg input.jxl recovered.jpg. This is the killer feature for photo archives.
  • Effort vs. speed: Effort 7 is a good default (reasonable compression in 1–2 seconds per MP). Effort 9 can take minutes on large files. Only use 9 for final archival encodes, not batch preview work.
  • Alpha channels: JXL supports them natively. PNGs with transparency will retain it.
  • Depends: apt install libjxl-tools.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.