rhdh-yarn-bump
Skill20 starsChanged 21 days agoApache-2.0View on GitHub
Bumps Yarn Berry across the RHDH repos — rhdh-plugins, rhdh midstream, rhdh-plugin-export-overlays, rhdh-cli, and GitLab CEE rhidp/rhdh and rhdh-plugin-catalog — with `yarn set version` plus install, and rewrites the pins Yarn cannot see: `packageManager`, `yarnPath`, `ENV YARN=`, and Containerfile lines. Use for "bump yarn to 4.17.1", "upgrade Yarn Berry across the repos", "weekly yarn bump", "which Yarn version is each repo pinned to", or scanning yarn pins.
In this repository73 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- rhdh-base-imagesSkill
- rhdh-konflux-rpaSkill
- rhdh-konflux-tasksSkill
- rhdh-plugin-catalog-index-status-and-update-flowSkill
- rhdh-pr-mrSkill
- rhdh-prow-jobsSkill
- rhdh-prow-release-branchSkill
- rhdh-prow-triggerSkill
- rhdh-feature-docsSkill
- rhdh-jira-createSkill
- rhdh-jira-linkSkill
- rhdh-jira-refineSkill
- rhdh-jira-sprint-planSkill
- rhdh-jira-sprint-reportSkill
- rhdh-jira-updateSkill
- rhdh-prepare-refinementSkill
- agent-readinessSkill
- ask-rhdhSkill
- clean-proseSkill
- setup-rhdh-skillsSkill
- skill-authoringSkill
- rhdh-backportSkill
- rhdh-backstage-upgradeSkill
- rhdh-localSkill
- rhdh-operator-pr-testSkill
- rhdh-overlaySkill
- rhdh-playwrightSkill
- rhdh-plugin-authoringSkill
- rhdh-plugin-bug-fixSkill
- rhdh-plugin-exportSkill
- rhdh-plugin-midstream-propagateSkill
- rhdh-plugin-nfs-migrationSkill
- rhdh-plugin-wiringSkill
- rhdh-pr-createSkill
- rhdh-pr-reviewSkill
- rhdh-test-placementSkill
- backstage-api-changesSkill
- mutation-gateSkill
- openspec-journalSkill
- prose-editingSkill
- rhdh-contextSkill
- rhdh-forgeSkill
- rhdh-jira-apiSkill
- rhdh-jira-authoringSkill
- rhdh-spec-driven-schemaSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-audit-changeSkill
- openspec-bulk-archive-changeSkill
- openspec-continue-changeSkill
- openspec-exploreSkill
- openspec-ff-changeSkill
- openspec-new-changeSkill
- openspec-onboardSkill
- openspec-sync-specsSkill
- openspec-verify-changeSkill
- rhdh-overlay-cve-exportSkill
- rhdh-platform-lifecycleSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
When package.json defines prettier:check or prettier:fix, yarn-bump.sh runs yarn prettier --ignore-unknown --write on the changed files …
- Very specific: line 85
Do not re-enable Renovate Yarn bumps.
- Very specific: line 86
Do not yarn set version stable — repos must share one exact 4.x.
- Very specific: line 87
Do not download a separate Yarn binary per repo.
- Very specific: line 88
Do not special-case rhdh-1-rhel-9.
- Very specific: line 89
Do not invent a model in --attribution.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
RHDH multi-repo Yarn bump
Goal
Propagate a Yarn Berry 4.x bump across:
| Repo | Notes |
redhat-developer/rhdh-plugins | root workspace (+ Fullsend if hardcoded) |
redhat-developer/rhdh | root + nested workspaces + Containerfile |
redhat-developer/rhdh-plugin-export-overlays | many packageManager pins |
redhat-developer/rhdh-cli | root packageManager / yarnPath |
gitlab.cee.redhat.com/rhidp/rhdh | distgit binary + ENV YARN= (fetched CLI, same bytes as GitHub) |
gitlab.cee.redhat.com/rhidp/rhdh-plugin-catalog | per-workspace pins + Containerfiles |
Renovate Yarn packageManager updates are disabled (RHIDP-17563). This skill is the bump path.
Branch: live line is main on GitHub and GitLab CEE.
What actually changes
yarn set version <to> # packageManager + yarnPath + .yarn/releases
chmod +x .yarn/releases/yarn-<to>.cjs
yarn install --mode=update-lockfileWhen package.json defines prettier:check or prettier:fix, yarn-bump.sh runs yarn prettier --ignore-unknown --write on the changed files before commit. Yarn writes "**" in .yarnrc.yml; Prettier (rhdh-cli) requires '**'.
Plus pins Yarn cannot see: ENV YARN=, Containerfile / Dockerfile yarn_version= and literal yarn set version (including versions not in --from; denylist pins stay). yarn set version $yarn_version is left as a variable.
yarn-bump.sh runs curl -fsSL once against https://repo.yarnpkg.com/<to>/packages/yarnpkg-cli/bin/yarn.js (the same URL yarn set version uses) and installs that file into every bumped .yarn/releases directory. GitHub PRs and GitLab MRs commit yarn-<to>.cjs (mode 100755) plus the removed older binary. If the download fails, GitLab falls back to copying a binary produced by a GitHub bump.
Default path: yarn-bump.sh
SKILL=<this skill's directory>
JIRA_ISSUE=RHIDP-1234 "$SKILL/scripts/yarn-bump.sh" # resolve latest 4.x, clone, bump, PR/MR
"$SKILL/scripts/yarn-bump.sh" --to 4.18.1 --issue RHIDP-1234 --dry-run--issue / JIRA_ISSUE is required: the opener (/rhdh-pr-mr) refuses to publish without a
key, so the scheduled bump carries the standing automation ticket. The key goes in the
Related Jira: line; it does not mean a human is working the bump.
--attribution / RHDH_ATTRIBUTION (alias --assisted-by, RHDH_ASSISTED_BY) becomes the
commit trailer and is forwarded to the opener. Default rhdh-yarn-bump — the script names
itself and claims no model. An agent-driven run should pass what it knows, e.g.
--attribution 'paseo (pi + DeepSeek V4.1 Flash (EnMaaS), thinking: off)'. A value that
already starts with Assisted-By: or Generated-by: is used verbatim.
It resolves Yarn 4.x (@yarnpkg/cli; never stable / 5.x unless --to), downloads that CLI once, clones the six repos, skips open chore/automated-yarn-bump* PRs/MRs and denylist pins (4.8.1 / 4.9.2 / 4.15.0), bumps each tree with --bin (so the release binary is in the diff), commits as rhdh-bot with the Assisted-By: trailer, and opens PRs/MRs via sibling
/rhdh-pr-mr, forwarding --issue and --attribution.
GitLab weekly-maintenance clones this skill pack and runs yarn-bump.sh after digest/bootc and before Quay cleanup.
Manual mutator (existing checkouts)
node "$SKILL/scripts/bump-yarn.js" --scan --root /path/to/repo
node "$SKILL/scripts/bump-yarn.js" --to 4.18.1 --from-all --root /path/to/rhdh-plugins
curl -fsSL -o /tmp/yarn-4.18.1.cjs \
https://repo.yarnpkg.com/4.18.1/packages/yarnpkg-cli/bin/yarn.js
node "$SKILL/scripts/bump-yarn.js" --to 4.18.1 --bin /tmp/yarn-4.18.1.cjs \
--from-all --root /path/to/rhdh-downstream--from 4.12.0,4.14.1 is the default when --from-all is omitted. Lock refresh can exceed 45 minutes.
Anti-patterns
- Do not re-enable Renovate Yarn bumps; they miss Containerfile /
ENV YARN=. - Do not
yarn set version stable— repos must share one exact 4.x. - Do not download a separate Yarn binary per repo. One fetch from
repo.yarnpkg.com, then--bincopies those bytes into every PR/MR.--copy-binis only the fallback when that fetch fails. - Do not special-case
rhdh-1-rhel-9; both CEE repos default tomain. - Do not invent a model in
--attribution. Unknown parts are dropped: the tool alone is honest, a guessed model is not.
Tests
node --test "$SKILL/tests/bump-yarn.test.mjs"
bash "$SKILL/tests/smoke-caller.sh" # commit trailer + forwarded opener metadataCompletion
Done when matching workspaces sit on --to (packageManager, yarnPath, yarn-<to>.cjs mode 100755), extras rewritten, locks refreshed unless --no-refresh-locks, and PRs/MRs opened (or skipped for open bot PR / no diff).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

