Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

jpegoptim

$ jpegoptim Community Med Risk
Timo Kokkonen · AI & Media · GPL-2.0-or-later · macos / linux / windows

jpegoptim optimizes JPEG Huffman tables, strips EXIF/IPTC/ICC metadata (--strip-all), and optionally caps lossy recompression with --max=<quality>. It includes --noaction (-n) for dry-run inspection, --csv for machine-parseable batch metrics, and --dest to avoid in-place overwrites.

FCRS-1.0 Score
82 /100
Good
Medium Confidence
Zero-Friction Install
brew install jpegoptim
CLI vs MCP Decision CLI Only

Batch JPEG optimization and --noaction --csv size audits run directly in shell without MCP.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Supports --noaction (-n), --csv structured reports, --quiet, and --stdout, though lacks native --json.

  • Provides --noaction dry-run and --csv output flags
  • No native --json flag
Trust & Safety 20 / 25

Dedicated --noaction dry-run and --dest= directory safeguard, but default invocation mutates source files in-place.

  • Mutates input JPEGs in-place unless --dest, --stdout, or --noaction is set
Setup & Portability 14 / 15

Lightweight C binary built on libjpeg, widely available via Homebrew and Linux repositories.

  • Available via brew install jpegoptim and distro packages
Utility & Efficiency 13 / 15

Fast lossless Huffman optimization plus optional --max ceiling that avoids re-encoding already-low-quality JPEGs.

  • --max only recompresses JPEGs exceeding the target quality threshold
Maintenance & Lineage 8 / 10

Maintained by Timo Kokkonen (tjko/jpegoptim) over many years.

  • Active tjko/jpegoptim GitHub repository
Docs & Verifiability 7 / 10

Concise --help and man page detailing --strip-* and --threshold options.

  • Standard --help and man page documentation

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; operates on local JPEG files or stdin/stdout.

Side Effects
Read-Only Local Write
Cost & Quotas

Free GPL-2.0-or-later open-source C binary.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# jpegoptim Agent Rules
- Always run `jpegoptim --noaction --csv` first to preview savings.
- Pass `--dest=<dir>` (or `--stdout`) because `jpegoptim` overwrites source JPEGs in-place by default.
- Avoid `--strip-all` if ICC color profiles or copyright/orientation tags must be preserved.

Agent-Ready Command Recipes

Safe Read-Only Queries

Dry-run JPEG optimization with CSV metrics
jpegoptim --noaction --csv --max=85 *.jpg

Simulates optimization and outputs CSV before/after sizes without modifying any JPEG.

Controlled Writes & Previews

Optimize JPEGs into a separate destination directory
jpegoptim --max=85 --strip-all --dest=out_jpgs *.jpg

Recompresses JPEGs capped at quality 85, strips metadata, and writes copies to out_jpgs/.

Strengths for Agents

  • + --noaction --csv gives agents structured size-savings previews without touching disk.
  • + --max=85 avoids needlessly re-encoding JPEGs that are already compressed below quality 85.

Caveats & Pitfalls

  • ! Overwrites input JPEGs in-place unless --dest=<dir> or --stdout is explicitly supplied.
  • ! --strip-all removes ICC profiles and EXIF orientation along with sensitive GPS/camera tags.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI