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

XZ Utils

$ xz Official Med Risk
Tukaani Project · Files & Search · 0BSD / GPL-2.0-or-later · macos / linux / windows

xz (XZ Utils) delivers high-ratio LZMA2 compression and multi-threaded execution (-T0). It offers read-only integrity testing (-t) and machine-parsable --robot -l listings, but like gzip/pigz, bare xz file deletes the source file unless -k (--keep) or -c (--stdout) is passed.

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

Native local xz compression and --robot -l inspection require no MCP server.

Agent-Readiness Checklist

Local Probe Evidence
— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md
Version
—
Startup
17 ms
Exit Codes (help / invalid)
— / —
NO_COLOR Clean / Non-TTY Safe
Yes / Safe

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Non-interactive CLI with dedicated --robot -l tab-delimited machine output and -t testing, though no --json flag.

  • --robot -l emits stable tab-delimited fields for scripts
  • No --json output mode
Trust & Safety 17 / 25

Read-only -l and -t modes are safe, but default compression/decompression deletes the input file unless -k or -c is supplied.

  • Deletes input file by default unless -k (--keep) or -c is used
Setup & Portability 15 / 15

Pre-installed or trivially packaged (brew install xz) across macOS, Linux, and Windows.

  • Universal availability across desktop and server OSes
Utility & Efficiency 14 / 15

Industry-standard high-ratio LZMA2 compression with -T0 multi-core scaling.

  • High compression ratio and -T0 thread auto-detection
Maintenance & Lineage 8 / 10

Official Tukaani Project upstream maintenance (tukaani-project/xz).

  • Official upstream repository and releases
Docs & Verifiability 8 / 10

Comprehensive xz(1) man page and -H (--long-help) documenting --robot, -k, and -T.

  • Detailed --long-help and man page

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

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

Side Effects
Read-Only Local Write Destructive
Cost & Quotas

100% free, offline, and open-source (0BSD / GPL-2.0-or-later).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# xz Agent Rules
- ALWAYS pass `-k` (`--keep`) or `-c` (`--stdout`)—bare `xz <file>` DELETES the original file on success.
- Use `xz --robot -l` for deterministic script-friendly size and integrity metadata.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect .xz archive metadata in machine-parsable format
xz --robot -l archive.tar.xz

Outputs tab-delimited fields (--robot) for streams, compressed/uncompressed bytes, and check type read-only.

Verify .xz integrity without writing files
xz -t archive.tar.xz

Tests compressed stream checksums read-only and exits 0 only if valid.

Controlled Writes & Previews

Compress multi-threaded while preserving original file
xz -T0 -k bundle.tar

Uses all CPU cores (-T0) to create bundle.tar.xz while preserving bundle.tar via -k (--keep).

Strengths for Agents

  • + xz --robot -l provides stable, locale-independent tab-delimited metadata for scripts.
  • + Multi-threaded -T0 LZMA2 compression pre-installed or packaged everywhere.

Caveats & Pitfalls

  • ! Deletes original input file by default unless -k (--keep) or -c is passed.
  • ! High presets (-7..-9) consume significant RAM during compression and decompression.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI