All plugins

layersift

Exact, local reading of saved container images: docker save and podman save tars (classic and Docker 25+ layouts) and OCI image archives, including multi-platform indexes and gzip, bzip2 or xz compression. image_summary says where the size goes: each layer with the Dockerfile instruction that made it, the final filesystem size, bytes still shipped after a later layer deletes or overwrites them (which layer added them, which removed them), caches and archives left behind (apt lists, apk/yum/dnf, pip/uv/npm/yarn, Go and Cargo caches, temp directories, .git, compilers) with the fix, and the biggest directories and files; image_layer opens one layer; image_compare compares two images before and after a Dockerfile change. Standard library only: no network, never runs docker or contacts a registry, no credentials, no subprocess, never extracts to disk, no third-party dependencies, no self-update. Disclosure: reads the local image archives you pass it (read-only), only regular files, and honours Hermes' core read denylist.

rodricksz4h5Toolsv1.0.0Updated 17 hours ago

About

Exact, local reading of saved container images: docker save and podman save tars (classic and Docker 25+ layouts) and OCI image archives, including multi-platform indexes and gzip, bzip2 or xz compression. image_summary says where the size goes: each layer with the Dockerfile instruction that made it, the final filesystem size, bytes still shipped after a later layer deletes or overwrites them (which layer added them, which removed them), caches and archives left behind (apt lists, apk/yum/dnf, pip/uv/npm/yarn, Go and Cargo caches, temp directories, .git, compilers) with the fix, and the biggest directories and files; image_layer opens one layer; image_compare compares two images before and after a Dockerfile change. Standard library only: no network, never runs docker or contacts a registry, no credentials, no subprocess, never extracts to disk, no third-party dependencies, no self-update. Disclosure: reads the local image archives you pass it (read-only), only regular files, and honours Hermes' core read denylist.

layersift

A Hermes Agent plugin that reads a
saved container image and says where its size goes, with the Dockerfile
instruction behind each byte.

An image is a stack of layers. Each layer is a tar of the files one instruction
added or changed, and deleting a file in a later layer only hides it: the bytes
still ship in the layer that added them. docker history shows layer sizes but
not what is inside them, and nothing says which bytes are dead weight. layersift
applies the layers in order, as a container runtime does, and answers exactly.

Tools

ToolWhat it answers
image_summaryEvery layer with its instruction and size; the final filesystem size; bytes that ship but a later layer deletes or overwrites (which layer added them, which removed them); caches and archives left in the image (apt lists, apk/yum/dnf caches, pip/uv/npm/yarn caches, Go and Cargo caches, /tmp, .git, compilers and headers), each with the fix; the biggest directories and files.
image_layerOne layer: its biggest files and directories, what it deletes or overwrites below it, and how much of it later layers remove.
image_compareTwo images, before and after a Dockerfile change: size of what ships and of the final filesystem, layers shared at the bottom (the base image), directories that grew or shrank, findings fixed or introduced.

Example, from a real debian:bookworm-slim image built with common mistakes:

