/repomatic:repomatic-test-matrix [review|add <axis>|drop <axis>]from Repomatic
Configures CI test matrices for Python projects: selects Python versions, OS runners, and probe cells. Use when adding/dropping Python versions or OS, pinning dependencies, or placing new jobs.
Ships in Repomatic. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
!grep -A20 '^\[tool.repomatic.test-matrix' pyproject.toml 2>/dev/null || echo "NO_TEST_MATRIX_CONFIG"
!grep -E '^\s*requires-python' pyproject.toml 2>/dev/null || echo "NO_REQUIRES_PYTHON"
repomatic show-metadata builds the full and PR test matrices from [tool.repomatic.test-matrix.*]. Read the effective matrices before proposing anything:
$ repomatic show-metadata --output-format json test_matrix test_matrix_pr
A matrix cell costs a runner on every push, so each one has to earn its place. These are the selection conventions.
Released dependencies on stable Python get a broad spread, but broad means broad on the axis the product actually varies along, not on both at once. A tool whose behaviour changes per platform (it drives different system binaries, resolves different paths, ships a different feature set) earns a cell for every OS and architecture, because that spread is the product. Interpreter compatibility is OS-independent by construction, so the floor, the prerelease and the free-threaded build each need one runner rather than one per OS. The default matrix gives one runner to the free-threaded build only: it crosses the floor and the prerelease with every runner. Crossing the two axes multiplies cells to buy their interaction, which is worth paying for only where the failure history shows an interaction exists: measure it (see below) instead of assuming it, and put the floor on whichever OS its users actually run, which for a Python tool is usually Linux, where distribution packagers build against whatever interpreter their channel ships.
An unreleased dependency branch runs on one runner as a continue-on-error probe (test-matrix.unstable), never across platforms: a probe that fails is information, and paying for it six times over buys none.
The default matrix does not treat the prerelease Python that way. It runs that version (currently 3.16) on every runner, and marks those cells continue-on-error itself, with no test-matrix.unstable entry. To keep that probe on one runner, remove its other cells with test-matrix.exclude: one entry for each other runner, like { "os" = "macos-26", "python-version" = "3.16" }.
A released free-threaded build (3.15t) is a different case and runs stable on a single runner, as one include row pinned to that runner and left out of unstable. It is shipped software, so a failure there is a real failure.
A cell justifies itself by having failed while its siblings passed. Anything less is a hypothesis, and the repository already holds the evidence to test it: walk recent runs of the workflow and, for every failing cell, check whether the same OS passed at its other Python version in that same run. A cell that never fails alone has never repaid its cost.
$ gh api 'repos/{owner}/{repo}/actions/workflows/tests.yaml/runs?branch=main&created=>={date}&per_page=40' \
--jq '.workflow_runs[].id'
$ gh run view {run-id} --json jobs \
--jq '.jobs[] | select(.name | test("py")) | "\(.name): \(.conclusion)"'
Keep the created filter, and do not use gh run list instead. Both an unfiltered page and that command can show runs weeks old as the newest ones.
Count cancelled runs too. A busy default branch cancels most of its runs through cancel-in-progress, and the cells that had already reported a verdict inside them are where most of the failure history lives; filtering to conclusive runs alone can shrink a real sample to nothing.
Two readings make the decision. A failure hitting every cell of an OS is an OS-level or universal bug, which one cell per OS would have caught. A failure hitting one cell while its twin passed is the only kind a per-OS version pair can catch, and if that count is zero across a real sample, the pairs are redundant. Expect the second reading to also surface environment artifacts rather than code bugs (one runner of a label carrying a different tool layout than another), and do not count those as a cell earning its keep.
State the sample size and both counts when proposing the change, and record in the config comment what would justify restoring what you cut, so the next reader inherits the measurement rather than the conclusion alone.
Add the floor of a supported range as an explicit matrix value: the floor is what an install actually resolves for someone on an old environment, and no other cell runs it, unless the matrix holds the lowest-direct cell below.
Add any mid-range release a shim works around, too. That version is the one that catches the shim regressing, and it is invisible to a matrix that only spans the endpoints.
One pinned value verifies one dependency. To run every declared floor at once, add one full-include row that carries a resolution key, on the floor Python of the fastest runner:
[tool.repomatic]
test-matrix.full-include = [
{ "os" = "ubuntu-26.04-arm", "python-version" = "3.11", "resolution" = "lowest-direct" },
]
The tests job of the bundled tests.yaml resolves the project again in a cell that carries that key: each direct dependency takes the lowest version its specifier allows. The cell fails when the code calls an API newer than a declared floor.
A tests.yaml whose jobs predate that step ignores the key, and the cell then repeats its twin. Copy the step that reads matrix.resolution from the upstream workflow first, at the tag the repository pins: gh api 'repos/kdeldycke/repomatic/contents/.github/workflows/tests.yaml?ref=vX.Y.Z' -H 'Accept: application/vnd.github.raw'. Then put --frozen on every uv run after it. A plain uv run finds the rewritten lockfile out of date and resolves it back to the newest releases.
Replay the cell before you add the row, in a scratch copy of the repository, since the resolution rewrites uv.lock. On the floor Python, run uv sync --resolution lowest-direct --all-extras --group test, then the suite with uv run --frozen. Run it several times and judge each run by its exit code, never by its summary line. Test plugins have floors too: one below its floor can abort the collection under xdist, or end a passing run on an INTERNALERROR.
A test that reads the matrix's python-version axis must also read its include rows. A full-include row flattens the full matrix into a job list with no axis.
The cell cannot see a dependency that another requirement holds above its floor, or a library that the tests replace with a mock. Check those two by hand: the /repomatic-deps skill, when present, holds the procedure.
A distribution builds from the sdist, outside a git checkout, on the newest dependency releases. To catch what breaks only there, add one full-include row that carries source = "sdist", on the newest stable Python of the fastest runner:
[tool.repomatic]
test-matrix.full-include = [
{ "os" = "ubuntu-26.04-arm", "python-version" = "3.15", "source" = "sdist" },
]
The tests job of the bundled tests.yaml then builds and unpacks the sdist, installs it with uv sync --upgrade, and runs the suite there. A test that needs the checkout must skip without a .git directory: the cell fails on any that does not.
Replay the cell before you add the row. Build the sdist with uv build --sdist, unpack it outside the repository, run uv sync --upgrade --all-extras --group test there, then the suite with uv run --frozen. A tests.yaml whose jobs predate the three steps that read matrix.source repeats the twin cell: copy them first, with the if: conditions of the checkout steps.
Measure, do not reason from the chip:
$ repomatic job-timings --workflow tests.yaml --limit 5
That reports median whole-job wall-clock per runner image from recent successful runs. Read it before proposing any runner change: the parallel pytest --numprocesses=logical suite favours ubuntu-26.04-arm, which is why that is the test PR Linux slot, but the ratio is workload-dependent and yours may differ.
Where one fast runner suffices, ubuntu-26.04-arm is the default: fastest and cheapest tier, against hosted macOS billing roughly ten times Linux. Reserve macos-26 and Windows for the OS coverage only they add, and drop the slower twin of an OS pair with test-matrix.remove.os.
You are not the first to know an image is changing. repomatic sync-runner-images runs weekly from the autofix.yaml workflow, looks up every label this repository runs in GitHub's Available Images table, and proposes the mechanical half as a pull request. A retiring image has its literal runs-on: values and its [tool.repomatic.test-matrix.*] entries moved onto a successor. A workflow's own matrix that lists it is named in the pull request body and in a warning, for a move by hand. A strictly newer version of an image in use gets its literal runs-on: values moved too, and also joins the full matrix as a continue-on-error probe unless the fleet already runs it. It opens a pull request only when something here is exposed, so its existence is the signal.
Deciding whether to merge is this skill's job, and the CI run that pull request triggers is the evidence for it. Closing the pull request alone brings the proposal back on the next run; declining one for good means naming the label in [tool.repomatic.sync-runner-images] ignore.
That table is the only source read, and it badges an image deprecated when deprecation begins rather than when it is announced, so a retirement surfaces here months after an announcement feed would have shown it. The runway is still ample, since the badge lands well before the image stops working. What the table cannot show at all is a change to the contents of an image already in use, like a default toolchain moving: the suite is what catches those.
GitHub's preview label chiefly gates -latest alias eligibility, and no workflow here uses a floating alias, so it says nothing about whether the image runs the suite green.
Never introduce a -latest alias to sidestep the question: GitHub repoints those with no commit to review, and lint-repo warns about them.
A job may run on the images of repomatic's default test matrices, and on no other. lint-repo warns about any other literal runs-on:, and its warning lists the allowed images. The check reads that bundled list. It does not read the matrix that this repository computes, so a test-matrix setting adds no image to the list. Each extra image is one more to track, pin and migrate.
A job that needs another image names it in [tool.repomatic.sync-runner-images] ignore. lint-repo then reports the image with no warning, and sync-runner-images leaves the job on it.
Propose changes as a [tool.repomatic.test-matrix.*] diff, and for each added or removed cell say what it buys or costs: a version nothing else exercises, an OS-specific failure mode, a runner-minute saving. A cell nobody can justify in one sentence is a cell to drop.
Verify with repomatic show-metadata after editing, since the config is an input to a computed matrix rather than the matrix itself.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub kdeldycke/repomatic --plugin repomatic18 skills in this plugin
/av-false-positiveScan a release on VirusTotal. Write submission instructions for each AV vendor that flags a false positive./awesome-triageTriage new issues and PRs on awesome-list repos. Apply the curation criteria drawn from past decisions./babysit-ciMonitor the CI tests, lint, autofix, docs and Nuitka binary-build workflows. Diagnose each failure, fix the code, commit, and loop until every stable job passes. Ignore unstable failures./benchmark-updateCreate or update the competitive benchmark page (docs/benchmark.md) that compares this project against its alternatives. Check maintenance status, feature accuracy, new candidates and badge health./brand-assetsCreate project logo and banner SVGs, then export them to light and dark PNG variants. Use when you design a logo or banner, or regenerate the PNGs from their SVG source files./file-bug-reportWrite a bug report for an upstream project, or a reply on an existing issue. Read its contribution guidelines, issue templates and community norms first, then produce a markdown file ready to paste.Other plugins' skills for the same job