/repomatic:repomatic-upgrade [vOLD vNEW] [all|workflows|configs|upstream]from Repomatic
Applies changes from a newer repomatic release to a downstream repository, then audits alignment with the pinned tag. Run after repomatic init moves the upstream pin.
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 -rhoE 'kdeldycke/repomatic/[^@]+@.*v[0-9]+\.[0-9]+\.[0-9]+' .github 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+$' | sort -uV | tail -1 | sed 's/^/ADOPTED_PIN /'
!git diff HEAD -- .github 2>/dev/null | grep -E '^-.*kdeldycke/repomatic/.*v[0-9]+\.[0-9]+\.[0-9]+' | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+$' | sort -uV | head -1 | sed 's/^/PREVIOUS_PIN_UNCOMMITTED /'
!cat .git/repomatic/upgrade.json 2>/dev/null || echo "NO_UPGRADE_RECORD"
!git log -1 --format='LAST_WORKFLOW_COMMIT %h %ad %s' --date=short -- .github/workflows 2>/dev/null
![ -d ../repomatic/.git ] && echo "SIBLING_CHECKOUT ../repomatic" || echo "NO_SIBLING_CHECKOUT"
![ -f repomatic/__init__.py ] && echo "CANONICAL_REPO" || echo "DOWNSTREAM"
!ls .github/workflows/*.yaml 2>/dev/null
!grep -A5 '\[tool.repomatic\]' pyproject.toml 2>/dev/null || echo "No [tool.repomatic] section"
!grep -E '^(subagents|skills|gitignore)\.location' pyproject.toml 2>/dev/null
You bring a downstream repository in line with kdeldycke/repomatic, and you do it in two passes in one session. The first pass works the delta of a newer release. The second audits how far the repository has drifted from the tag it now pins. Both passes share one report.
repomatic init prints the command launching this skill as its last next step when it moves the upstream pin. That run also writes the upgrade record the context prints. The sync-repomatic upgrade pull request invites the maintainer to run it, and so does the sync-workflow-pins one when a bump moves repomatic.
This skill is for downstream repos only. If the context shows CANONICAL_REPO, tell the user this skill is not applicable.
Use uvx --exclude-newer '{window}' --exclude-newer-package repomatic=P0D --from 'repomatic==X.Y.Z' -- repomatic, with X.Y.Z the ADOPTED_PIN the context shows. Read {window} from the workflow-level UV_EXCLUDE_NEWER of .github/workflows/tests.yaml or release.yaml, which repomatic init renders from [tool.repomatic] minimum-release-age. The pin keeps the tool registry (ruff, typos, mypy versions) identical to what CI runs, and the cooldown gates the dependency tree while keeping a fresh release installable. References to <cmd> below resolve to it.
The sync-repomatic job moves the pin once a release clears the cooldown. To adopt a release before that, run init as that release, on each component to regenerate. X.Y.Z is the release to adopt:
$ uvx --no-progress --exclude-newer '{window}' --exclude-newer-package repomatic=P0D 'repomatic==X.Y.Z' init --no-cooldown workflows/autofix.yaml workflows/lint.yaml
--no-cooldown. Without it, init holds the pin back while the release is inside the window, and writes or deletes no file. init --upgrade cannot do this job: it skips a release inside the window, and it takes no components.init also writes whatever else is in scope, like a labels config or a changelog, and a bare workflows selector bypasses the scope gates. Name each tool config to sync again too, like typos: workflows alone leave those sections one release behind.Then run the two passes below on the result.
Both values come from $ARGUMENTS, in any order, and neither constrains the other.
vOLD vNEW pair in $ARGUMENTS.previous_pin and adopted_pin fields (§ Read the upgrade record).uses: lines carry the previous pin, the added ones the adopted pin. The context prints it as PREVIOUS_PIN_UNCOMMITTED.git log -p -1 -- .github/workflows, reading the previous pin off its removed uses: lines.all:
all: run every audit area below.workflows: audit workflow files only.configs: audit non-workflow config files only.upstream: identify downstream innovations that could be contributed back to repomatic.A repomatic init run that moves the upstream pin records itself in .git/repomatic/upgrade.json. It lists the paths the run wrote and deleted, the commit it started from as head, the paths already uncommitted then as modified_before, and the warnings it printed. The context prints the file, or NO_UPGRADE_RECORD. In a linked worktree, read it at the path git rev-parse --git-path repomatic/upgrade.json prints.
adopted_pin is the ADOPTED_PIN. The record writes each pin as a bare version, with no v prefix. Any other record describes an earlier move.warnings and each pair of its removed_review is one. Its warnings are the only record of the local edits init overwrote: no later run warns about them again.repomatic init output quoted in the sync-repomatic pull request that made it. Otherwise, find them as the sections below describe.Fetch every reference file at the ADOPTED_PIN tag, never at the tip of main:
$ gh api "repos/kdeldycke/repomatic/contents/{path}?ref=vX.Y.Z" -H "Accept: application/vnd.github.raw"
main carries unreleased work under a .devN changelog heading. Audited against it, every change waiting for the next release reads as downstream drift: a [tool.X] section matching its adopted template exactly gets reported as stale. Keep the axes apart in the report:
DRIFT row. Confirm the version exists with gh api repos/kdeldycke/repomatic/releases --jq '.[].tag_name'.main is unreleased and belongs in neither list.Before flagging an issue, verify that the gap isn't deliberate or covered by a runtime mechanism. Common false positives:
[tool.repomatic] exclude is authoritative. Files listed there (like workflows/changelog.yaml or labels) are intentionally absent on disk. Do not report them as MISSING.[tool.repomatic] lint-repo.declined records a decision. Each entry names one bundled entry that the repository leaves out on purpose, with the reason: a template entry that a [tool.X] section lacks, or a default .gitignore rule that [tool.repomatic] gitignore.extra-content leaves out. Do not report that entry as DRIFT. Report the record itself when lint-repo says it declines nothing.ToolSpec sets default_config in repomatic/tooling/registry.py: actionlint, mdformat, ruff, yamllint and zizmor.[tool.X] section is never a candidate for deletion. The inverse of the rule above, and the more expensive mistake. Every other tool has no default_config, so its resolution chain has no level 3 to fall back on: lychee, typos, mypy, pytest, coverage, bumpversion and uv are deployed into pyproject.toml by repomatic init, and that section is the only config the tool will ever see. Deleting it does not restore inheritance from a bundled default, it drops the tool to level 4 and runs it bare, silently discarding every rule the section held. Read the tool's default_config before proposing a section be dropped "to inherit upstream updates".When in doubt, search the upstream codebase to confirm whether a behavior is intentional. Read [tool.repomatic] in the local pyproject.toml carefully before declaring anything missing.
The upgrade gets a commit of its own, before the review changes any file. § Run the machinery first then reads the upgraded HEAD, so each hunk it finds is real drift. Skip this section when the context shows no PREVIOUS_PIN_UNCOMMITTED: the upgrade is committed already.
List the paths of the upgrade. Take the created, updated and deleted lists of the record when its head is HEAD. Leave out a deleted path that git ls-files does not list, like an empty folder: git never tracked it, and a pathspec naming it fails the whole command. Without such a record, show git status --short and ask the user which paths belong to the upgrade.
Ask before you commit a path the record lists under modified_before. It held uncommitted work before the upgrade, which the commit would take along: show its diff first.
Commit those paths alone. Another session can share the working tree and its index, so never run git commit --all, and never commit the whole index:
$ git add --all -- {paths}
$ git commit --message 'Upgrade `repomatic` to `vNEW`' -- {paths}
The subject is the title of the sync-repomatic pull request, so the history reads the same whichever way the upgrade came.
The adopted release checks most of the integration on its own. Run it before any comparison by hand, and report what it finds as rows.
Run the generator on a throwaway copy of HEAD.
$ git worktree add --detach {scratch}/audit HEAD
$ uvx --no-progress --exclude-newer '{window}' --exclude-newer-package repomatic=P0D --directory {scratch}/audit 'repomatic==X.Y.Z' init
$ git -C {scratch}/audit status --short
$ git -C {scratch}/audit diff
$ git worktree remove --force {scratch}/audit
An empty diff with no untracked file means every thin caller, each header-only workflow header and each [tool.X] section already present under ongoing sync equals what that release generates. Any hunk is DRIFT that the sync-repomatic job would rewrite. An untracked file is a managed file the repository lacks, which git diff never lists: MISSING, unless § Distinguishing real drift from intended absence explains it. Keep --directory: --output-dir alone writes into the copy but reads [tool.repomatic] from the directory the command started in. A managed file that looks wrong but leaves no hunk is what the generator writes: fix it upstream (§ Apply, step 4), never by hand.
An init that fails with Unknown exclude, Unknown include, Unknown component or Unknown file found an entry that names a component or a file the release dropped or renamed. Report that entry as a breaking row.
Run <cmd> lint-repo --repo {owner}/{repo}. Without --repo, a local run has no $GITHUB_REPOSITORY, so every API-backed check drops out. A local run cannot read the repository secrets either, so lint-repo reports each of them as missing. Pass the flag of each secret gh secret list --repo {owner}/{repo} names: --has-cloudflare-api-token, --has-cloudflare-r2-keys for the two R2 keys, --has-notifications-pat and --has-virustotal-key. <cmd> lint-repo --help lists its checks. Compare one of them by hand only when lint-repo reports it skipped.
The generator does not read hand-owned jobs, the comment beside a synced key, or an entry only the local file carries. Pass 2 compares those.
changelog.md at vNEW. Read every section from vNEW down to, and excluding, vOLD. A section the changelog no longer holds sits in docs/changelog-archive.md at the same ref.repomatic init or a workflow now produces. Skip: docs, internals, test work, and jobs marked upstream-only.gh api repos/kdeldycke/repomatic/releases --jq '.[] | select(.tag_name == "vNEW") | .body' repeats the changelog section, so it adds nothing on its own.For each bullet outside the skip bin, find what it touches here. Grep the source tree, .github/, pyproject.toml and docs/:
[tool.repomatic] key or workflow input. Look in pyproject.toml and the header-only workflows for a hand-rolled equivalent the key now replaces, like a custom paths: list or a local step.[tool.repomatic] exclude before proposing it: an excluded component is a decision, not a gap.tests.yaml, any other header-only workflow, and local scripts for the old name.work around, XXX, TODO, version-guarded branches, and inline pins of the tool it fixed.paths:. Read the diff of the upgrade commit, git log -p -1 -- .github/workflows, against the changelog, so a diff the release explains is never reported as drift. The generator run (§ Run the machinery first) then proves the commit regenerated every managed file instead of moving the pins by hand.show-metadata --output-format json test_matrix test_matrix_pr at both pins and compare the cells. A pin before 8.0.0 spells that option --format. A [tool.repomatic] test-matrix.exclude entry names a literal version, so a release that moves the Python axis can make it drop the new stable version and keep the old floor.Build & release compiles, which the Tests workflow never runs. A push to main compiles one target only, so run gh workflow run release.yaml --ref main, which builds every target, and read the self-test of each.repomatic init rewrites every bundled copy verbatim, so the upgrade also reverts each local commit made to one since the last sync. When the record's warnings hold no Could not read line, check only the copies its overwritten_edits lists: init matched every other one against a file vOLD bundled. Take each copy under skills.location and subagents.location as it stood before the upgrade: at the record's head, or else at the parent of the upgrade commit. Compare it with upstream's .claude/skills/{name}/SKILL.md or .claude/agents/{name}.md at vOLD. Read those paths, not repomatic/data/skills/: its entries are symlinks, and git show returns their target path. A copy that matches neither vOLD nor any upstream commit between the two tags carries local edits. Upstream holds them already when they were ported before the release. To know, write the three states to files and run git merge-file -p {vNEW copy} {vOLD copy} {local copy}. An output equal to the vNEW copy means the upgrade drops nothing. Any other output holds edits that the upgrade drops, so report them as a breaking row. Then read the same path on upstream main, which decides the action and never the status. Edits main already holds ship with the next release, so the row only asks to leave the upgrade commit unpushed until then. Once the sync-repomatic pull request is merged, § Apply, step 2 keeps the local edits instead. Port the edits main lacks.lint-repo check. Read its line in the lint-repo output: a check that passes here offers nothing.init writes [tool.ruff], [tool.pytest], [tool.coverage], [tool.mypy] and [tool.mdformat] once, and lint-repo names each entry such a section lacks. Copy the entry when it applies here. Record one that the repository leaves out on purpose under [tool.repomatic] lint-repo.declined, with the reason its instructions or comments give. The key is the tool, then the path of the entry in its section, like mypy.warn_unreachable = "{reason}". For one member of a list, add the member as lint-repo prints it, like pytest.addopts."--numprocesses=logical" = "{reason}". Ask the user when no reason is stated. Never copy an entry only to silence the warning.<cmd> run mypy and <cmd> run ruff -- check --no-fix once on the untouched tree, then the same two commands at vOLD. A finding that only the new pin reports is a row. When the release adds the gating job itself, every finding it fails on is a row, old ones included. A new mypy error is a breaking row: the lint-types job fails on it. So is a new ruff finding that no safe fix clears, which fails lint-python. A bumped pin still inside the cooldown is a breaking row too. lint-repo warns that repomatic run cannot install it before the date it names, and every job that runs the tool fails until then. For Nuitka that job is the binary build, so a release cut in that window ships without binaries. Admit the pin with the [tool.uv] exclude-newer-package entry the warning gives, or hold releases until that date.Run the areas the scope names, and apply the rules in § Distinguishing real drift from intended absence to every finding.
Compare the hand-owned job bodies of header-only workflows like tests.yaml against the reference. The autofix.yaml workflow's sync-deps job already bumps the action and tool pins there, through its sync-action-pins and sync-workflow-pins pull requests. Look for:
PYTHONIOENCODING: utf8 job variable that keeps Windows output in UTF-8.repomatic run tool.run: | where run: > fits a multi-line single command.paths: filters that don't fit the downstream projectHeader-only sync inherits the canonical paths: filter verbatim (after repomatic/** substitution). When the project's filesystem layout doesn't match, two outcomes are possible:
tests/**, uv.lock in a non-Python repo): the trigger never fires for them. Coverage is missing, not noisy. Recommend [tool.repomatic.workflow.ignore-paths] to drop them.install.sh, dotfiles/** in a config repo): the trigger silently skips PRs that should run CI. Recommend [tool.repomatic.workflow.extra-paths] to append them to every workflow, or [tool.repomatic.workflow.extend-paths] keyed by filename to append them to one workflow.[tool.repomatic.workflow.paths] replaces the whole paths: list of one workflow, and the other knobs then do not apply to it. Its copy of the canonical list misses each entry that upstream adds later. When the copy holds the canonical list plus some entries, recommend [tool.repomatic.workflow.extend-paths] for those entries instead.
A file can match its reference and still fail. Read the latest runs on the default branch, the open autofix pull requests and the open bot issues:
gh api repos/{owner}/{repo}/check-runs/{job_id}/annotations, where GitHub states a brownout.The generator run covers the [tool.X] sections under ongoing sync, and lint-repo the seeded ones. Check what neither reads:
| File | What to check | Absence is OK when |
|---|---|---|
pyproject.toml [tool.typos] | Present at all: a bare init never adds the section, it only re-syncs one already there | Never: typos has no bundled fallback, so the canonical proper-noun map stays inactive. Recommend repomatic init typos. |
.github/ISSUE_TEMPLATE/ | Filename conventions (hyphens, not underscores), missing labels | Personal/internal repo without external bug reporters. |
.github/code-of-conduct.md | Any divergence from the upstream copy, like title-case headings | Replace verbatim with upstream when divergence is detected. |
.gitignore | Must be a real file: git skips an in-tree .gitignore reached via symlink | Never: the sync-gitignore job owns its content. |
Scan the downstream repo for patterns, workarounds, or configurations that are better than or missing from the upstream reference. These are candidates for contributing back to kdeldycke/repomatic. Look for:
AGENTS.md section: upstream syncs no instructions-file content into a consuming repo.Handle each candidate as § Apply, step 4 says: edit the sibling checkout when the context shows SIBLING_CHECKOUT, or describe the change in the report, with a draft title and description.
One record per pass, then one hand-off for both.
Give every row and every list item an ID, so the user can answer "apply F3" or "skip T2". The IDs restart at 1 on each run.
Pass 1 table. ID (R1, R2, …), changelog entry, bin (breaking, adopt, drop, simplify), where it lands in this repository, and the action. Order the rows breaking first, then by rising effort. Close with the entries that offer nothing for this repository, in one line, so the user knows they were read. A first pass that did not run, because no previous pin was found, has no table.
Pass 2 table. ID (F1, F2, …), item, one status per finding (MATCH, DRIFT, MISSING, N/A), and a brief description. Group by severity, functional issues first, then consistency, then cosmetic. For each issue, state what the current state is, what the reference has, and the recommended fix.
Status guide: MATCH matches the reference, or differs only cosmetically. DRIFT exists and diverges in a way the user likely wants to fix. MISSING is expected but absent, and only where the absence is a genuine problem (§ Distinguishing real drift from intended absence). N/A does not apply to this project. When unsure between DRIFT and N/A, lean N/A and explain in the description; over-flagging produces noisy reports the user has to refute.
Apply one row at a time, breaking rows first. Keep each change readable on its own in git diff. Pass 2 findings wait until every pass 1 row is settled.
Keep the local edits a synced copy carries. Restore the file as it stood before the upgrade when upstream left it unchanged between the two tags. Otherwise keep that git merge-file output as the new copy, once its conflicts are resolved. To re-apply one local commit instead, git apply -C1 gets past a context line upstream reworded. Write the restored copy with your file-editing tool when a shell write fails: a sandbox can deny one to a skill or agent folder, git checkout and git apply included. Then port the edits upstream main lacks, as step 4 describes, or the next sync reverts them again.
Run the local checks after each row. The project's tests, mypy and ruff, plus <cmd> lint-repo --repo {owner}/{repo} when the row touched .github/ or pyproject.toml. After a row that touched a workflow, also run <cmd> run actionlint, which parses its ${{ }} expressions. A failing check vetoes the row: revert it and note it in the report. Never loosen a test to pass.
Send generator problems upstream, as edits in the sibling checkout. When a row needs a change in repomatic itself (a generator writing something unwanted, a missing knob, a docs gap, a lesson a synced copy carries) and the context shows SIBLING_CHECKOUT, implement it in ../repomatic: the code, the tests it breaks, and a changelog bullet. Verify it there. For typos and mdformat, run repomatic run {tool} --verify -- {paths}. It prints the diff of each file that the tool would rewrite, and leaves the tree as it is. Another session may share that checkout: edit only the files the row needs, and name them in the report so they can be committed by pathspec. Leave every change uncommitted. Without a sibling checkout, describe the change in the report instead.
Commit the applied rows in one commit, after the upgrade commit. Stage only the files the rows changed in this repository, as § Commit the upgrade first does: git add --all -- {paths}, then git commit -- {paths}. Name the changes in the subject, and add one body line per change only when the subject cannot name them all. A row a check vetoed stays out. When no upgrade commit exists, like after a first adoption, a row path that also holds uncommitted init output takes that output along: show the diff of that path before you commit it.
Never push, and never open an issue or pull request. The user reviews the commits and decides.
Close with two short lists. Keep the tables as the record, then end the answer with two lists, a few words per item, in place of prose about what was applied or skipped. Start each item with its ID, then the row IDs it settles, like - T1 Decide: (F4) …:
D1, D2, …: each applied row, with the files it changed and the short SHA of its commit, from either pass. A breaking row carries the detail it needs as sub-bullets here, and a row that needed no local edit stays in its table's closing line.T1, T2, …: each remaining action, ordered so it can be executed top to bottom, prefixed with one of these five labels and nothing else. Put Decide: items first, since an answer can add work below them.
Decide: a change this pass proposed and the user has not approved, or a choice between options. End the item with the answer you recommend.Implement: code or a docs entry to write, naming the checkout when it is not this one.Commit: uncommitted changes, naming each repository and path.Push: commits made but not on the remote.Report: an issue or comment to file upstream, naming the project and the draft's path.An item that fits none of the five takes a verb as its first word after the ID. Write "none" for an empty list, and add no closing summary.
adopt rows that need only configuration.[tool.repomatic] exclude, include or lint-repo.declined records. Those are decisions.Suggest the user run:
/repomatic-deps modernize when the upgrade also moved uv.lock./repomatic-changelog add for the downstream changelog bullet, when the repository keeps one./sphinx-docs-sync to align docs/ with the upstream kdeldycke/repomatic reference, when this repository has a Sphinx documentation tree. The sphinx-docs agent (.claude/agents/sphinx-docs.md, opt-in via repomatic init subagents/sphinx-docs) holds the canonical conventions for configuration.md, cli.md, install.md, conf.py, and the standard page roster.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
18 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.npx claudepluginhub kdeldycke/repomatic --plugin repomaticOther plugins' skills for the same job