skills/upgrade-repo/SKILL.md
Safely upgrade a language version, framework, or major dependency. Use when someone says "upgrade Node to v22", "migrate to React 19", "we need to get off this old version", "update our framework", or "how do we upgrade X?". Also triggers when a security advisory requires a version bump. Scope is infrastructure only: manifests, lock files, build configuration, and source changes required by the new version. Content drift discovered during an upgrade (outdated docs, stale patterns) is out of scope — delegate those to `context-maintenance`. Prevents the most common upgrade pitfalls: skipping migration guides, multi-major jumps, and losing rollback options.
npx skillsauth add maestria-co/ai-playbook upgrade-repoInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Upgrade language versions, frameworks, and major dependencies safely with a structured pre/during/post process and a clear rollback plan. The goal is to stay in control at every step: understand breaking changes before touching code, verify the build after each fix, and keep commits granular enough that any problem can be isolated and reverted.
Read the official release notes, migration guide, and CHANGELOG for the new version:
Skipping the migration guide is the #1 cause of upgrade pain — breaking changes are always documented.
Verify your direct dependencies support the new version. Run your package manager's outdated/audit command and check whether dependencies need to update alongside the upgrade.
Search the codebase for deprecated API usage before starting. This turns vague fear into a concrete list of files to update and helps you estimate the effort.
git checkout -b upgrade/[name]-[old-version]-to-[new-version]
git tag pre-upgrade-[name]-$(date +%Y%m%d)
git push origin pre-upgrade-[name]-$(date +%Y%m%d)
The tag is your rollback anchor — push it before making any changes.
Never jump multiple major versions in one step. If upgrading Node 16 → 22, go 16 → 18 → 20 → 22. Verify tests pass after each step. This isolates which version introduced each breakage and keeps PRs reviewable.
Update version in the manifest (package.json, pyproject.toml, go.mod, etc.)
Commit this change before installing so the diff is readable.
Install dependencies — check the output for conflicts
Fix build errors first — imports, syntax, renamed APIs — before running tests.
Fix in order: import errors → syntax → type errors → API changes.
Commit after each logical group of fixes.
Run tests — fix failures one at a time, commit each fix separately.
Address deprecation warnings — these become errors in the next major version, so clearing them now prevents the next upgrade from being painful.
Commit the working state before advancing to the next major version.
.context/Add a decision record at .context/decisions/upgrade-[package]-[date].md:
# Upgrade [Package] to [New Version]
## Decision
Upgraded from [old] to [new] on [date].
## Rationale
[Why: security fix / new features / dependency requirement]
## Breaking Changes & Mitigations
- [Change]: [how we addressed it]
## Migration Notes
[Patterns that changed; new best practices to follow going forward]
## Rollback
Tag: `pre-upgrade-[name]-[date]`
# Revert to the pre-upgrade state
git checkout pre-upgrade-[name]-[date]
git checkout -b rollback/[package]-[date]
# Restore dependencies and verify
[install command] # npm install / pip install / etc.
[test command]
If the upgrade must be abandoned entirely, delete the upgrade branch and document
the reason in .context/decisions/.
context-maintenance — do not fix them in this branchdevelopment
Writes and runs a test suite for a piece of code, covering happy path, edge cases, error cases, and security cases. Use when: implementation is complete and needs test coverage, a bug needs a reproduction test and fix validation, or code needs coverage before a refactor. Do not use when: the code under test is not yet implemented, or the spec is still unclear.
testing
Use when creating a new skill, editing an existing skill, or helping a user author a skill for this system. Covers structure, discoverability, quality, and discipline hardening.
development
Evidence-based verification process to run before marking any task complete. Use this skill every time you're about to report that work is done — for features, bug fixes, refactoring, or any code change. This catches the most common failure mode: declaring "done" without proof. If you're finishing up and about to tell the user the task is complete, run this checklist first.
development
Teaches agents how to discover, select, and invoke skills from the skill library. Use this skill whenever you're uncertain which skill applies to a task, when composing multiple skills for complex work, or when you need to understand what skills are available. This is your go-to when facing an ambiguous task and need to figure out the right approach before diving into implementation.