All plugins

covsift

Exact, 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.

rodricksz4h5Toolsv1.0.0Updated 2 days ago

About

Exact, 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.

covsift

Exact, local analysis of code coverage reports, as four Hermes tools.

After writing code and tests, the question a coding agent gets is "did my change
get tested?" The answer is in the coverage report, but a real report is
megabytes of XML or LCOV covering every file in the project, and the part that
matters is the handful of lines the change added. covsift reads the report on
disk and returns exact answers: overall coverage, the least covered files and
their uncovered lines, and, given a diff, the added lines no test ran.

Why a tool and not a prompt or skill

  • Diff coverage. Pass the output of git diff origin/main...HEAD (or a file
    holding it) and get, per changed file, the added lines tests never executed.
    You also get added lines with partly covered branches, a total, and an optional
    fail_under gate. Real output on a change that added an unused helper and an
    untested branch:

    {"lines_added": 74, "lines_measured": 58, "lines_missing": 5,
     "diff_percent": 91.38, "passed": false,
     "changed_files": [{"file": "covsift.py", "measured": 58, "covered": 53,
       "missing_lines": ["195-198", "203"],
       "partial_branches": [{"line": 202, "covered": 1, "total": 2}, ...]}]}
    

    Changed files that the report does not cover at all are listed separately
    (not_in_report): a new module that no test imports shows up there, not as
    "100%".

  • Every common format, one answer. LCOV, Cobertura, JaCoCo, Clover,
    SonarQube generic XML, coverage.py JSON, gcovr JSON, Coveralls JSON and Go
    cover profiles are read into the same model. A directory of reports (one per
    package or test suite) is merged.

  • Paths that don't line up. Reports name files differently from git:

    • absolute CI paths (/home/runner/work/app/app/src/x.py)
    • paths under a Cobertura <source> root
    • Go import paths (github.com/org/repo/pkg/x.go)
    • JaCoCo packages (org/acme/A.java)
    • Windows drive paths

    A repository path matches a report file in this order:

    • the same path;
    • a longer report path ending in it (an absolute CI path, a Go import path,
      a <source> root), even for a root-level file;
    • a shorter report path it ends in, as long as that path includes a directory;
    • a shared tail of at least two components (app/x.py under /code/ and under
      backend/, or a Go module path against its directory). This only applies when
      the differing leading parts have nothing in common: different checkout roots,
      not different directories of one tree.

    Case is ignored only when nothing matches exactly. Two equally good candidates
    are reported as ambiguous, never guessed. So is a match on the file name
    alone: a report's utils.py is not taken as the diff's new pkg/utils.py,
    which would show an untested file as covered.

Tools

All four always return a JSON string. A bad path or a file that is not a
coverage report returns { "ok": false, "error": "..." } rather than raising.
path (and base/head) is a report file or a directory searched recursively
for reports. Files that are not reports (pom.xml, package.json) are skipped
and listed in skipped.

coverage_summary

argtyperequireddefaultmeaning
pathstringyes-report file or directory
topintegerno15files and directories to rank (cap 200)
directory_depthintegerno2path components that make a directory in the rollup

Returns:

  • totals: lines, branches, and Go statements, each with a percent.
  • least_covered: files with at least 5 lines, each with its uncovered line ranges.
  • directories: coverage per directory.
  • uncovered_files: files with no covered line.
  • formats and reports_read.

coverage_file

argtyperequireddefaultmeaning
pathstringyes-report file or directory
filestringyes-source file, e.g. src/app/models.py

Returns the file's counts, missing_lines (ranges such as "10-14") and
partial_branches ({line, covered, total}).

coverage_diff

argtyperequireddefaultmeaning
pathstringyes-report file or directory
diffstringone of-unified diff text (git diff, diff -u, git format-patch)
diff_pathstringone of-a file holding the diff
fail_undernumberno-passed: false when diff coverage is below this percentage
max_filesintegerno50changed files to list (cap 1,000)

Returns:

  • lines_added, lines_measured (added lines the report knows are executable),
    lines_covered, lines_missing and diff_percent.
  • changed_files, each with its missing lines and partial branches, least covered first.
  • not_in_report, plus ambiguous when a path matches more than one report file.

A diff with no measurable added line has diff_percent: null and passes the
gate, because nothing executable changed. The diff parser:

  • handles renames, deletions, new files, CRLF line endings and git's quoted
    unicode paths;
  • follows each hunk's line counts, as git apply does;
  • reads on to the next header when a hand-edited hunk is longer than its header
    says, and sets diff_note when it does.

coverage_compare

argtyperequireddefaultmeaning
basestringyes-baseline report file or directory
headstringyes-new report file or directory
max_filesintegerno50files per list (cap 1,000)

Returns:

  • Both runs' totals, and change in line, branch and statement percent.
  • dropped: files that lost coverage, with the lines that were covered before
    and are not any more.
  • improved, added_files and removed_files.

How formats are read

  • Lines. A line is covered when any record for it ran: repeated records,
    template instantiations and several reports all count once.
  • Branches. These are per line (covered/total).
    • When a format names its branches (LCOV block/branch, coverage.py arcs, gcovr
      and Coveralls branch numbers), records and reports merge branch by branch, as
      lcov -a does: a branch one test took and another missed counts as taken.
    • A Go line holding a block that ran and one that did not
      (if err != nil { return err } on one line) counts as a partly covered branch.
  • Go statements are counted the way go test -cover counts them. A block
    that appears in several profiles is counted once.
  • LCOV follows DA: lines. Function declaration lines (FN:) are not
    counted as executable lines. When a record's own LF/LH disagree with its
    DA: lines (gcovr --exclude-function-lines still writes DA: for excluded
    lines), report_notes says so.
  • gcovr's JaCoCo output has no line counts, only branch counts. Line
    coverage for those files is reported as unknown, never as 0% or 100%.
  • Declared totals that differ. When a Cobertura report's own totals differ
    from its per-line data, the result says so in report_notes (istanbul counts
    branches it attaches to no line).
  • Not read. Istanbul's coverage-final.json and coverage-summary.json:
    use the lcov or cobertura reporter (c8, nyc, Jest and Vitest all have them).

Merging a directory of reports

Reports in a directory are merged by file path. That is right for several runs of
one project (unit and integration tests), but two cases need care:

  • Per-package reports whose paths are relative to each package (two
    lib/main.dart) would merge into one file. Pass each package's report on its
    own.
  • The same run exported twice (coverage.xml and coverage.json) can name files
    differently and count them twice. Keep one format per run in the directory.

Safety

  • Read-only. It reads only the paths you pass: regular files, up to 512 MiB per
    report, 2,000 reports per directory, and a 64 MiB diff.
  • No network, no credentials, no subprocess (it never runs git or tests; the
    diff is passed in), no background work, no self-update. Standard library
    only.
  • XML is parsed by a streaming expat parser. Entity declarations are refused,
    so entity expansion and external entities cannot be used. A DOCTYPE such
    as JaCoCo's is allowed but its DTD is never fetched.
  • Honours Hermes' core read denylist (credential stores, project .env files,
    NT/device namespace paths). Each path is checked as given and as an absolute
    path before anything is opened, including every file found in a directory.
    Device, fd and /proc paths are refused, also through symlinks, and
    symlinked directories are not followed.

Install

hermes plugins install rodricksz4h5/covsift --enable

License

MIT

README from the reviewed commit 5d2ea15; it updates when the author re-pins.

More by rodricksz4h5

8 plugins by rodricksz4h5 in the catalog.

rodricksz4h5dataprobeExact, 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.Communitytoolsrodricksz4h5layersiftExact, 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.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