layer 3 (RUN head -c 30000000 /dev/urandom > /tmp/blob.bin)  30.0 MB  removed later: 30.0 MB
layer 4 (RUN rm /tmp/blob.bin)                                0 B
findings:
  shipped_but_deleted  30.0 MB  added in layer 3, deleted in layer 4
                       fix: delete the files in the same RUN that created them
  leftover  apt package lists  19.9 MB  from layer 2 (RUN apt-get update && apt-get install ...)
                       fix: && rm -rf /var/lib/apt/lists/* in the same RUN
  leftover  .git directory  3.0 MB  from layer 5 (COPY app /app)
                       fix: add .git to .dockerignore

Input

Save the image first; layersift never talks to Docker or a registry:

docker save -o image.tar myimage:tag

It reads:

  • docker save output, both the classic layout (<id>/layer.tar) and the OCI-style
    layout Docker writes from version 25 (blobs/sha256/... with index.json);
  • podman save;
  • OCI image archives (skopeo copy ... oci-archive:image.tar, buildah push),
    including multi-platform indexes (pick one with image: linux/arm64);
  • archives with several images (docker save a b; pick one with image: a:tag);
  • gzip, bzip2 and xz compression of the archive or of its layers (zstd on Python 3.14+).

Install

hermes plugins install rodricksz4h5/layersift --enable

Limits

  • Sizes are the bytes of regular files, as docker export would give them. They do
    not include filesystem block overhead, so docker images (which reports disk
    use) can show a somewhat larger number.
  • Reading a layer means reading every tar header in it with Python's tarfile:
    under a second for a typical image, a few seconds for one with hundreds of
    thousands of files.
  • An archive is refused once reading it would need more than 64 GiB decompressed,
    more than 1.5 million tar entries, or more than 256 MiB of entry names (any single
    name over 4096 bytes is refused). Each tar header is checked before its contents
    are read, and a compressed archive is read once, so a crafted one costs at most a
    few minutes (about 1-3 seconds per GiB) and bounded memory. Contents skipped in
    an uncompressed archive are not read and do not count.
  • image picks an image by tag (myapp:1, docker.io/library/myapp:1 and podman's
    localhost/myapp:1 are the same image), by digest (myapp@sha256:...), or by
    platform (linux/arm64). A name matching nothing, or several images, is an error.
  • An archive that names the same layer file twice is refused as ambiguous.
  • Leftover findings are path patterns; a cache directory the image needs at run time
    will still be reported.

Safety

Standard library only, no dependencies. No network, never runs docker or any other
program, no registry, no credentials, no background work, no self-update. Archives
are read, never extracted: nothing is written to disk. Only regular files are read;
/proc and /dev paths, FIFOs, sockets and Windows device paths are refused, and
every path goes through Hermes' read denylist. Archive size, tar entries, long-name
and pax headers, JSON metadata, the file bytes declared across layers and the
expansion of compressed data are all capped, so a crafted archive cannot make it
read or allocate without end.

License

MIT

README from the reviewed commit 953903d; it updates when the author re-pins.

More by rodricksz4h5

8 plugins by rodricksz4h5 in the catalog.

rodricksz4h5covsiftExact, local analysis of code coverage reports: LCOV (c8, nyc, Jest, Vitest, cargo-llvm-cov, lcov), Cobertura XML (coverage.py, Jest/Vitest, coverlet, gcovr, PHPUnit), JaCoCo XML, Clover XML, SonarQube generic XML, coverage.py, gcovr and Coveralls JSON, and Go cover profiles, from one file or a directory of them. coverage_diff takes a unified diff (git diff) and returns the added lines no test ran, per file, with diff coverage and an optional fail_under gate; coverage_summary gives exact line, branch and Go statement coverage, the least covered files with their uncovered lines and a per-directory rollup; coverage_file lists one file's uncovered lines and partial branches; coverage_compare shows which files lost coverage between two runs. Standard library only: no network, no credentials, no subprocess (never runs git or tests; the diff is passed in), no third-party dependencies, no self-update; XML entity declarations are refused. Disclosure: reads the local report and diff paths you pass it (read-only), only regular files, and honours Hermes' core read denylist.Communitytoolsrodricksz4h5dataprobeExact, local structure and quality checks over large CSV/TSV and JSONL data files that don't fit in a model's context. data_profile reports per-column inferred type, null rate, distinct count, numeric statistics and top values (for JSONL, the inferred union schema with per-field presence); data_validate reports only the actionable problems — mixed-type columns with the offending line numbers, ragged rows, duplicate rows, non-unique key candidates, constant or all-empty columns and malformed JSONL lines; data_head returns a clean parsed preview that handles quoted CSV and JSON correctly. Streamed, standard library only: no network, no credentials, no third-party dependencies, no self-update. Disclosure: reads the local data path you pass it (read-only) and honours Hermes' core read denylist.Communitytoolsrodricksz4h5locksiftExact, local review of dependency lockfiles: npm package-lock.json, pnpm-lock.yaml, yarn.lock (v1 and Berry), uv.lock, poetry.lock, Pipfile.lock, Cargo.lock, composer.lock, Gemfile.lock and go.sum. lock_diff compares two versions of a lockfile (a branch against main) and returns the dependency changes instead of thousands of lines of churn, with supply-chain signals per installed copy: a source that moved (registry to git or URL, another registry host, a different tarball or commit at the same version, an alias or patch that changed, a tarball that belongs to another package), checksums changed, removed or weakened, new install scripts, new registries. lock_summary gives counts, packages at several versions, non-registry sources and install scripts; lock_why shows the dependency chains that pull a package in. Standard library only: no network, no credentials, no subprocess (never runs git or a package manager), no third-party dependencies, no self-update. Disclosure: reads the local lockfile paths you pass it (read-only), only regular files, and honours Hermes' core read denylist.Communitytoolsrodricksz4h5logmineExact, local intelligence over large text log files. log_summarize mines the file into recurring message templates (masking numbers, IPs, UUIDs, hashes, quoted strings and timestamps so near-identical lines collapse into one ranked pattern with an exact count), plus a level histogram and the detected time span; log_grep is regex search with line numbers and grep-style context; log_timeline buckets events per minute/hour/day to find spikes. Streamed, so a log too big to fit in the model's context still works. Standard library only: no network, no credentials, no background processes, no self-update. Disclosure: reads the local log path you pass it (read-only).Communitytools

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section