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
In this repository28 other files it gives its agents.
- ai-graphicsSkill
- auto-deskewSkill
- auto-toneSkill
- auto-white-balanceSkill
- batch-set-copyrightSkill
- check-model-pricingSkill
- convert-to-avifSkill
- fast-resizeSkill
- fast-thumbnailSkill
- from-jxlSkill
- images-to-pdfSkill
- install-depsSkill
- new-projectSkill
- new-workflowSkill
- open-workspaceSkill
- optimize-jpegSkill
- optimize-pngSkill
- pdf-extract-embedded-imagesSkill
- pdf-to-imagesSkill
- read-metadataSkill
- scrub-metadataSkill
- set-metadataSkill
- svg-to-rasterSkill
- transcode-jpeg-to-jxl-losslessSkill
- upscale-imageSkill
- vectorizeSkill
- web-readySkill
- workspace-setupSkill
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
- Distinctive: line 44
Single file: run one conversion.
- Distinctive: line 45
Directory (non-recursive): ask before processing, then loop over image files in the folder.
- Very specific: line 46
Recursive: use find to locate all images in the tree.
- Distinctive: line 48
Ask for confirmation before batch operations.
- Distinctive: line 75
If any conversions failed, list them and suggest manual inspection.
≈ “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.
Files
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), orweb(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 0visually-lossless→-d 1.0web→-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
findto locate all images in the tree.
Ask for confirmation before batch operations.
4. Convert
Single file:
cjxl -d <distance> -e <effort> input.jpg output.jxlBatch (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
.jxlfiles created in the same directory as originals (or in a user-specified output folder). - Original files remain unchanged.
Notes
- Lossless JPEG→JXL transcoding:
cjxlauto-detects JPEG bitstream and preserves it. To recover the original JPEG bit-exact later, usedjxl --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.
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
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.

