$npx -y skills add redhat-developer/rhdh-skill --skill backstage-upgradeUpgrade @backstage/* dependencies in a plugin or app to a target version. Use when asked to "upgrade backstage", "bump backstage", "update @backstage", "align backstage deps", "backstage version bump", "upgrade dependencies", "backstage-cli versions:bump", "update to latest backs
| 1 | <essential_principles> |
| 2 | |
| 3 | <principle name="discover_first"> |
| 4 | Always read the plugin's `package.json` (and `backstage.json` if present) before changing anything. Understand the current version baseline before upgrading. |
| 5 | </principle> |
| 6 | |
| 7 | <principle name="rhdh_alignment"> |
| 8 | RHDH pins specific Backstage versions per release. If the plugin targets RHDH, use the version matrix from `../rhdh/references/versions.md` to determine the correct Backstage version. Don't blindly upgrade to the latest Backstage if it's ahead of what RHDH ships. **Note:** This path requires the `rhdh` core skill to be installed alongside. If the file is not found, ask the user for the target RHDH and Backstage versions directly. |
| 9 | </principle> |
| 10 | |
| 11 | <principle name="cli_first"> |
| 12 | Use `backstage-cli versions:bump` for dependency upgrades instead of manually editing package.json. The CLI resolves the correct version for every `@backstage/*` package from the release manifest. |
| 13 | </principle> |
| 14 | |
| 15 | <principle name="composable"> |
| 16 | This skill can be called standalone or chained from another skill (e.g., nfs-migration). When chained, the calling skill may pass additional breaking-change checklists. Apply those alongside the standard changelog review. |
| 17 | </principle> |
| 18 | |
| 19 | </essential_principles> |
| 20 | |
| 21 | <intake> |
| 22 | |
| 23 | ## What would you like to do? |
| 24 | |
| 25 | 1. **Upgrade to latest Backstage for my RHDH version** — Align deps to the Backstage version that your target RHDH release uses |
| 26 | 2. **Upgrade to a specific Backstage version** — Bump to an exact Backstage release (e.g., 1.45.3) |
| 27 | 3. **Check what version I'm on** — Discover current `@backstage/*` versions without making changes |
| 28 | 4. **Fix issues after a version bump** — Resolve breaking changes, moved packages, or build failures after upgrading |
| 29 | |
| 30 | **Wait for response before proceeding.** |
| 31 | |
| 32 | </intake> |
| 33 | |
| 34 | <routing> |
| 35 | |
| 36 | | Response | Action | |
| 37 | |----------|--------| |
| 38 | | 1, "latest", "RHDH", "align" | Follow `workflows/full-upgrade.md` (RHDH-aligned) | |
| 39 | | 2, "specific", "version", number like "1.45" | Follow `workflows/full-upgrade.md` (user-specified version) | |
| 40 | | 3, "check", "current", "what version" | Read `references/discover-versions.md` and report findings | |
| 41 | | 4, "fix", "breaking", "issues", "errors" | Read `references/fix-breaking-changes.md` and `references/migrate-packages.md` | |
| 42 | |
| 43 | </routing> |
| 44 | |
| 45 | <reference_index> |
| 46 | |
| 47 | | Reference | Load when... | |
| 48 | |-----------|-------------| |
| 49 | | `references/discover-versions.md` | Reading current Backstage versions from a project | |
| 50 | | `references/determine-target.md` | Figuring out what Backstage version to target | |
| 51 | | `references/bump-deps.md` | Running the version bump command | |
| 52 | | `references/migrate-packages.md` | Handling moved/renamed packages | |
| 53 | | `references/fix-breaking-changes.md` | Resolving breaking changes from changelogs | |
| 54 | | `references/verify-upgrade.md` | Verifying the upgrade succeeded | |
| 55 | | `../rhdh/references/versions.md` | Looking up RHDH → Backstage version mapping | |
| 56 | |
| 57 | </reference_index> |
| 58 | |
| 59 | <success_criteria> |
| 60 | |
| 61 | - All `@backstage/*` deps align to the target release version |
| 62 | - No packages still reference old names (moved to `@backstage-community/*`) |
| 63 | - `yarn tsc` passes with no type errors |
| 64 | - `yarn build` succeeds |
| 65 | - `yarn test` passes (if tests exist) |
| 66 | |
| 67 | </success_criteria> |